Change in vdsm[master]: vm: Take _confLock when updating Vm.conf disk parameters

nsoffer at redhat.com nsoffer at redhat.com
Fri Apr 24 14:26:23 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: vm: Take _confLock when updating Vm.conf disk parameters
......................................................................

vm: Take _confLock when updating Vm.conf disk parameters

This method updates multiple parameters, so we must lock the dict to
prevent other threads from seeing inconsistent state.

Change-Id: I89967bd738dc9e4f808ae6674dd61c5c859b511c
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/18/40218/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 9e61cc4..c757653 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2754,7 +2754,8 @@
             self.log.error("Unable to update the device configuration ",
                            "for disk %s", driveParams["name"])
         else:
-            disk.update(driveParams)
+            with self._confLock:
+                disk.update(driveParams)
 
         self.saveState()
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89967bd738dc9e4f808ae6674dd61c5c859b511c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list