mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-05-17 19:57:18 +00:00
Merge pull request #7556 from VersatusHPC/fix/openbmc-503-retry
fix: retry on HTTP 503 from OpenBMC REST API instead of failing
This commit is contained in:
@@ -2991,6 +2991,12 @@ sub deal_with_response {
|
||||
}
|
||||
|
||||
if ($response->status_line eq $::RESPONSE_SERVICE_UNAVAILABLE) {
|
||||
$node_info{$node}{_503_retries} = ($node_info{$node}{_503_retries} || 0) + 1;
|
||||
if ($node_info{$node}{_503_retries} <= 3) {
|
||||
$node_info{$node}{cur_status} =~ s/_RESPONSE$/_REQUEST/;
|
||||
$node_wait{$node} = time() + 3;
|
||||
return;
|
||||
}
|
||||
$error = $::RESPONSE_SERVICE_UNAVAILABLE;
|
||||
} elsif ($response->status_line eq $::RESPONSE_METHOD_NOT_ALLOWED) {
|
||||
if ($node_info{$node}{cur_status} eq "REVENTLOG_RESOLVED_RESPONSE") {
|
||||
|
||||
Reference in New Issue
Block a user