From patchwork Fri Dec 9 21:03:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 5567 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 1ECCF23E19 for ; Fri, 9 Dec 2011 21:03:16 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id F29D0A180F6 for ; Fri, 9 Dec 2011 21:03:15 +0000 (UTC) Received: by bke17 with SMTP id 17so4697698bke.11 for ; Fri, 09 Dec 2011 13:03:15 -0800 (PST) Received: by 10.204.133.213 with SMTP id g21mr1046742bkt.126.1323464595615; Fri, 09 Dec 2011 13:03:15 -0800 (PST) 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.205.129.2 with SMTP id hg2cs121544bkc; Fri, 9 Dec 2011 13:03:15 -0800 (PST) Received: by 10.180.80.162 with SMTP id s2mr12608407wix.27.1323464593404; Fri, 09 Dec 2011 13:03:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fk5si7259516wbb.57.2011.12.09.13.03.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Dec 2011 13:03:13 -0800 (PST) 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 1RZ7b7-0005Fz-35 for ; Fri, 09 Dec 2011 21:03:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 0EF41E1626 for ; Fri, 9 Dec 2011 21:03: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: 178 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 178: It seems sometimes, on snowball, we don't get all of the reboot message before losing serial. De... Message-Id: <20111209210313.31893.68703.launchpad@ackee.canonical.com> Date: Fri, 09 Dec 2011 21:03: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="14450"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 27a0e5f1e6d3ca5503ea1c1155a34084f7e0daeb ------------------------------------------------------------ revno: 178 committer: Paul Larson branch nick: lava-dispatcher timestamp: Fri 2011-12-09 15:00:57 -0600 message: It seems sometimes, on snowball, we don't get all of the reboot message before losing serial. Detect something slightly earlier modified: lava_dispatcher/connection.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/connection.py' --- lava_dispatcher/connection.py 2011-12-06 20:54:58 +0000 +++ lava_dispatcher/connection.py 2011-12-09 21:00:57 +0000 @@ -19,10 +19,8 @@ # with this program; if not, see . import logging +import pexpect import re -import time - -import pexpect class LavaConnection(object): @@ -69,8 +67,8 @@ logging.info("Rebooting the system") id = self.proc.expect( ['Restarting system.', 'The system is going down for reboot NOW', - pexpect.TIMEOUT], timeout=120) - if id not in [0,1]: + 'Will now restart', pexpect.TIMEOUT], timeout=120) + if id not in [0,1,2]: self.hard_reboot() def hard_reboot(self): @@ -90,7 +88,7 @@ logging.info("Perform hard reset on the system") self.proc.send("~$") self.proc.sendline("hardreset") - + def _boot(self, boot_cmds): self.soft_reboot() try: