Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-04 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 3:

* Update tracker: IGNORE, no Bug-Url found
* Set MODIFIED::IGNORE, no Bug-Url found.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-04 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Send metrics info only if metrics enabled to avoid parsing logic

Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Signed-off-by: Yaniv Bronhaim 
Reviewed-on: https://gerrit.ovirt.org/61869
Reviewed-by: Piotr Kliczewski 
Reviewed-by: Francesco Romani 
Continuous-Integration: Jenkins CI
---
M lib/vdsm/virt/sampling.py
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Piotr Kliczewski: Looks good to me, but someone else must approve
  Yaniv Bronhaim: Verified
  Jenkins CI: Passed CI tests
  Francesco Romani: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-03 Thread ybronhei
Yaniv Bronhaim has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-03 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 2:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-03 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 1:

raising score because this is in the virt kingdom

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-03 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-03 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-02 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 1:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-02 Thread ybronhei
Yaniv Bronhaim has uploaded a new change for review.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..

Send metrics info only if metrics enabled to avoid parsing logic

Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Signed-off-by: Yaniv Bronhaim 
---
M lib/vdsm/virt/sampling.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/69/61869/1

diff --git a/lib/vdsm/virt/sampling.py b/lib/vdsm/virt/sampling.py
index 62d61ac..6049387 100644
--- a/lib/vdsm/virt/sampling.py
+++ b/lib/vdsm/virt/sampling.py
@@ -33,6 +33,7 @@
 
 from vdsm import numa
 from vdsm import utils
+from vdsm.config import config
 from vdsm.constants import P_VDSM_RUN, P_VDSM_CLIENT_LOG
 from vdsm.host import api as hostapi
 from vdsm.network import ipwrapper
@@ -44,6 +45,7 @@
 _THP_STATE_PATH = '/sys/kernel/mm/transparent_hugepage/enabled'
 if not os.path.exists(_THP_STATE_PATH):
 _THP_STATE_PATH = '/sys/kernel/mm/redhat_transparent_hugepage/enabled'
+_METRICS_ENABLED = config.getboolean('metrics', 'enabled')
 
 
 class InterfaceSample(object):
@@ -520,7 +522,8 @@
 'sampled timestamp %r elapsed %.3f acquired %r domains %s',
 timestamp,  self._stats_cache.clock() - timestamp, acquired,
 'all' if fast_path else len(doms))
-self._send_metrics()
+if _METRICS_ENABLED:
+self._send_metrics()
 
 def _send_metrics(self):
 vms = self._get_vms()
@@ -572,7 +575,7 @@
 sample = HostSample(self._pid)
 self._samples.append(sample)
 
-if self._cif:
+if self._cif and _METRICS_ENABLED:
 stats = hostapi.get_stats(self._cif, self._samples.stats())
 hostapi.report_stats(stats)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: Send metrics info only if metrics enabled to avoid parsing l...

2016-08-02 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: Send metrics info only if metrics enabled to avoid parsing logic
..


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If5df7708acb3aeca6b659cd7a5ec72748325b2cb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org