Federico Simoncelli has uploaded a new change for review.

Change subject: Fix onDomainConnectivityStateChange in DomainMonitorThread
......................................................................

Fix onDomainConnectivityStateChange in DomainMonitorThread

The onDomainConnectivityStateChange event is not a DomainMonitorThread
attribute.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=853703
Signed-off-by: Federico Simoncelli <[email protected]>
Change-Id: If3b7e7c788b54726a3c820f4f2180884c74d93ef
---
M vdsm/storage/domainMonitor.py
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/7772/1

diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py
index 95e2f7b..96c8028 100644
--- a/vdsm/storage/domainMonitor.py
+++ b/vdsm/storage/domainMonitor.py
@@ -79,7 +79,8 @@
         if sdUUID in self._domains:
             return
 
-        domainThread = DomainMonitorThread(sdUUID, hostId, self._interval)
+        domainThread = DomainMonitorThread(self, sdUUID,
+                                           hostId, self._interval)
         domainThread.start()
         # The domain should be added only after it succesfully started
         self._domains[sdUUID] = domainThread
@@ -108,10 +109,11 @@
 class DomainMonitorThread(object):
     log = logging.getLogger('Storage.DomainMonitorThread')
 
-    def __init__(self, sdUUID, hostId, interval):
+    def __init__(self, domainMonitor, sdUUID, hostId, interval):
         self.thread = Thread(target=self._monitorLoop)
         self.thread.setDaemon(True)
 
+        self.domainMonitor = domainMonitor
         self.stopEvent = Event()
         self.domain = None
         self.sdUUID = sdUUID
@@ -213,8 +215,8 @@
                            "Valid" if self.nextStatus.valid else "Invalid")
 
             try:
-                self.onDomainConnectivityStateChange.emit(
-                                        self.sdUUID, self.nextStatus.valid)
+                self.domainMonitor.onDomainConnectivityStateChange \
+                                  .emit(self.sdUUID, self.nextStatus.valid)
             except:
                 self.log.warn("Could not emit domain state change event",
                               exc_info=True)


--
To view, visit http://gerrit.ovirt.org/7772
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3b7e7c788b54726a3c820f4f2180884c74d93ef
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to