Change in vdsm[master]: virt: Allow vm.cont() to resume VM in SAVING_STATE

fromani at redhat.com fromani at redhat.com
Tue Jan 12 13:38:50 UTC 2016


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 <smelamud at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list