Federico Simoncelli has uploaded a new change for review.

Change subject: DomainMonitor shouldn't releaseHostId if the domain is missing
......................................................................

DomainMonitor shouldn't releaseHostId if the domain is missing

In this patch:
* do not release releaseHostId if the domain is missing
* improve the checks for produce() and isIsoDomain()

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


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/7833/1

diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py
index 95e2f7b..061c49b 100644
--- a/vdsm/storage/domainMonitor.py
+++ b/vdsm/storage/domainMonitor.py
@@ -151,7 +151,7 @@
 
         # If this is an ISO domain we didn't acquire the host id and releasing
         # it is superfluous.
-        if not self.isIsoDomain:
+        if self.domain and not self.isIsoDomain:
             try:
                 self.domain.releaseHostId(self.hostId, unused=True)
             except:
@@ -167,9 +167,9 @@
         # updateMonitoringThreads). It also needs to be inside the loop
         # since it might fail and we want keep trying until we succeed or
         # the domain is deactivated.
-        if not self.domain:
+        if self.domain is None:
             self.domain = sdCache.produce(self.sdUUID)
-        if not self.isIsoDomain:
+        if self.isIsoDomain is None:
             self.isIsoDomain = self.domain.isISO()
 
         if time() - self.lastRefresh > self.refreshTime:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b2d97f95d682ea00079cee0c0587243ed56651c
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