Dan Kenigsberg has uploaded a new change for review. Change subject: untested: notify Engine when host connectivity changes ......................................................................
untested: notify Engine when host connectivity changes Change-Id: I4e2df34c95709a3e201e984909dcb78c97c20710 Signed-off-by: Dan Kenigsberg <dan...@redhat.com> --- M vdsm/virt/periodic.py M vdsm/virt/sampling.py 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/51135/1 diff --git a/vdsm/virt/periodic.py b/vdsm/virt/periodic.py index 31d5269..dd79f3d 100644 --- a/vdsm/virt/periodic.py +++ b/vdsm/virt/periodic.py @@ -103,7 +103,7 @@ config.getint('vars', 'vm_watermark_interval')), Operation( - sampling.HostMonitor(), + sampling.HostMonitor(cif=cif), config.getint('vars', 'host_sample_stats_interval'), scheduler) diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py index 8f02aab..ff5b791 100644 --- a/vdsm/virt/sampling.py +++ b/vdsm/virt/sampling.py @@ -542,9 +542,10 @@ class HostMonitor(object): _CONNLOG = logging.getLogger('connectivity') - def __init__(self, samples=host_samples): + def __init__(self, samples=host_samples, cif=None): self._samples = samples self._pid = os.getpid() + self._cif = cif def __call__(self): sample = HostSample(self._pid) @@ -556,6 +557,8 @@ diff = sample.connlog_diff(second_last) if diff: self._CONNLOG.debug('%s', diff) + if self._cif is not None: + self._cif.notify('|net|host_conn|') def _getLinkSpeed(dev): -- To view, visit https://gerrit.ovirt.org/51135 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e2df34c95709a3e201e984909dcb78c97c20710 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg <dan...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches