Liron Ar has posted comments on this change. Change subject: core: Move VDS to Maintenance only if StopSPM is successful ......................................................................
Patch Set 1: (3 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java Line 56: } Line 57: } Line 58: Line 59: private void MoveVdssToGoingToMaintenanceMode() { Line 60: Iterator<Guid> it = vdssToMaintenance.keySet().iterator(); please revert the changes here - it'll cause to issues. the spms should be moved to prepare to maintenance last, so in case that we move to prepare to maintenance few hosts from the same pool the spm role won't be taken by any of those hsms and will start "flipping" between hosts, causing to many unneeded operations, therefore the spm need to change the status last. Line 61: while (it.hasNext()) { Line 62: VDSReturnValue result = setVdsStatusToPrepareForMaintenance(vdssToMaintenance.get(it.next())); Line 63: if (!result.getSucceeded()) { Line 64: // remove VDS from map because of an error Line 59: private void MoveVdssToGoingToMaintenanceMode() { Line 60: Iterator<Guid> it = vdssToMaintenance.keySet().iterator(); Line 61: while (it.hasNext()) { Line 62: VDSReturnValue result = setVdsStatusToPrepareForMaintenance(vdssToMaintenance.get(it.next())); Line 63: if (!result.getSucceeded()) { what about audit log to the user about that? Line 64: // remove VDS from map because of an error Line 65: it.remove(); Line 66: } Line 67: } Line 86: && vds.getStatus() != VDSStatus.Down) { Line 87: result = runVdsCommand(VDSCommandType.SetVdsStatus, Line 88: new SetVdsStatusVDSCommandParameters(vds.getId(), VDSStatus.PreparingForMaintenance)); Line 89: } else { Line 90: result = new VDSReturnValue(); why not just return the returnValue received from SetVdsStatus? if it succeeded, it should contain true. Line 91: result.setSucceeded(true); Line 92: } Line 93: return result; Line 94: } -- To view, visit http://gerrit.ovirt.org/21231 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c58f9a9629d2e7a496f02c4dececeb842d44543 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches