Roy Golan has uploaded a new change for review.

Change subject: Wrong field check leads to unusable controllers
......................................................................

Wrong field check leads to unusable controllers

when a single collector has no data returned, it fails field validation phase 
as it expcet the all fields should exist

 set(data).issuperset(self.fields)

this means the whole monitoring cycle will fail as it will be marked as
ready = False

the check should be opposite - check the all the collected fields are
SUBSET of all the available fields

Change-Id: I631056568b5a69e18f6ed02730c41ab59f460aad
Bug-Url: https://bugzilla.redhat.com/1143992
Signed-off-by: Roy Golan <rgo...@redhat.com>
---
M mom/Monitor.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/mom refs/changes/28/34528/1

diff --git a/mom/Monitor.py b/mom/Monitor.py
index d52a3ea..d1990e0 100644
--- a/mom/Monitor.py
+++ b/mom/Monitor.py
@@ -105,7 +105,7 @@
             except Exception:
                 self.logger.exception("Unexpected collection error")
 
-        if not set(data).issuperset(self.fields):
+        if not set(data).issubset(self.fields):
             self._set_not_ready("Incomplete data: missing %s" % \
                                 (self.fields - set(data)))
             return None


-- 
To view, visit http://gerrit.ovirt.org/34528
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I631056568b5a69e18f6ed02730c41ab59f460aad
Gerrit-PatchSet: 1
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to