Francesco Romani has posted comments on this change.

Change subject: vm: api: move vm status check into migrate()
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/60608/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 1581: 
Line 1582:     def migrate(self, params):
Line 1583:         self._acquireCpuLockWithTimeout()
Line 1584:         try:
Line 1585:             # unlikely race on startup
> perhaps improve this comment:
reworded completely
Line 1586:             if self._lastStatus == vmstatus.WAIT_FOR_LAUNCH:
Line 1587:                 return response.error('noVM')
Line 1588:             if self.isMigrating():
Line 1589:                 self.log.warning('vm already migrating')


Line 1590:                 return response.error('exist')
Line 1591:             if self.hasTransientDisks():
Line 1592:                 return response.error('transientErr')
Line 1593:             # while we were blocking, another migrationSourceThread 
could have
Line 1594:             # taken self Down
> I suggest amending this comment -- if I understand it right, the following 
slightly rearranged code & comment, I hope this is clearer now.
Line 1595:             if self._lastStatus == vmstatus.DOWN:
Line 1596:                 return response.error('noVM')
Line 1597:             self._migrationSourceThread = migration.SourceThread(
Line 1598:                 self, **params)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7d5bfcc98b1169e2deed947c945e55c19d5ab04
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[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: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to