You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes to consider Recovered/Available Host HA state along with the agent connection status to determine the Host HA inspection in progress or not, and some code improvements
logger.debug("Checking Host HA inspection is in progress or not for the host {} from HAConfig, HA state is {}", hostId, state);
268
-
returnstate == HAConfig.HAState.Suspect || state == HAConfig.HAState.Checking;
268
+
if (state == HAConfig.HAState.Suspect || state == HAConfig.HAState.Checking) {
269
+
returntrue;
270
+
}
271
+
272
+
if (state == HAConfig.HAState.Recovered || state == HAConfig.HAState.Available) {
273
+
// If the host HA state is Recovered, it indicates that the host has restarted successfully.
274
+
// If the host HA state is Available, it means the host has restarted successfully and the recovery waiting period has completed.
275
+
// In both states, the agent can connect as soon as the host is ready (and can move to Suspect -> Checking HA state if the agent connection fails again before Fencing).
276
+
finalHostVOhost = _hostDao.findById(hostId);
277
+
if (host != null && host.getStatus() != Status.Up) {
278
+
logger.debug("{} is in {} status and HA state is {}, considering Host HA inspection is still in progress" +
279
+
" until we are sure the host is ready after a recovery wait period and agent is connected/Up", host, host.getStatus(), state);
thrownewRedfishException(String.format("Failed to execute HTTP %s request retry attempt %d/%d [URL: %s] due to exception %s", httpReq.getMethod(), attempt, redfishRequestMaxRetries,url, e));
245
245
} else {
246
-
logger.warn(
247
-
String.format("Failed to execute HTTP %s request retry attempt %d/%d [URL: %s] due to exception %s", httpReq.getMethod(), attempt, redfishRequestMaxRetries,
248
-
url, e));
246
+
logger.warn("Failed to execute HTTP {} request retry attempt {}/{} [URL: {}] due to exception {}", httpReq.getMethod(), attempt, redfishRequestMaxRetries, url, e);
249
247
}
250
248
}
251
249
}
@@ -312,7 +310,7 @@ public void executeComputerSystemReset(String hostAddress, RedfishResetCmd reset
312
310
thrownewRedfishException(String.format("Failed to execute System power command for host by performing '%s' request on URL '%s' and host address '%s'. The expected HTTP status code is '%s' but it got '%s'.",
0 commit comments