Omer Frenkel has uploaded a new change for review. Change subject: core: vmsMonitoring - save info to be sooner ......................................................................
core: vmsMonitoring - save info to be sooner the new structure of the host-vms monitoring caused the save vms info to db to be called later in the cycle than it used to be. this caused issues in operations that executed in afterVMsRefreshTreatment, that assumed new information in the db. in this patch the save-to-db moved back into the refreshVmStats from the afterVMsRefreshTreatment, also with processExternallyManagedVms and processVmsWithDevicesChange that originally happened before the save to db. Change-Id: I5e69b0ba20588db55bb40e9ba6ca5472c3efe687 Signed-off-by: Omer Frenkel <ofren...@redhat.com> --- M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java 1 file changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/39406/1 diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java index 6ed4cbc..895f151 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmsMonitoring.java @@ -177,11 +177,19 @@ auditLogDirector); vmAnalyzers.add(vmAnalyzer); vmAnalyzer.analyze(); + + if (vmAnalyzer.isExternalVm()) { + externalVms.add(new Pair<>(vmAnalyzer.getDbVm(), vmAnalyzer.getVdsmVm())); + } } else { log.debug("skipping VM '{}' from this monitoring cycle" + " - the VM is locked by its VmManager ", getVmId(pair)); } } + + processExternallyManagedVms(); + processVmsWithDevicesChange(); + saveVmsToDb(); } private void afterVMsRefreshTreatment() { @@ -231,22 +239,13 @@ ResourceManager.getInstance().RemoveAsyncRunningVm(vmUpdater.getDbVm().getId()); } - if (vmUpdater.isExternalVm()) { - externalVms.add(new Pair<>(vmUpdater.getDbVm(), vmUpdater.getVdsmVm())); - } } - - // process all vms that went down - getVdsEventListener().processOnVmStop(movedToDownVms); // run all vms that crashed that marked with auto startup getVdsEventListener().runFailedAutoStartVMs(autoVmsToRun); - processExternallyManagedVms(); - - processVmsWithDevicesChange(); - - saveVmsToDb(); + // process all vms that went down + getVdsEventListener().processOnVmStop(movedToDownVms); } private void processVmsWithDevicesChange() { -- To view, visit https://gerrit.ovirt.org/39406 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e69b0ba20588db55bb40e9ba6ca5472c3efe687 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <ofren...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches