Merge lp:~zyga/lava-dispatcher/preassign-uuids into lp:lava-dispatcher

Proposed by Zygmunt Krynicki
Status: Rejected
Rejected by: Neil Williams
Proposed branch: lp:~zyga/lava-dispatcher/preassign-uuids
Merge into: lp:lava-dispatcher
Diff against target: 48 lines (+14/-5)
2 files modified
doc/changes.rst (+5/-0)
lava_dispatcher/actions/lava-test.py (+9/-5)
To merge this branch: bzr merge lp:~zyga/lava-dispatcher/preassign-uuids
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Review via email: mp+109085@code.launchpad.net

Description of the change

This branch changes how uuids for test runs are generated. Instead of depending
on lava-test on a test device (which can have unreliable real time clock and
mac address) those ids are generated and provided by the dispatcher.

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

+1

review: Approve

Unmerged revisions

320. By Zygmunt Krynicki

Pre-assign analyzer_assigned_uuid from the dispatcher to work around unreliable
clock and mac address on a test device.

319. By Zygmunt Krynicki

Separate parts of the command that is used to start lava-test run for easier
manipulation.

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-06-07 05:31:04 +0000
3+++ doc/changes.rst 2012-06-07 08:39:20 +0000
4@@ -8,6 +8,11 @@
5
6 * Unreleased.
7
8+* Pre-assign ``analyzer_assigned_uuid`` for the tests that are invoked on the
9+ device. This way we don't depend on potentially unreliable timestamp and mac
10+ address on the test device. This fixes launchpad bug
11+ https://bugs.launchpad.net/lava-dispatcher/+bug/934164
12+
13 .. _version_0_12:
14
15 Version 0.12
16
17=== modified file 'lava_dispatcher/actions/lava-test.py'
18--- lava_dispatcher/actions/lava-test.py 2012-05-23 04:03:59 +0000
19+++ lava_dispatcher/actions/lava-test.py 2012-06-07 08:39:20 +0000
20@@ -21,6 +21,7 @@
21 # with this program; if not, see <http://www.gnu.org/licenses>.
22
23 import logging
24+import uuid
25
26 from lava_dispatcher.actions import BaseAction
27 from lava_dispatcher.client.base import OperationFailed
28@@ -77,12 +78,15 @@
29 session.run('mkdir -p %s' % self.context.lava_result_dir)
30 session.export_display()
31 bundle_name = generate_bundle_file_name(test_name)
32+ cmd = [
33+ 'lava-test', 'run', test_name,
34+ '-o', "{0}/{1}".format(self.context.lava_result_dir, bundle_name),
35+ '--analyzer-assigned-uuid={0}'.format(uuid.uuid1()),
36+ ]
37 if test_options != "":
38- test_options = "-t '%s'" % test_options
39-
40- cmd = ('lava-test run %s %s -o %s/%s.bundle' % (
41- test_name, test_options, self.context.lava_result_dir,
42- bundle_name))
43+ # FIXME: proper shell quoting for test_options
44+ cmd += ['-t', "'%s'" % test_options]
45+ cmd = ' '.join(cmd)
46 try:
47 rc = session.run(cmd, timeout=timeout)
48 except:

Subscribers

People subscribed via source and target branches