Nir Soffer has uploaded a new change for review.
Change subject: domainMonitor: Improve logging
......................................................................
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(a)redhat.com>
---
M vdsm/storage/domainMonitor.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/21904/1
diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py
index 5b0d4ac..30928dd 100644
--- a/vdsm/storage/domainMonitor.py
+++ b/vdsm/storage/domainMonitor.py
@@ -98,6 +98,7 @@
domainThread.poolDomain |= poolDomain
return
+ self.log.info("Start monitoring %s", sdUUID)
domainThread = DomainMonitorThread(weakref.proxy(self),
sdUUID, hostId, self._interval)
domainThread.poolDomain = poolDomain
@@ -111,6 +112,7 @@
# 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:
@@ -122,6 +124,7 @@
return self._domains[sdUUID].getStatus()
def close(self):
+ self.log.info("Stopping domain monitors")
for sdUUID in self._domains.keys():
self.stopMonitoring(sdUUID)
--
To view, visit
http://gerrit.ovirt.org/21904
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>