Merge "Reboot libvirt VM in case of boot failure"
This commit is contained in:
commit
b4659cff27
|
@ -43,6 +43,9 @@ class DevopsDriver(object):
|
|||
if settings.VNC_PASSWORD:
|
||||
self.vnc_password = settings.VNC_PASSWORD
|
||||
|
||||
if settings.REBOOT_TIMEOUT:
|
||||
self.reboot_timeout = settings.REBOOT_TIMEOUT
|
||||
|
||||
def __del__(self):
|
||||
self.conn.close()
|
||||
|
||||
|
|
|
@ -163,6 +163,9 @@ class LibvirtXMLBuilder(object):
|
|||
node_xml.type(node.os_type, arch=node.architecture)
|
||||
for boot_dev in json.loads(node.boot):
|
||||
node_xml.boot(dev=boot_dev)
|
||||
if self.driver.reboot_timeout:
|
||||
node_xml.bios(rebootTimeout='{0}'.format(
|
||||
self.driver.reboot_timeout))
|
||||
|
||||
with node_xml.devices:
|
||||
node_xml.emulator(emulator)
|
||||
|
|
Loading…
Reference in New Issue