Milan Zamazal has posted comments on this change.

Change subject: vm: improve safety between startup and shutdown
......................................................................


Patch Set 8:

(3 comments)

I can't say there is something clearly wrong with the change, but it looks a 
bit suspicious to me. While it probably shouldn't cause regressions, I'm not 
sure it handles the problem completely. Maybe just some source comment is 
missing, maybe something should be done a bit differently. I don't know now.

https://gerrit.ovirt.org/#/c/44989/8/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 251:         vmdevices.graphics.initLegacyConf(self.conf)
Line 252:         self.cif = cif
Line 253:         self.log = SimpleLogAdapter(self.log, {"vmId": 
self.conf['vmId']})
Line 254:         self._destroyed = threading.Event()
Line 255:         self._destroyRequested = threading.Event()
We shouldn't use camel case for attribute names, right?
Line 256:         self._recovery_file = recovery.File(self.conf['vmId'])
Line 257:         self._monitorResponse = 0
Line 258:         self.memCommitted = 0
Line 259:         self._consoleDisconnectAction = 
ConsoleDisconnectAction.LOCK_SCREEN


Line 1306:         try:
Line 1307:             self.guestAgent.stop()
Line 1308:         except Exception:
Line 1309:             pass
Line 1310:         self._created.set()
Setting this at two quite different places worries me a bit. E.g. didn't we 
forget about another place?
Line 1311:         self.saveState()
Line 1312:         if event_data:
Line 1313:             self.send_status_event(**event_data)
Line 1314: 


Line 1765:             self._created.set()
Line 1766: 
Line 1767:     def _domDependentInit(self):
Line 1768:         if self._destroyRequested.is_set():
Line 1769:             raise 
DestroyedOnStartupError(vmexitreason.DESTROYED_ON_STARTUP)
What happens if destroy gets called after this check? Is there anything 
preventing it? Or is it harmless?
Line 1770: 
Line 1771:         if not self._dom.connected:
Line 1772:             raise 
MissingLibvirtDomainError(vmexitreason.LIBVIRT_START_FAILED)
Line 1773: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8718f58f1d255d9e603db75aa1f256c03c300f3a
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Milan Zamazal <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to