From patchwork Fri Nov 2 12:15:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Pigott X-Patchwork-Id: 12650 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 D1D3923F46 for ; Fri, 2 Nov 2012 12:15:21 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4B5E8A19467 for ; Fri, 2 Nov 2012 12:15:21 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so2510528iag.11 for ; Fri, 02 Nov 2012 05:15:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=EMe7YrVCZOEutjILmECDvrC77lsBN9tylqoKP51vpoY=; b=i8caSH+304y1j6S240U0Np6YdJQxYWbmPBSXf1OzfOlk0yFWNZOB2bGqSu5t6s4rm6 XOdcYp6URKDrFnw3B1l4JyE1aw/sewJF4oxfiY0HZ6wDpPLlpLoaIYjLaXfCknT+1ivq 03lDurbi0b3Zj36tycE1VUr3ntTFGaX1r2YOzfS1/fzhG0KMxyu3St6B/NQ9TyfSOLMl puWtwK/gxfbLJRiaamwViFpWtHFA2xYfJBPHX9kaymzlUX+7iGwqRGq1BnonZLQSfsQ2 MlBrKZOCdjqheAiPOMOXcVpQv+UAfSIlMPlrVH/gqkXmLHAQrcRfUHbFhfb0r2TnkdmQ 6ETQ== Received: by 10.50.47.165 with SMTP id e5mr1386934ign.57.1351858520594; Fri, 02 Nov 2012 05:15:20 -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.50.67.148 with SMTP id n20csp883952igt; Fri, 2 Nov 2012 05:15:19 -0700 (PDT) Received: by 10.216.226.135 with SMTP id b7mr583140weq.48.1351858518976; Fri, 02 Nov 2012 05:15:18 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id a6si1352037wix.26.2012.11.02.05.15.18 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 Nov 2012 05:15:18 -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 1TUG9e-00025l-3p for ; Fri, 02 Nov 2012 12:15:18 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 09C27E0017 for ; Fri, 2 Nov 2012 12:15:18 +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: 433 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 433: Fix recursive boot problem Message-Id: <20121102121518.2933.3627.launchpad@ackee.canonical.com> Date: Fri, 02 Nov 2012 12:15:18 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16218"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 294c2edfec46918b0dcca8c8e0ee995471685be8 X-Gm-Message-State: ALoCoQkourYSY3pP5skXJXDBq0YeWktrlWhQ6sYYkUzBW7Pzh4he/46QovEo+9IcipduYotut23b Merge authors: Dave Pigott (dpigott) Related merge proposals: https://code.launchpad.net/~dpigott/lava-dispatcher/fix-recursive-boot/+merge/132683 proposed by: Dave Pigott (dpigott) ------------------------------------------------------------ revno: 433 [merge] committer: dave.pigott@linaro.org branch nick: trunk timestamp: Fri 2012-11-02 13:14:09 +0100 message: Fix recursive boot problem modified: lava_dispatcher/device/master.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/device/master.py' --- lava_dispatcher/device/master.py 2012-11-01 15:11:08 +0000 +++ lava_dispatcher/device/master.py 2012-11-02 11:32:31 +0000 @@ -344,9 +344,9 @@ self.proc.expect(self.config.image_boot_msg, timeout=300) self.proc.expect(self.config.master_str, timeout=300) - def boot_master_image(self): + def do_boot_master(self): """ - reboot the system, and check that we are in a master shell + sole boot - just boot the master image and don't do anything else """ logging.info("Booting the system master image") try: @@ -361,6 +361,13 @@ msg = "Hard reboot into master image failed: %s" % e logging.critical(msg) raise CriticalError(msg) + + + def boot_master_image(self): + """ + reboot the system, and check that we are in a master shell + """ + self.do_boot_master() self.proc.sendline('export PS1="%s"' % self.MASTER_PS1) self.proc.expect( self.MASTER_PS1_PATTERN, timeout=120, lava_no_logging=1) @@ -456,13 +463,13 @@ def get_master_ip(self): logging.info("Waiting for network to come up") network_up = False - attempts = 1 + attempts = 2 while (attempts <> 0) and (not network_up): while True: try: self.wait_network_up() except NetworkError: - self._client.boot_master_image() + self._client.do_boot_master() attempts = attempts - 1 continue network_up = True