Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command for disabling Hotspare PSU #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 24 additions & 19 deletions drac_config
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,38 @@ cat << EOF
Usage: drac_confing action server...
action - action to perform:
# Server access
view - connect to KVM
view - connect to KVM

# DRAC management
racreset - restart DRAC
getsel - get DRAC sel
clrsel - clear DRAC sel
monuser - configure monitoring user and its password
rootpass - set root user password
racreset - restart DRAC
getsel - get DRAC sel
clrsel - clear DRAC sel
monuser - configure monitoring user and its password
rootpass - set root user password
enableipmi - enable IPMI on the DRAC
disablehotspare - disable PSU hotspare

# Power management
powerup - power on
powerdown - power off
hardreset - hard reset
powerup - power on
powerdown - power off
hardreset - hard reset

# RAID (only iDRAC7 and 8)
createraid - build a RAID1 of 2 first disks
deleteraid - delete any existing RAIDs
createraid - build a RAID1 of 2 first disks
deleteraid - delete any existing RAIDs

# DRAC deployment
base - configure all base settings: NTP, SNMP.
You can use DC environment variable to deploy settings for
a particular datacenter.
setconsole - configure virtual console access
base - configure all base settings: NTP, SNMP.
You can use DC environment variable to deploy settings for
a particular datacenter.
setconsole - configure virtual console access

# SSL operations. Reuqires IG ca-utils in in the same directory as
# drac_config is deployed.
fullssl - perform full ssl deployment
resetssl - reset SSL to default settings
requestssl - configure ssl settings and create a CSR
deployssl - deploy signed cert
fullssl - perform full ssl deployment
resetssl - reset SSL to default settings
requestssl - configure ssl settings and create a CSR
deployssl - deploy signed cert

server - one or more servers to connect to
EOF
Expand Down Expand Up @@ -174,6 +176,9 @@ while [ $# -ne 0 ]; do
"enableipmi")
sh $libdir/ipmi.sh
;;
"disablehotspare")
sh $libdir/psu_redundancy.sh
;;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better if this function was part of the "base" setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's added to the base profile and as a separate command :)

*)
echo "Uknown server action specified"
;;
Expand Down
3 changes: 3 additions & 0 deletions lib/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ EOF
<Attribute Name="WebServer.1#TLSProtocol">TLS 1.2 Only</Attribute>
<Attribute Name="WebServer.1#CustomCipherString">ECDH+AESGCM:DH+AESGCM:ECDH+AES256:RSA+AESGCM:RSA+AES:!DH+AES256:CDH+AES128:!DH+AES:!aNULL:!MD5:!DSS</Attribute>
</Component>
<Component FQDD="System.Embedded.1">
<Attribute Name="ServerPwr.1#PSRapidOn">Disabled</Attribute>
</Component>
</SystemConfiguration>
EOF
$racadm set -f $tf -t xml
Expand Down
11 changes: 11 additions & 0 deletions lib/psu_redundancy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

case "$model" in
iDRAC[789])
$racadm set System.Power.Hotspare.Enable 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this will work with the latest firmwares. I've seen iDRACs demanding that the new style XML configuration is used. Also the functionality is duplicated into e66243f , we should keep just one.

;;
*)
echo "Can not change PSU settings on $host because of its hardware model '$model'!"
;;
esac