Francesco Romani has posted comments on this change.

Change subject: virt: Allow vm.cont() to resume VM in SAVING_STATE
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

let's do like MartinP suggested, that should settle the known issues.

https://gerrit.ovirt.org/#/c/47527/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 1135:             self._acquireCpuLockWithTimeout()
Line 1136:         try:
Line 1137:             if self.lastStatus != beforeState and \
Line 1138:                     self.lastStatus in (vmstatus.MIGRATION_SOURCE,
Line 1139:                                         vmstatus.SAVING_STATE, 
vmstatus.DOWN):
> Yes, this is the best solution. The lastStatus check is wrong (and racy) an
After another look:
the acquireCpuLock does NOT guard status changes (and it should not) so it is 
ok to move this check in the calling site.
Doing the check in API.py is seldomly done but OK: lastStatus is a public field.
Line 1140:                 self.log.error('cannot cont while %s', 
self.lastStatus)
Line 1141:                 return response.error('unexpected')
Line 1142:             self._underlyingCont()
Line 1143:             self._setGuestCpuRunning(self._isDomainRunning(),


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5b1c7b4eecacf87ece48dc563fd2da294af0510b
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <[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: Milan Zamazal <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Shmuel Leib Melamud <[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