Martin Betak has posted comments on this change.

Change subject: vdsm: Reboot capability for VM
......................................................................


Patch Set 28:

(4 comments)

....................................................
File vdsm/vm.py
Line 1734: 
Line 1735:         graceful_timeout = int(timeout)
Line 1736:         agent_user_delay = int(delay)
Line 1737: 
Line 1738:         def checkSuccesfulShutdown():
Done
Line 1739:             return vm.lastStatus == 'Down'
Line 1740: 
Line 1741:         def checkSuccesfulReboot():
Line 1742:             return vm._rebootPerformed


Line 1743: 
Line 1744:         # Callbacks for Callback Chain
Line 1745: 
Line 1746:         def guestAgentShutdown(delay, message):
Line 1747:             vm.guestAgent.desktopShutdown(delay, message, False)
If the desktopShutdown method was to throw an exception, the CallbackChain 
infrastructure will immediately proceed to next callback.
Line 1748:             time.sleep(graceful_timeout + agent_user_delay)
Line 1749:             return checkSuccesfulShutdown()
Line 1750: 
Line 1751:         def guestAgentReboot(delay, message):


Line 1744:         # Callbacks for Callback Chain
Line 1745: 
Line 1746:         def guestAgentShutdown(delay, message):
Line 1747:             vm.guestAgent.desktopShutdown(delay, message, False)
Line 1748:             time.sleep(graceful_timeout + agent_user_delay)
utils.retry is not exactly appropriate because it expects the callable to fail 
by throwing an exception wheras here we need bool return value. In patchset #29 
I propose simpler version of utils.retry just for this purpose.
Line 1749:             return checkSuccesfulShutdown()
Line 1750: 
Line 1751:         def guestAgentReboot(delay, message):
Line 1752:             vm.guestAgent.desktopShutdown(delay, message, True)


Line 1755: 
Line 1756:         def qemuAgentShutdown():
Line 1757:             try:
Line 1758:                 
vm._dom.shutdownFlags(libvirt.VIR_DOMAIN_SHUTDOWN_GUEST_AGENT)
Line 1759:                 time.sleep(graceful_timeout)
Done
Line 1760:             except libvirt.libvirtError:
Line 1761:                 pass
Line 1762:             return checkSuccesfulShutdown()
Line 1763: 


-- 
To view, visit http://gerrit.ovirt.org/15829
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12737e363a80679ffb1db55f14eaee158312d7da
Gerrit-PatchSet: 28
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Better Saggi <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Peter V. Saveliev <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to