Merge lp:~codehelp/lava-dispatcher/multinode-pending-auth into lp:lava-dispatcher/multinode

Proposed by Neil Williams
Status: Merged
Approved by: Neil Williams
Approved revision: 688
Merged at revision: 689
Proposed branch: lp:~codehelp/lava-dispatcher/multinode-pending-auth
Merge into: lp:lava-dispatcher/multinode
Diff against target: 52 lines (+5/-5)
2 files modified
lava_dispatcher/actions/launch_control.py (+2/-2)
lava_dispatcher/job.py (+3/-3)
To merge this branch: bzr merge lp:~codehelp/lava-dispatcher/multinode-pending-auth
Reviewer Review Type Date Requested Status
Antonio Terceiro Approve
Review via email: mp+181781@code.launchpad.net

Description of the change

This is the complementary change to the same merge proposal into lava-dashboard, supplying the stream parameter down to put_pending so that the authentication can be checked. Ensure that the lava-dashboard change is applied first.

To post a comment you must log in.
Revision history for this message
Antonio Terceiro (terceiro) wrote :

looks good to me

 review approve

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/launch_control.py'
2--- lava_dispatcher/actions/launch_control.py 2013-08-16 11:14:45 +0000
3+++ lava_dispatcher/actions/launch_control.py 2013-08-23 10:39:48 +0000
4@@ -255,7 +255,7 @@
5 logging.warning("Fault string: %s" % err.faultString)
6 raise OperationFailed("could not push to dashboard")
7
8- def submit_pending(self, bundle, server, token, group_name):
9+ def submit_pending(self, bundle, server, stream, token, group_name):
10 """ Called from the dispatcher job when a MultiNode job requests to
11 submit results but the job does not have sub_id zero. The bundle is
12 cached in the dashboard until the coordinator allows sub_id zero to
13@@ -270,7 +270,7 @@
14 json_bundle = json.dumps(bundle)
15 try:
16 # make the put_pending xmlrpc call to store the bundle in the dashboard until the group is complete.
17- result = dashboard.put_pending(json_bundle, group_name)
18+ result = dashboard.put_pending(json_bundle, stream, group_name)
19 print >> self.context.oob_file, "dashboard-put-pending:", result
20 logging.info("Dashboard: bundle %s is pending in %s" % (result, group_name))
21 except xmlrpclib.Fault, err:
22
23=== modified file 'lava_dispatcher/job.py'
24--- lava_dispatcher/job.py 2013-08-20 15:39:29 +0000
25+++ lava_dispatcher/job.py 2013-08-23 10:39:48 +0000
26@@ -24,7 +24,7 @@
27 import time
28 import traceback
29 import hashlib
30-
31+import simplejson
32 from json_schema_validator.schema import Schema
33 from json_schema_validator.validator import Validator
34
35@@ -382,7 +382,7 @@
36 bundle = action.collect_bundles(**params)
37 # catch parse errors in bundles
38 try:
39- bundle_str = json.dumps(bundle)
40+ bundle_str = simplejson.dumps(bundle)
41 except Exception as e:
42 logging.error("Unable to parse bundle '%s' - %s" % (bundle, e))
43 transport(json.dumps(base_msg))
44@@ -395,7 +395,7 @@
45 # and then the reply is the full list of bundle checksums.
46 if reply == "ack":
47 # coordinator has our checksum for this bundle, submit as pending to launch_control
48- action.submit_pending(bundle, params['server'], token, group_name)
49+ action.submit_pending(bundle, params['server'], params['stream'], token, group_name)
50 logging.info("Result bundle %s has been submitted to Dashboard as pending." % base_msg['bundle'])
51 return
52 elif reply == "nack":

Subscribers

People subscribed via source and target branches

to status/vote changes: