Change in vdsm[master]: vm: conf: proper locking in migration path

fromani at redhat.com fromani at redhat.com
Fri Mar 18 09:08:34 UTC 2016


Francesco Romani has uploaded a new change for review.

Change subject: vm: conf: proper locking in migration path
......................................................................

vm: conf: proper locking in migration path

Change-Id: Ic943e4af2f444f8ffe167175e40a9a2f28afc344
Bug-Url: https://bugzilla.redhat.com/1318550
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 7 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/54905/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 566f48f..5db9fbb 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2873,12 +2873,13 @@
             #    there is no danger of excessive delays preventing NTP from
             #    operation.
 
-        if 'guestIPs' in self.conf:
-            del self.conf['guestIPs']
-        if 'guestFQDN' in self.conf:
-            del self.conf['guestFQDN']
-        if 'username' in self.conf:
-            del self.conf['username']
+        with self._confLock:
+            if 'guestIPs' in self.conf:
+                del self.conf['guestIPs']
+            if 'guestFQDN' in self.conf:
+                del self.conf['guestFQDN']
+            if 'username' in self.conf:
+                del self.conf['username']
         self.saveState()
         self.log.info("End of migration")
 


-- 
To view, visit https://gerrit.ovirt.org/54905
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic943e4af2f444f8ffe167175e40a9a2f28afc344
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list