Change in vdsm[master]: Vm: conf: proper locking in the creation path

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


Francesco Romani has uploaded a new change for review.

Change subject: Vm: conf: proper locking in the creation path
......................................................................

Vm: conf: proper locking in the creation path

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


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/54909/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 7003808..183c6c7 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1839,7 +1839,8 @@
                 self.cont()
 
         if not self.recovering or 'pid' not in self.conf:
-            self.conf['pid'] = str(self._getPid())
+            with self._confLock:
+                self.conf['pid'] = str(self._getPid())
 
         nice = int(self.conf.get('nice', '0'))
         nice = max(min(nice, 19), 0)
@@ -1970,7 +1971,8 @@
         for dev in devices.values():
             newDevices.extend(dev)
 
-        self.conf['devices'] = newDevices
+        with self._confLock:
+            self.conf['devices'] = newDevices
 
     def _correctDiskVolumes(self, srcDomXML):
         """


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

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