Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
Cloud
:
oVirt
:
3.3.2
>
vdsm
> 0002-domainMonitor-Improve-logging.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0002-domainMonitor-Improve-logging.patch of Package vdsm
From 3c5f9bb5440ca463b6af9f016178c4bcbc01b165 Mon Sep 17 00:00:00 2001 From: Nir Soffer <nsoffer@redhat.com> Date: Sun, 1 Dec 2013 22:29:25 +0200 Subject: [PATCH 02/11] domainMonitor: Improve logging We have logs in domain monitor thread, and we can see when a monitor starts or stops, but we don't have any info which thread triggered the operation. This patch adds info level log messages when starting and stopping domain monitoring, revealing the caller thread. Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029 Relates-To: https://bugzilla.redhat.com/1032925 Signed-off-by: Nir Soffer <nsoffer@redhat.com> Reviewed-on: http://gerrit.ovirt.org/21904 Reviewed-by: Sergey Gotliv <sgotliv@redhat.com> Reviewed-by: Allon Mureinik <amureini@redhat.com> Reviewed-by: Ohad Basan <obasan@redhat.com> Reviewed-by: Ayal Baron <abaron@redhat.com> Reviewed-on: http://gerrit.ovirt.org/21936 Reviewed-by: Federico Simoncelli <fsimonce@redhat.com> --- vdsm/storage/domainMonitor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py index ffa5e00..ac01e8b 100644 --- a/vdsm/storage/domainMonitor.py +++ b/vdsm/storage/domainMonitor.py @@ -90,6 +90,7 @@ class DomainMonitor(object): if sdUUID in self._domains: return + self.log.info("Start monitoring %s", sdUUID) domainThread = DomainMonitorThread(weakref.proxy(self), sdUUID, hostId, self._interval) domainThread.start() @@ -102,6 +103,7 @@ class DomainMonitor(object): # Eg: when a domain is detached the domain monitor is stopped and # the host id is released. If the monitor didn't actually exit it # might respawn a new acquire host id. + self.log.info("Stop monitoring %s", sdUUID) try: self._domains[sdUUID].stop() except KeyError: @@ -113,6 +115,7 @@ class DomainMonitor(object): return self._domains[sdUUID].getStatus() def close(self): + self.log.info("Stopping domain monitors") for sdUUID in self._domains.keys(): self.stopMonitoring(sdUUID) -- 1.8.4.2