mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 19:02:27 +00:00 
			
		
		
		
	Merge pull request #4170 from whowutwut/bmc_reboot
[OpenBMC] Hide the 504 timeout when doing a reboot of BMC since the REST service may be down
This commit is contained in:
		| @@ -1378,7 +1378,7 @@ sub deal_with_response { | ||||
|         my $error; | ||||
|         if (defined $status_info{RPOWER_STATUS_RESPONSE}{argv} and $status_info{RPOWER_STATUS_RESPONSE}{argv} =~ /bmcstate$/) { | ||||
|             # Handle the special case to return "NotReady" if the BMC does not return a success response. | ||||
|             # If the REST service is not up, it can't return "NotReady" itself, during reboot.:w | ||||
|             # If the REST service is not up, it can't return "NotReady" itself, during reboot. | ||||
|             $error = "BMC NotReady"; | ||||
|             xCAT::SvrUtils::sendmsg($error, $callback, $node); | ||||
|             $wait_node_num--; | ||||
| @@ -1395,6 +1395,12 @@ sub deal_with_response { | ||||
|  | ||||
|             return; | ||||
|         } elsif ($response->status_line eq $::RESPONSE_SERVICE_TIMEOUT) { | ||||
|             if ($node_info{$node}{cur_status} eq "RPOWER_RESET_RESPONSE" and defined $status_info{RPOWER_RESET_RESPONSE}{argv} and $status_info{RPOWER_RESET_RESPONSE}{argv} =~ /bmcreboot$/) {  | ||||
|                 my $infomsg = "BMC $::POWER_STATE_REBOOT"; | ||||
|                 xCAT::SvrUtils::sendmsg($infomsg, $callback, $node); | ||||
|                 $wait_node_num--; | ||||
|                 return;     | ||||
|             } | ||||
|             $error = $::RESPONSE_SERVICE_TIMEOUT; | ||||
|         } else { | ||||
|             my $response_info = decode_json $response->content; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user