Nir Soffer has posted comments on this change.
Change subject: vm: safe(r) Vm.conf update in creation thread
......................................................................
Patch Set 3:
(1 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 engin
Michal, you may be right that engine should not query the status here
while vm is created, but this class should work when some code call status() in the middle
on buildConfDevices(), regardless of the flow.
This is a localized solution - it effects only this function, by never modifying
self.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(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes