mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
Handle openbmc transition states
This commit is contained in:
parent
7dddec27e9
commit
4fd1aeae80
@ -848,11 +848,23 @@ sub rpower_response {
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RPOWER_STATUS_RESPONSE" and !$next_status{ $node_info{$node}{cur_status} }) {
|
||||
if ($response_info->{'data'}->{CurrentHostState} =~ /Off$/) {
|
||||
xCAT::SvrUtils::sendmsg("off", $callback, $node);
|
||||
# State is off, but check if it is transitioning
|
||||
if ($response_info->{'data'}->{RequestedHostTransition} =~ /On$/) {
|
||||
xCAT::SvrUtils::sendmsg("powering-on", $callback, $node);
|
||||
}
|
||||
else {
|
||||
xCAT::SvrUtils::sendmsg("off", $callback, $node);
|
||||
}
|
||||
} elsif ($response_info->{'data'}->{CurrentHostState} =~ /Quiesced$/) {
|
||||
xCAT::SvrUtils::sendmsg("quiesced", $callback, $node);
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("on", $callback, $node);
|
||||
# State is on, but check if it is transitioning
|
||||
if ($response_info->{'data'}->{RequestedHostTransition} =~ /Off$/) {
|
||||
xCAT::SvrUtils::sendmsg("powering-off", $callback, $node);
|
||||
}
|
||||
else {
|
||||
xCAT::SvrUtils::sendmsg("on", $callback, $node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user