Skip to content

Commit

Permalink
etc: do not use native cycle with redfishpower
Browse files Browse the repository at this point in the history
Problem: A native power cycle with the redfish protocol is
inherently racy.  After performing a power cycle and immediately
getting the power status, there is no way to know if the power
status of "on" is from before or after the cycle.  This can be
confusing to users.

In all redfishpower devices files, define power cycles as an
off, delay, and on.  Do not use native redfish cycle/restart.

Fixes chaos#148
  • Loading branch information
chu11 committed Feb 25, 2024
1 parent 3d3abe8 commit b6e434f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions etc/devices/redfishpower-cray-r272z30.dev
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ specification "redfishpower-cray-r272z30" {
expect "redfishpower> "
send "setoffpath redfish/v1/Systems/Self/Actions/ComputerSystem.Reset {\"ResetType\":\"ForceOff\"}\n"
expect "redfishpower> "
send "setcyclepath redfish/v1/Systems/Self/Actions/ComputerSystem.Reset {\"ResetType\":\"ForceRestart\"}\n"
expect "redfishpower> "
send "settimeout 60\n"
expect "redfishpower> "
}
Expand All @@ -54,7 +52,9 @@ specification "redfishpower-cray-r272z30" {
expect "redfishpower> "
}
script cycle_ranged {
send "cycle %s\n"
send "off %s\n"
expect "redfishpower> "
send "on %s\n"
expect "redfishpower> "
}
}
6 changes: 3 additions & 3 deletions etc/devices/redfishpower-supermicro.dev
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ specification "redfishpower-supermicro" {
expect "redfishpower> "
send "setoffpath redfish/v1/Systems/1/Actions/ComputerSystem.Reset {\"ResetType\":\"ForceOff\"}\n"
expect "redfishpower> "
send "setcyclepath redfish/v1/Systems/1/Actions/ComputerSystem.Reset {\"ResetType\":\"ForceRestart\"}\n"
expect "redfishpower> "
send "settimeout 60\n"
expect "redfishpower> "
}
Expand All @@ -54,7 +52,9 @@ specification "redfishpower-supermicro" {
expect "redfishpower> "
}
script cycle_ranged {
send "cycle %s\n"
send "off %s\n"
expect "redfishpower> "
send "on %s\n"
expect "redfishpower> "
}
}

0 comments on commit b6e434f

Please sign in to comment.