[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 145: Added more deploy logging for Android

Message ID 20111020182712.12182.92673.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Paul Larson Oct. 20, 2011, 6:27 p.m.
Merge authors:
  Le Chi Thu le.chi.thu@linaro.org <le.chi.thu@linaro.org>
Related merge proposals:
  https://code.launchpad.net/~le-chi-thu/lava-dispatcher/add_more_logging_android/+merge/79796
  proposed by: Le Chi Thu (le-chi-thu)
  review: Approve - Paul Larson (pwlars)
  review: Approve - Yongqin Liu (liuyq0307)
------------------------------------------------------------
revno: 145 [merge]
committer: Paul Larson <paul.larson@canonical.com>
branch nick: lava-dispatcher
timestamp: Thu 2011-10-20 13:24:55 -0500
message:
  Added more deploy logging for Android
modified:
  lava_dispatcher/actions/android_deploy.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

Patch

=== modified file 'lava_dispatcher/actions/android_deploy.py'
--- lava_dispatcher/actions/android_deploy.py	2011-09-27 09:45:20 +0000
+++ lava_dispatcher/actions/android_deploy.py	2011-10-20 18:24:55 +0000
@@ -34,14 +34,14 @@ 
         LAVA_IMAGE_TMPDIR = self.context.lava_image_tmpdir
         LAVA_IMAGE_URL = self.context.lava_image_url
         client = self.client
-        logging.info("deploying Android on %s" % client.hostname)
+        logging.info("Deploying Android on %s" % client.hostname)
         logging.info("  boot: %s" % boot)
         logging.info("  system: %s" % system)
         logging.info("  data: %s" % data)
         logging.info("Booting master image")
         client.boot_master_image()
 
-        logging.info("Waiting for network to come up")
+        logging.info("Waiting for network to come up...")
         try:
             client.wait_network_up()
         except:
@@ -85,6 +85,7 @@ 
             raise CriticalError("Android deployment failed")
         finally:
             shutil.rmtree(self.tarball_dir)
+            logging.info("Android image deployment exiting")
 
     def download_tarballs(self, boot_url, system_url, data_url, pkg_url=None,
             use_cache=True):
@@ -101,6 +102,7 @@ 
         self.tarball_dir = mkdtemp(dir=LAVA_IMAGE_TMPDIR)
         tarball_dir = self.tarball_dir
         os.chmod(tarball_dir, 0755)
+        logging.info("Downloading the image files")
 
         if use_cache:
             boot_path = download_with_cache(boot_url, tarball_dir, lava_cachedir)
@@ -118,9 +120,11 @@ 
                 pkg_path = download(pkg_url, tarball_dir)
             else:
                 pkg_path = None
+        logging.info("Downloaded the image files")
         return  boot_path, system_path, data_path, pkg_path
 
     def deploy_linaro_android_testboot(self, boottbz2, pkgbz2=None):
+        logging.info("Deploying test boot filesystem")
         client = self.client
         client.run_cmd_master('mkfs.vfat /dev/disk/by-label/testboot '
                               '-n testboot')
@@ -139,6 +143,7 @@ 
         client.run_cmd_master('umount /mnt/lava/boot')
 
     def recreate_uInitrd(self):
+        logging.info("Recreate uInitrd")
         client = self.client
         client.run_cmd_master('mkdir -p ~/tmp/')
         client.run_cmd_master('mv /mnt/lava/boot/uInitrd ~/tmp')
@@ -169,6 +174,7 @@ 
         client.run_cmd_master('rm -rf ~/tmp')
 
     def deploy_linaro_android_testrootfs(self, systemtbz2):
+        logging.info("Deploying the test root filesystem")
         client = self.client
         client.run_cmd_master(
             'mkfs.ext4 -q /dev/disk/by-label/testrootfs -L testrootfs')
@@ -187,11 +193,13 @@ 
         client.run_cmd_master('umount /mnt/lava/system')
 
     def purge_linaro_android_sdcard(self):
+        logging.info("Reformatting Linaro Android sdcard filesystem")
         client = self.client
         client.run_cmd_master('mkfs.vfat /dev/disk/by-label/sdcard -n sdcard')
         client.run_cmd_master('udevadm trigger')
 
     def deploy_linaro_android_system(self, systemtbz2):
+        logging.info("Deploying the Android system")
         client = self.client
         client.run_cmd_master('mkfs.ext4 -q /dev/disk/by-label/system -L system')
         client.run_cmd_master('udevadm trigger')
@@ -203,6 +211,7 @@ 
         client.run_cmd_master('umount /mnt/lava/system')
 
     def deploy_linaro_android_data(self, datatbz2):
+        logging.info("Deploying the Android data")
         client = self.client
         client.run_cmd_master('mkfs.ext4 -q /dev/disk/by-label/data -L data')
         client.run_cmd_master('udevadm trigger')