2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Sync up the summary output line for rflash openbmc so admins can grep 'Firmware' and get an good picture of the summary

This commit is contained in:
Victor Hu 2017-10-20 15:33:22 -04:00
parent 1dd8943ea0
commit d077c36cf7

View File

@ -2312,14 +2312,14 @@ sub rflash_response {
if ($activation_state =~ /Software.Activation.Activations.Failed/) {
# Activation failed. Report error and exit
xCAT::SvrUtils::sendmsg([1,"Activation of firmware failed"], $callback, $node);
xCAT::SvrUtils::sendmsg([1,"Firmware activation Failed."], $callback, $node);
$wait_node_num--;
return;
}
elsif ($activation_state =~ /Software.Activation.Activations.Active/) {
if (scalar($priority_state) == 0) {
# Activation state of active and priority of 0 indicates the activation has been completed
xCAT::SvrUtils::sendmsg("Firmware update successfully activated", $callback, $node);
xCAT::SvrUtils::sendmsg("Firmware activation Successful.", $callback, $node);
$wait_node_num--;
return;
}
@ -2330,7 +2330,7 @@ sub rflash_response {
}
}
elsif ($activation_state =~ /Software.Activation.Activations.Activating/) {
xCAT::SvrUtils::sendmsg("Activating firmware update. $progress_state\%", $callback, $node);
xCAT::SvrUtils::sendmsg("Activating firmware . . . $progress_state\%", $callback, $node);
# Activation still going, sleep for a bit, then print the progress value
# Set next state to come back here to chect the activation status again.
retry_after($node, "RFLASH_UPDATE_CHECK_STATE_REQUEST", 15);
@ -2404,7 +2404,7 @@ sub rflash_response {
}
if ($node_info{$node}{cur_status} eq "RFLASH_DELETE_IMAGE_RESPONSE") {
xCAT::SvrUtils::sendmsg("Firmware update successfully removed", $callback, $node);
xCAT::SvrUtils::sendmsg("Firmware removed", $callback, $node);
}
if ($next_status{ $node_info{$node}{cur_status} }) {
@ -2444,9 +2444,9 @@ sub rflash_upload {
if ($h->{message} eq $::RESPONSE_OK) {
# Upload successful, display message
if ($::UPLOAD_AND_ACTIVATE) {
xCAT::SvrUtils::sendmsg("Upload successful. Attempting to activate firmware: $::UPLOAD_FILE_VERSION", $callback, $node);
xCAT::SvrUtils::sendmsg("Firmware upload successful. Attempting to activate firmware: $::UPLOAD_FILE_VERSION", $callback, $node);
} else {
xCAT::SvrUtils::sendmsg("Successful, use -l option to list.", $callback, $node);
xCAT::SvrUtils::sendmsg("Firmware upload successful. Use -l option to list.", $callback, $node);
}
# Try to logoff, no need to check result, as there is nothing else to do if failure
my $curl_logout_result = `$curl_logout_cmd`;