Change in vdsm[master]: vdsm: Reboot capability for VM
mbetak at redhat.com
mbetak at redhat.com
Tue Nov 12 17:40:08 UTC 2013
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 <mbetak at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Better Saggi <bettersaggi at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list