From patchwork Fri Sep 16 02:40:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 4113 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 29C5F23EFA for ; Fri, 16 Sep 2011 02:40:24 +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 0F740A189A4 for ; Fri, 16 Sep 2011 02:40:24 +0000 (UTC) Received: by fxe23 with SMTP id 23so1794345fxe.11 for ; Thu, 15 Sep 2011 19:40:23 -0700 (PDT) Received: by 10.223.63.8 with SMTP id z8mr913552fah.84.1316140823868; Thu, 15 Sep 2011 19:40:23 -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 m8cs114506lab; Thu, 15 Sep 2011 19:40:23 -0700 (PDT) Received: by 10.216.6.211 with SMTP id 61mr1788880wen.94.1316140817711; Thu, 15 Sep 2011 19:40:17 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com [91.189.90.7]) by mx.google.com with ESMTPS id w51si9862383wec.1.2011.09.15.19.40.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Sep 2011 19:40:17 -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 1R4OLh-0000Jz-6D for ; Fri, 16 Sep 2011 02:40:17 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 240C6E04A9 for ; Fri, 16 Sep 2011 02:40:17 +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: 112 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 112: Merge fixes for: Message-Id: <20110916024017.10642.42426.launchpad@ackee.canonical.com> Date: Fri, 16 Sep 2011 02:40:17 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13955"; Instance="initZopeless config overlay" X-Launchpad-Hash: 21ea6684aad77a66454ff619f1d998235d79386e Merge authors: Spring Zhang (qzhang) Related merge proposals: https://code.launchpad.net/~qzhang/lava-dispatcher/fix-844299-844301-844462/+merge/75124 proposed by: Spring Zhang (qzhang) review: Approve - Paul Larson (pwlars) ------------------------------------------------------------ revno: 112 [merge] committer: Paul Larson branch nick: big-dispatcher-merge timestamp: Thu 2011-09-15 21:37:57 -0500 message: Merge fixes for: Bug #844299: dispatcher detects failure to install lava-test, still tries to run tests Bug #844301: dispatcher didn't detect deployment failure Bug #844462: Failing to boot the image should be a critical error modified: lava_dispatcher/actions/boot_control.py lava_dispatcher/actions/deploy.py lava_dispatcher/actions/lava-test.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/actions/boot_control.py' --- lava_dispatcher/actions/boot_control.py 2011-06-27 04:55:08 +0000 +++ lava_dispatcher/actions/boot_control.py 2011-09-16 02:37:57 +0000 @@ -21,6 +21,7 @@ # with this program; if not, see . from lava_dispatcher.actions import BaseAction, BaseAndroidAction +from lava_dispatcher.client import CriticalError class cmd_boot_linaro_android_image(BaseAndroidAction): """ Call client code to boot to the master image @@ -29,10 +30,13 @@ #Workaround for commands coming too quickly at this point client = self.client client.proc.sendline("") - client.boot_linaro_android_image() + try: + client.boot_linaro_android_image() + except: + raise CriticalError("Failed to boot test image.") class cmd_boot_linaro_image(BaseAction): - """ Call client code to boot to the master image + """ Call client code to boot to the test image """ def run(self): client = self.client @@ -43,7 +47,7 @@ client.boot_linaro_image() except: status = 'fail' - raise + raise CriticalError("Failed to boot test image.") finally: self.context.test_data.add_result("boot_image", status) === modified file 'lava_dispatcher/actions/deploy.py' --- lava_dispatcher/actions/deploy.py 2011-09-15 08:39:32 +0000 +++ lava_dispatcher/actions/deploy.py 2011-09-16 02:37:57 +0000 @@ -170,9 +170,13 @@ client.run_cmd_master('udevadm trigger') client.run_cmd_master('mkdir -p /mnt/root') client.run_cmd_master('mount /dev/disk/by-label/testrootfs /mnt/root') - client.run_cmd_master( + rc = client.run_cmd_master( 'wget -qO- %s |tar --numeric-owner -C /mnt/root -xzf -' % rootfs, timeout=3600) + if rc != 0: + msg = "Deploy test rootfs partition: failed to download tarball." + raise OperationFailed(msg) + client.run_cmd_master('echo linaro > /mnt/root/etc/hostname') #DO NOT REMOVE - diverting flash-kernel and linking it to /bin/true #prevents a serious problem where packages getting installed that @@ -191,8 +195,11 @@ client.run_cmd_master('udevadm trigger') client.run_cmd_master('mkdir -p /mnt/boot') client.run_cmd_master('mount /dev/disk/by-label/testboot /mnt/boot') - client.run_cmd_master( + rc = client.run_cmd_master( 'wget -qO- %s |tar --numeric-owner -C /mnt/boot -xzf -' % bootfs) + if rc != 0: + msg = "Deploy test boot partition: failed to download tarball." + raise OperationFailed(msg) client.run_cmd_master('umount /mnt/boot') def refresh_hwpack(self, kernel_matrix, hwpack, use_cache=True): === modified file 'lava_dispatcher/actions/lava-test.py' --- lava_dispatcher/actions/lava-test.py 2011-09-14 16:05:43 +0000 +++ lava_dispatcher/actions/lava-test.py 2011-09-16 02:37:57 +0000 @@ -23,9 +23,7 @@ from datetime import datetime import traceback from lava_dispatcher.actions import BaseAction -from lava_dispatcher.client import OperationFailed - - +from lava_dispatcher.client import OperationFailed, CriticalError def _setup_testrootfs(client): #Make sure in master image @@ -54,7 +52,6 @@ client.run_cmd_master('umount /mnt/root') - def _install_lava_test(client): #install bazaar in tester image client.run_cmd_master( @@ -75,7 +72,7 @@ except: tb = traceback.format_exc() client.sio.write(tb) - raise OperationFailed("lava-test deployment failed") + raise CriticalError("lava-test deployment failed") class cmd_lava_test_run(BaseAction):