Martin Peřina has posted comments on this change. Change subject: engine: Add Upgrade host command ......................................................................
Patch Set 8: (2 comments) https://gerrit.ovirt.org/#/c/40462/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/HostUpgradeCallback.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/HostUpgradeCallback.java: Line 97: rootCommand.setCommandStatus(CommandStatus.FAILED); Line 98: } Line 99: Line 100: break; Line 101: } Please reformat: switch (host.getStatus()) { // Wait till moving to maintenance ends case PreparingForMaintenance: break; // Invoke the upgrade action case Maintenance: log.info("Host '{}' is on maintenance mode. Proceeding with Upgrade process.", getHostName(parameters.getVdsId())); invokeHostUpgrade(rootCommand, parameters); break; // Any other status implies maintenance action failed, and the callback cannot proceed with the upgrade default: if (isMaintenanceCommandExecuted(childCmdIds)) { log.info("Host '{}' failed to move to maintenance mode. Upgrade process is terminated.", getHostName(parameters.getVdsId())); rootCommand.setCommandStatus(CommandStatus.FAILED); } break; } Line 102: } Line 103: Line 104: /** Line 105: * Evaluates the progress of the {@code UpgradeHostInternalCommand} and updates root command status accordingly Line 131: case SUCCEEDED: Line 132: rootCommand.setCommandStatus(CommandStatus.SUCCEEDED); Line 133: return true; Line 134: } Line 135: } Please reformat: switch (upgradeCommand.getCommandStatus()) { case ACTIVE: case NOT_STARTED: return false; case FAILED: case FAILED_RESTARTED: case UNKNOWN: rootCommand.setCommandStatus(CommandStatus.FAILED); return true; case SUCCEEDED: rootCommand.setCommandStatus(CommandStatus.SUCCEEDED); return true; } Line 136: Line 137: return false; Line 138: } Line 139: -- To view, visit https://gerrit.ovirt.org/40462 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1a1447f3ebb5a7e3a67a8c68d449ae61e29f97fc Gerrit-PatchSet: 8 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches