Merge lp:~le-chi-thu/lava-dispatcher/add_more_logging_android into lp:lava-dispatcher

Proposed by Le Chi Thu
Status: Merged
Merged at revision: 145
Proposed branch: lp:~le-chi-thu/lava-dispatcher/add_more_logging_android
Merge into: lp:lava-dispatcher
Diff against target: 94 lines (+12/-2)
1 file modified
lava_dispatcher/actions/android_deploy.py (+12/-2)
To merge this branch: bzr merge lp:~le-chi-thu/lava-dispatcher/add_more_logging_android
Reviewer Review Type Date Requested Status
Paul Larson (community) Approve
Yongqin Liu Approve
Review via email: mp+79796@code.launchpad.net

Description of the change

Added more android deployment logging

To post a comment you must log in.
Revision history for this message
Yongqin Liu (liuyq0307) wrote :

Thanks

review: Approve
Revision history for this message
Paul Larson (pwlars) wrote :

25 + logging.info("About to handle with the build")
This one is a bit redundant since we have other messages in download_tarballs

Otherwise, I just tweaked the messages a bit.
Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/actions/android_deploy.py'
2--- lava_dispatcher/actions/android_deploy.py 2011-09-27 09:45:20 +0000
3+++ lava_dispatcher/actions/android_deploy.py 2011-10-19 11:15:23 +0000
4@@ -34,14 +34,14 @@
5 LAVA_IMAGE_TMPDIR = self.context.lava_image_tmpdir
6 LAVA_IMAGE_URL = self.context.lava_image_url
7 client = self.client
8- logging.info("deploying Android on %s" % client.hostname)
9+ logging.info("Deploying Android on %s" % client.hostname)
10 logging.info(" boot: %s" % boot)
11 logging.info(" system: %s" % system)
12 logging.info(" data: %s" % data)
13 logging.info("Booting master image")
14 client.boot_master_image()
15
16- logging.info("Waiting for network to come up")
17+ logging.info("Waiting for network to come up...")
18 try:
19 client.wait_network_up()
20 except:
21@@ -50,6 +50,7 @@
22 raise CriticalError("Unable to reach LAVA server, check network")
23
24 try:
25+ logging.info("About to handle with the build")
26 boot_tbz2, system_tbz2, data_tbz2, pkg_tbz2 = \
27 self.download_tarballs(boot, system, data, pkg, use_cache)
28 except:
29@@ -85,6 +86,7 @@
30 raise CriticalError("Android deployment failed")
31 finally:
32 shutil.rmtree(self.tarball_dir)
33+ logging.info("Exit Android deployment.")
34
35 def download_tarballs(self, boot_url, system_url, data_url, pkg_url=None,
36 use_cache=True):
37@@ -101,6 +103,7 @@
38 self.tarball_dir = mkdtemp(dir=LAVA_IMAGE_TMPDIR)
39 tarball_dir = self.tarball_dir
40 os.chmod(tarball_dir, 0755)
41+ logging.info("Downloading the image files")
42
43 if use_cache:
44 boot_path = download_with_cache(boot_url, tarball_dir, lava_cachedir)
45@@ -118,9 +121,11 @@
46 pkg_path = download(pkg_url, tarball_dir)
47 else:
48 pkg_path = None
49+ logging.info("Downloaded the image files")
50 return boot_path, system_path, data_path, pkg_path
51
52 def deploy_linaro_android_testboot(self, boottbz2, pkgbz2=None):
53+ logging.info("Deploying the testboot")
54 client = self.client
55 client.run_cmd_master('mkfs.vfat /dev/disk/by-label/testboot '
56 '-n testboot')
57@@ -139,6 +144,7 @@
58 client.run_cmd_master('umount /mnt/lava/boot')
59
60 def recreate_uInitrd(self):
61+ logging.info("Recreate uInitrd")
62 client = self.client
63 client.run_cmd_master('mkdir -p ~/tmp/')
64 client.run_cmd_master('mv /mnt/lava/boot/uInitrd ~/tmp')
65@@ -169,6 +175,7 @@
66 client.run_cmd_master('rm -rf ~/tmp')
67
68 def deploy_linaro_android_testrootfs(self, systemtbz2):
69+ logging.info("Deploying the test root fs")
70 client = self.client
71 client.run_cmd_master(
72 'mkfs.ext4 -q /dev/disk/by-label/testrootfs -L testrootfs')
73@@ -187,11 +194,13 @@
74 client.run_cmd_master('umount /mnt/lava/system')
75
76 def purge_linaro_android_sdcard(self):
77+ logging.info("Purge Linaro Android sdcard")
78 client = self.client
79 client.run_cmd_master('mkfs.vfat /dev/disk/by-label/sdcard -n sdcard')
80 client.run_cmd_master('udevadm trigger')
81
82 def deploy_linaro_android_system(self, systemtbz2):
83+ logging.info("Deploying the Android system")
84 client = self.client
85 client.run_cmd_master('mkfs.ext4 -q /dev/disk/by-label/system -L system')
86 client.run_cmd_master('udevadm trigger')
87@@ -203,6 +212,7 @@
88 client.run_cmd_master('umount /mnt/lava/system')
89
90 def deploy_linaro_android_data(self, datatbz2):
91+ logging.info("Deploying the Android data")
92 client = self.client
93 client.run_cmd_master('mkfs.ext4 -q /dev/disk/by-label/data -L data')
94 client.run_cmd_master('udevadm trigger')

Subscribers

People subscribed via source and target branches