From patchwork Fri Oct 14 05:18:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spring Zhang X-Patchwork-Id: 4671 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 5DC3823E51 for ; Fri, 14 Oct 2011 05:18:15 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 46ED5A18740 for ; Fri, 14 Oct 2011 05:18:15 +0000 (UTC) Received: by eyg5 with SMTP id 5so1093003eyg.11 for ; Thu, 13 Oct 2011 22:18:15 -0700 (PDT) Received: by 10.223.17.3 with SMTP id q3mr1713717faa.28.1318569495028; Thu, 13 Oct 2011 22:18: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.24.41 with SMTP id r9cs1538laf; Thu, 13 Oct 2011 22:18:14 -0700 (PDT) Received: by 10.216.135.145 with SMTP id u17mr954534wei.85.1318569493767; Thu, 13 Oct 2011 22:18:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id y2si2097806wec.51.2011.10.13.22.18.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Oct 2011 22:18:13 -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 1REa9t-0003R1-08 for ; Fri, 14 Oct 2011 05:18:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id E7EBDE0996 for ; Fri, 14 Oct 2011 05:18:12 +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: 132 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 132: Format test partitions at the beginning of deployment Message-Id: <20111014051812.8436.32768.launchpad@ackee.canonical.com> Date: Fri, 14 Oct 2011 05:18:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14124"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: bac9bc4a3dcd20ebdb61629fb85613931852d9b8 Merge authors: Spring Zhang (qzhang) Related merge proposals: https://code.launchpad.net/~qzhang/lava-dispatcher/fix-867858/+merge/78704 proposed by: Spring Zhang (qzhang) review: Approve - Paul Larson (pwlars) review: Resubmit - Spring Zhang (qzhang) ------------------------------------------------------------ revno: 132 [merge] committer: Spring Zhang branch nick: fix-867858 timestamp: Fri 2011-10-14 13:04:20 +0800 message: Format test partitions at the beginning of deployment modified: lava_dispatcher/actions/deploy.py lava_dispatcher/actions/launch_control.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/deploy.py' --- lava_dispatcher/actions/deploy.py 2011-09-28 17:57:03 +0000 +++ lava_dispatcher/actions/deploy.py 2011-10-14 05:04:20 +0000 @@ -42,6 +42,7 @@ logging.info(" package: %s" % kernel_matrix[0]) logging.info("Booting master image") client.boot_master_image() + self._format_testpartition() logging.info("Waiting for network to come up") try: @@ -83,6 +84,16 @@ finally: shutil.rmtree(self.tarball_dir) + def _format_testpartition(self): + client = self.client + logging.info("Format testboot and testrootfs partitions") + client.run_cmd_master('umount /dev/disk/by-label/testrootfs') + client.run_cmd_master( + 'mkfs.ext3 -q /dev/disk/by-label/testrootfs -L testrootfs') + client.run_cmd_master('umount /dev/disk/by-label/testboot') + client.run_cmd_master( + 'mkfs.vfat /dev/disk/by-label/testboot -n testboot') + def _get_partition_offset(self, image, partno): cmd = 'parted %s -m -s unit b print' % image part_data = getoutput(cmd) @@ -173,9 +184,6 @@ def deploy_linaro_rootfs(self, rootfs): client = self.client logging.info("Deploying linaro image") - client.run_cmd_master('umount /dev/disk/by-label/testrootfs') - client.run_cmd_master( - 'mkfs.ext3 -q /dev/disk/by-label/testrootfs -L testrootfs') 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') @@ -199,9 +207,6 @@ def deploy_linaro_bootfs(self, bootfs): client = self.client logging.info("Deploying linaro bootfs") - client.run_cmd_master('umount /dev/disk/by-label/testboot') - client.run_cmd_master( - 'mkfs.vfat /dev/disk/by-label/testboot -n testboot') 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') === modified file 'lava_dispatcher/actions/launch_control.py' --- lava_dispatcher/actions/launch_control.py 2011-10-10 10:19:45 +0000 +++ lava_dispatcher/actions/launch_control.py 2011-10-13 09:28:22 +0000 @@ -113,13 +113,19 @@ client.run_cmd_master('mkdir -p /mnt/root') client.run_cmd_master( 'mount /dev/disk/by-label/%s /mnt/root' % result_disk) + # Clean results directory on master image + client.run_cmd_master( + 'rm -rf /tmp/lava_results.tgz /tmp/%s' % self.context.lava_result_dir) client.run_cmd_master('mkdir -p /tmp/%s' % self.context.lava_result_dir) client.run_cmd_master( 'cp /mnt/root/%s/*.bundle /tmp/%s' % (self.context.lava_result_dir, self.context.lava_result_dir)) + # Clean result bundle on test image + client.run_cmd_master( + 'rm -f /mnt/root/%s/*.bundle' % (self.context.lava_result_dir)) client.run_cmd_master('umount /mnt/root') - #Create tarball of all results + # Create tarball of all results logging.info("Creating lava results tarball") client.run_cmd_master('cd /tmp') client.run_cmd_master(