From patchwork Tue Sep 6 02:39:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spring Zhang X-Patchwork-Id: 3872 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E0DBB23EF7 for ; Tue, 6 Sep 2011 02:39:15 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id BD242A185AE for ; Tue, 6 Sep 2011 02:39:15 +0000 (UTC) Received: by fxd18 with SMTP id 18so5761313fxd.11 for ; Mon, 05 Sep 2011 19:39:15 -0700 (PDT) Received: by 10.223.24.21 with SMTP id t21mr940130fab.24.1315276755599; Mon, 05 Sep 2011 19:39:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs80469lab; Mon, 5 Sep 2011 19:39:15 -0700 (PDT) Received: by 10.216.188.194 with SMTP id a44mr233017wen.4.1315276754599; Mon, 05 Sep 2011 19:39:14 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com [91.189.90.7]) by mx.google.com with ESMTPS id 47si7407522wel.11.2011.09.05.19.39.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Sep 2011 19:39:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R0lZB-0000WO-RI for ; Tue, 06 Sep 2011 02:39:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id C40ADE01C5 for ; Tue, 6 Sep 2011 02:39:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 100 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [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> Date: Tue, 06 Sep 2011 02:39:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13861"; Instance="initZopeless config overlay" X-Launchpad-Hash: 01cd33bdb5e9e4e91f258e6d4080e48a9951ea59 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 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 === 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("~$")