Martin Peřina has posted comments on this change. Change subject: core: Move VDS to Maintenance only if StopSPM is successful ......................................................................
Patch Set 4: (2 comments) .................................................... File backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties Line 703: DISK_ALIGNMENT_SCAN_START=Starting alignment scan of disk '${DiskAlias}'. Line 704: DISK_ALIGNMENT_SCAN_FAILURE=Alignment scan of disk '${DiskAlias}' failed. Line 705: DISK_ALIGNMENT_SCAN_SUCCESS=Alignment scan of disk '${DiskAlias}' is complete. Line 706: VM_MEMORY_NOT_IN_RECOMMENDED_RANGE=VM ${VmName} was configured with ${VmMemInMb}mb of memory while the recommended value range is ${VmMinMemInMb}mb - ${VmMaxMemInMb}mb Line 707: FAILED_TO_STOP_SPM_ON_HOST=Failed to stop SPM running on host ${VdsName} Well, I see several options here: 1) Propagate VDSError from SpmStop through ResetIrs to SetVdsStatus and forward this error message to AuditLog 2) Propagate logSpmStopFailure from SetVdsStatus through ResetIrs to SpmStop and if logSpmStopFailure is ttrue, then fire error to AuditLog IMO 1) is a better option, what do you think? .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVdsStatusVDSCommand.java Line 46: } Line 47: Line 48: // set status to Prepare for Maintenance for SPM only if ResetIrs command was successful Line 49: if (getVDSReturnValue().getSucceeded()) { Line 50: updateVdsFromParameters(parameters, vds); Well, this change VDS status and after this it updates dynamic data and statistics. Dynamic data and statistics are updated periodiacally by VdsUpdateRuntimeInfo, so no problem here. But we cannot allow to change status to Prepare for Maintenance, if StopSPM failed. If we do this, then VdsUpdateRuntimeInfo will change status to Maintenance during next cycle without stoppping spm, migrating vms, ... Line 51: TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { Line 52: Line 53: @Override Line 54: public Void runInTransaction() { -- 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: 4 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