Martin Peřina 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();
Hmm, that's the reason for completely unnecessary code (I thought it was some 
leftover). OK, I will revert this and add a comment here.
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()) {
I could add log, but isn't it already logged during failure of 
SetVdsStatusVDSCommand?
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();
Because the execution of the SetVdsStatus command depends on condition, so if 
condition is false and command is not executed, success is returned.
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

Reply via email to