Merge lp:~qzhang/lava-dispatcher/add-tester_hostname into lp:lava-dispatcher

Proposed by Spring Zhang
Status: Merged
Merged at revision: 362
Proposed branch: lp:~qzhang/lava-dispatcher/add-tester_hostname
Merge into: lp:lava-dispatcher
Diff against target: 89 lines (+17/-5)
6 files modified
doc/changes.rst (+4/-2)
lava_dispatcher/client/base.py (+4/-0)
lava_dispatcher/client/fastmodel.py (+2/-1)
lava_dispatcher/client/master.py (+2/-1)
lava_dispatcher/client/qemu.py (+2/-1)
lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf (+3/-0)
To merge this branch: bzr merge lp:~qzhang/lava-dispatcher/add-tester_hostname
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Review via email: mp+117752@code.launchpad.net

Description of the change

There is a requirement from community that user can define a different test image hostname other than "linaro".
The patch finishes master, qemu, fastmodel client.

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

thanks this should also help with bug: 1028512

review: Approve
363. By Spring Zhang

include bug fix info

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/changes.rst'
2--- doc/changes.rst 2012-07-22 22:11:31 +0000
3+++ doc/changes.rst 2012-08-02 02:35:23 +0000
4@@ -1,11 +1,13 @@
5 Version History
6 ***************
7
8-.. _version_0_15:
9+.. _version_0_16:
10
11 Version 0.16
12 ============
13-* Unreleased
14+* UnReleased
15+* Fix #1028512, provide test image hostname custom option: tester_hostname.
16+* Fix #1019630, possibility to set proxy error when sending serial port command.
17
18 .. _version_0_15_2:
19
20
21=== modified file 'lava_dispatcher/client/base.py'
22--- lava_dispatcher/client/base.py 2012-08-01 15:41:23 +0000
23+++ lava_dispatcher/client/base.py 2012-08-02 02:35:23 +0000
24@@ -288,6 +288,10 @@
25 return self.device_option("hostname")
26
27 @property
28+ def tester_hostname(self):
29+ return self.device_option("tester_hostname", "linaro")
30+
31+ @property
32 def tester_str(self):
33 return self.device_option("TESTER_STR")
34
35
36=== modified file 'lava_dispatcher/client/fastmodel.py'
37--- lava_dispatcher/client/fastmodel.py 2012-07-24 03:59:15 +0000
38+++ lava_dispatcher/client/fastmodel.py 2012-08-02 02:35:23 +0000
39@@ -93,7 +93,8 @@
40
41 def _customize_ubuntu(self):
42 with image_partition_mounted(self._sd_image, self.root_part) as mntdir:
43- logging_system('sudo echo linaro > %s/etc/hostname' % mntdir)
44+ logging_system('sudo echo %s > %s/etc/hostname'
45+ % (self.tester_hostname, mntdir)
46
47 def deploy_image(self, image, axf, is_android=False):
48 self._axf = download_image(axf, self.context)
49
50=== modified file 'lava_dispatcher/client/master.py'
51--- lava_dispatcher/client/master.py 2012-07-27 12:15:47 +0000
52+++ lava_dispatcher/client/master.py 2012-08-02 02:35:23 +0000
53@@ -114,7 +114,8 @@
54 # another hour to err on the side of caution.
55 _deploy_tarball_to_board(session, rootfs, '/mnt/root', timeout=18000)
56
57- session.run('echo linaro > /mnt/root/etc/hostname')
58+ session.run('echo %s > /mnt/root/etc/hostname'
59+ % session._client.tester_hostname)
60 #DO NOT REMOVE - diverting flash-kernel and linking it to /bin/true
61 #prevents a serious problem where packages getting installed that
62 #call flash-kernel can update the kernel on the master image
63
64=== modified file 'lava_dispatcher/client/qemu.py'
65--- lava_dispatcher/client/qemu.py 2012-07-21 22:56:42 +0000
66+++ lava_dispatcher/client/qemu.py 2012-08-02 02:35:23 +0000
67@@ -56,7 +56,8 @@
68 image_file = download_image(image, self.context)
69 self._lava_image = image_file
70 with image_partition_mounted(self._lava_image, self.root_part) as mntdir:
71- logging_system('echo linaro > %s/etc/hostname' % mntdir)
72+ logging_system('echo %s > %s/etc/hostname' % (self.tester_hostname,
73+ mntdir))
74
75 @contextlib.contextmanager
76 def _mnt_prepared_for_qemu(self, mntdir):
77
78=== modified file 'lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf'
79--- lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf 2012-07-07 05:37:29 +0000
80+++ lava_dispatcher/default-config/lava-dispatcher/device-defaults.conf 2012-08-02 02:35:23 +0000
81@@ -81,6 +81,9 @@
82 # Master image recognization string
83 MASTER_STR = root@master
84
85+# Test image hostname, set blank to get default value "linaro"
86+tester_hostname =
87+
88 # Test image recognization string
89 TESTER_STR = root@linaro
90

Subscribers

People subscribed via source and target branches