2014-11-14 21:00:28 |
Chris J Arges |
description |
When using maas to power control virsh instances, they are only given 10 seconds which may be too short of a time.
I was getting timeout errors, until I used the below patch to use the full timeout value.
Thanks,
Author: Chris J Arges <chris.j.arges@canonical.com>
=== modified file 'src/provisioningserver/drivers/hardware/virsh.py'
--- src/provisioningserver/drivers/hardware/virsh.py 2014-11-14 20:56:12 +0000
+++ src/provisioningserver/drivers/hardware/virsh.py 2014-09-15 14:28:28 +0000
@@ -74,7 +74,7 @@
def login(self, poweraddr, password=None):
"""Starts connection to virsh."""
self._execute(poweraddr)
- i = self.expect(self.PROMPTS, timeout=self.timeout)
+ i = self.expect(self.PROMPTS, timeout=min(10, self.timeout))
if i == self.I_PROMPT_SSHKEY:
# New certificate, lets always accept but if
# it changes it will fail to login. |
When using maas to power control virsh instances, they are only given 10 seconds which may be too short if the virtual machine host is slow.
I was getting timeout errors, until I used the below patch to use the full timeout value.
Thanks,
Author: Chris J Arges <chris.j.arges@canonical.com>
=== modified file 'src/provisioningserver/drivers/hardware/virsh.py'
--- src/provisioningserver/drivers/hardware/virsh.py 2014-11-14 20:56:12 +0000
+++ src/provisioningserver/drivers/hardware/virsh.py 2014-09-15 14:28:28 +0000
@@ -74,7 +74,7 @@
def login(self, poweraddr, password=None):
"""Starts connection to virsh."""
self._execute(poweraddr)
- i = self.expect(self.PROMPTS, timeout=self.timeout)
+ i = self.expect(self.PROMPTS, timeout=min(10, self.timeout))
if i == self.I_PROMPT_SSHKEY:
# New certificate, lets always accept but if
# it changes it will fail to login. |
|