Change in vdsm[ovirt-3.3]: domainMonitor: Improve logging

nsoffer at redhat.com nsoffer at redhat.com
Mon Dec 2 22:49:32 UTC 2013


Hello Ayal Baron, Sergey Gotliv, Ohad Basan, Allon Mureinik,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/21936

to review the following change.

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 at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/21904
Reviewed-by: Sergey Gotliv <sgotliv at redhat.com>
Reviewed-by: Allon Mureinik <amureini at redhat.com>
Reviewed-by: Ohad Basan <obasan at redhat.com>
Reviewed-by: Ayal Baron <abaron at redhat.com>
---
M vdsm/storage/domainMonitor.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/21936/1

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 @@
         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 @@
         # 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 @@
         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/21936
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Ohad Basan <obasan at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>


More information about the vdsm-patches mailing list