virsh power control timeouts prematurely

Bug #1392865 reported by Chris J Arges
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse

Bug Description

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 <email address hidden>

=== 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.

Related branches

Chris J Arges (arges)
summary: - virsh power control timeouts prematuraely
+ virsh power control timeouts prematurely
description: updated
tags: added: patch
Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.7.1
tags: added: power trivial
Changed in maas:
milestone: 1.7.1 → 1.7.2
Christian Reis (kiko)
tags: added: virsh
Changed in maas:
milestone: 1.7.2 → 1.7.3
Changed in maas:
milestone: 1.7.3 → 1.8.0
assignee: nobody → Blake Rouse (blake-rouse)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.