Arik Hadas has uploaded a new change for review.

Change subject: core: update scheduling stats only if GetStats succeeded
......................................................................

core: update scheduling stats only if GetStats succeeded

Move the update of scheduling stats to be after validating the call to
GetStats succeeded.

Change-Id: Id30a895423de2cec4163aad8b4e51db60cbfa8e4
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/HostMonitoring.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/41569/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/HostMonitoring.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/HostMonitoring.java
index f81755f..5f45d8b 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/HostMonitoring.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/HostMonitoring.java
@@ -468,13 +468,13 @@
         fetchHostInterfaces();
         VDSReturnValue statsReturnValue = 
resourceManager.runVdsCommand(VDSCommandType.GetStats,
                 new VdsIdAndVdsVDSCommandParametersBase(vds));
-        getVdsEventListener().updateSchedulingStats(vds);
         if (!statsReturnValue.getSucceeded()
                 && statsReturnValue.getExceptionObject() != null) {
             log.error(" Failed getting vds stats,  vds='{}'({}): {}",
                     vds.getName(), vds.getId(), 
statsReturnValue.getExceptionString());
             throw statsReturnValue.getExceptionObject();
         }
+        getVdsEventListener().updateSchedulingStats(vds);
         // save also dynamic because vm_count data and image_check getting with
         // statistics data
         // TODO: omer- one day remove dynamic save when possible please check 
if vdsDynamic changed before save


-- 
To view, visit https://gerrit.ovirt.org/41569
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id30a895423de2cec4163aad8b4e51db60cbfa8e4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to