diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 100: fix bug 833181 the soft reboot takes too long time

Message ID 20110906023913.5412.66771.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Spring Zhang Sept. 6, 2011, 2:39 a.m. UTC
Merge authors:
  Spring Zhang (qzhang)
Related merge proposals:
  https://code.launchpad.net/~qzhang/lava-dispatcher/fix-833181/+merge/74121
  proposed by: Spring Zhang (qzhang)
  review: Approve - Spring Zhang (qzhang)
------------------------------------------------------------
revno: 100 [merge]
committer: Spring Zhang <spring.zhang@linaro.org>
branch nick: fix-833181
timestamp: Tue 2011-09-06 10:38:15 +0800
message:
  fix bug 833181 the soft reboot takes too long time
modified:
  lava_dispatcher/client.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/client.py'
--- lava_dispatcher/client.py	2011-09-02 03:00:59 +0000
+++ lava_dispatcher/client.py	2011-09-06 02:22:12 +0000
@@ -109,6 +109,11 @@ 
 
     def soft_reboot(self):
         self.proc.sendline("reboot")
+        # set soft reboot timeout 60s, or do a hard reset
+        id = self.proc.expect(['Restarting system', pexpect.TIMEOUT],
+                timeout=60)
+        if id != 0:
+            self.hard_reboot()
 
     def hard_reboot(self):
         self.proc.send("~$")