Change in vdsm[master]: vm: safe(r) Vm.conf update in creation thread
michal.skrivanek at redhat.com
michal.skrivanek at redhat.com
Thu Nov 6 09:45:27 UTC 2014
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:
--
To view, visit http://gerrit.ovirt.org/34813
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9dee2aa01b2c231b99e02a879dcfbd7ecc7f70a
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list