Michal Skrivanek has posted comments on this change.
Change subject: vm: safe(r) Vm.conf update in creation thread ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
fine with it for urgent fix, however longer term/better solution suggested in the comment
http://gerrit.ovirt.org/#/c/34813/3/vdsm/virt/vm.py File vdsm/virt/vm.py:
Line 1396: # The new/old type parameter will be distinguished Line 1397: # by existence/absence of the 'devices' key Line 1398: Line 1399: try: Line 1400: # while this code is running, Vm is queryable for status(), I suggest to actually block queries instead; There's no sense/use for engine to query while the VM is being created. A hardcoded WaitForLaunch status is as good as anything. And we can simply flag the end of creation, and only then allow/return the actual status structure.
This can be done as a followup patch, but IMHO it's a better solution with a single localized change, as opposed to this patch where it is difficult to track where else you're changing conf Line 1401: # thus we must fix devices in an atomic way, hence the deepcopy Line 1402: with self._confLock: Line 1403: devConf = deepcopy(self.conf['devices']) Line 1404: except KeyError: