Liron Ar has posted comments on this change.
Change subject: core: Move VDS to Maintenance only if StopSPM is successful
......................................................................
Patch Set 2:
(3 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
Line 59: }
Line 60: }
Line 61:
Line 62: private void MoveVdssToGoingToMaintenanceMode() {
Line 63: List<VDS> nonSpms = new LinkedList<>();
this refactor isn't related to the solved bug..please separate between this and
the patch to solve the bug.
Line 64: List<VDS> spms = new LinkedList<>();
Line 65: for(VDS vds : vdssToMaintenance.values()) {
Line 66: if (vds.getSpmStatus() == VdsSpmStatus.SPM) {
Line 67: spms.add(0, vds);
Line 89: }
Line 90: }
Line 91:
Line 92: private void setVdssStatusToPrepareForMaintenance(List<VDS> vdss) {
Line 93: for (VDS vds : vdss) {
this refactor isn't related to the bug fix, please sepearate to reduce the
noise here.
Line 94: if (vds.getStatus() != VDSStatus.PreparingForMaintenance
&& vds.getStatus() != VDSStatus.NonResponsive
Line 95: && vds.getStatus() != VDSStatus.Down) {
Line 96: VDSReturnValue result =
runVdsCommand(VDSCommandType.SetVdsStatus,
Line 97: new
SetVdsStatusVDSCommandParameters(vds.getId(),
VDSStatus.PreparingForMaintenance));
Line 94: if (vds.getStatus() != VDSStatus.PreparingForMaintenance
&& vds.getStatus() != VDSStatus.NonResponsive
Line 95: && vds.getStatus() != VDSStatus.Down) {
Line 96: VDSReturnValue result =
runVdsCommand(VDSCommandType.SetVdsStatus,
Line 97: new
SetVdsStatusVDSCommandParameters(vds.getId(),
VDSStatus.PreparingForMaintenance));
Line 98: if (!result.getSucceeded()) {
Marin, I have a question -
in setVdsStatus command, the vds status is being changed in a transaction even
before resetirs/stop spm is being called, what will return the host to status
up? i'm asking as this was verified..otherwise it seems as problematic to me.
Regardless, please look into having that audit log there and not here.
Line 99: // remove VDS from base list, because of an error
during SetVdsStatus
Line 100: vdssToMaintenance.remove(vds.getId());
Line 101:
Line 102: AuditLogableBase base = new AuditLogableBase();
--
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: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches