Change in vdsm[ovirt-3.5]: Skip hosted engine stats processing when it is not configured
msivak at redhat.com
msivak at redhat.com
Tue Aug 25 21:05:24 UTC 2015
Hello Sandro Bonazzola, Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/45333
to review the following change.
Change subject: Skip hosted engine stats processing when it is not configured
......................................................................
Skip hosted engine stats processing when it is not configured
This changes the data collecting to ignore hosted engine when
the host id is reported as None or 0.
Change-Id: I7b49fa02ae8035c1eb98582299260a59d3bba0e0
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1248539
Signed-off-by: Martin Sivak <msivak at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/44354
Continuous-Integration: Jenkins CI
Reviewed-by: Sandro Bonazzola <sbonazzo at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/API.py
M vdsm/logger.conf.in
2 files changed, 12 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/45333/1
diff --git a/vdsm/API.py b/vdsm/API.py
index 36fafe2..4c9f90c 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1697,8 +1697,12 @@
try:
instance = haClient.HAClient()
host_id = instance.get_local_host_id()
+
# If a host id is available, consider HA configured
- i['configured'] = True
+ if host_id:
+ i['configured'] = True
+ else:
+ return i
stats = instance.get_all_stats()
if 0 in stats:
diff --git a/vdsm/logger.conf.in b/vdsm/logger.conf.in
index f75c010..9f2a971 100644
--- a/vdsm/logger.conf.in
+++ b/vdsm/logger.conf.in
@@ -1,5 +1,5 @@
[loggers]
-keys=root,vds,Storage,ovirt_hosted_engine_ha,IOProcess,connectivity
+keys=root,vds,Storage,ovirt_hosted_engine_ha,ovirt_hosted_engine_ha_config,IOProcess,connectivity
[handlers]
keys=console,syslog,logfile,connlogfile
@@ -30,6 +30,12 @@
qualname=ovirt_hosted_engine_ha
propagate=1
+[logger_ovirt_hosted_engine_ha_config]
+level=ERROR
+handlers=
+qualname=ovirt_hosted_engine_ha.env.config
+propagate=0
+
[logger_IOProcess]
level=INFO
handlers=logfile
--
To view, visit https://gerrit.ovirt.org/45333
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b49fa02ae8035c1eb98582299260a59d3bba0e0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo at redhat.com>
More information about the vdsm-patches
mailing list