Merge lp:~fu-wei/lava-scheduler/lmp into lp:lava-scheduler

Proposed by Fu Wei
Status: Rejected
Rejected by: Neil Williams
Proposed branch: lp:~fu-wei/lava-scheduler/lmp
Merge into: lp:lava-scheduler
Diff against target: 42 lines (+13/-11)
1 file modified
lava_scheduler_app/utils.py (+13/-11)
To merge this branch: bzr merge lp:~fu-wei/lava-scheduler/lmp
Reviewer Review Type Date Requested Status
Neil Williams Disapprove
Review via email: mp+186348@code.launchpad.net

Description of the change

Fix the bug of LMP init value in Multi-Node 2

To post a comment you must log in.
Revision history for this message
Neil Williams (codehelp) wrote :

Merged into git.

review: Disapprove

Unmerged revisions

265. By Fu Wei

Fix the bug of LMP init value in Multi-Node 2

264. By Fu Wei

Fix the bug of LMP init value in Multi-Node

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lava_scheduler_app/utils.py'
--- lava_scheduler_app/utils.py 2013-09-17 14:59:18 +0000
+++ lava_scheduler_app/utils.py 2013-09-18 14:47:33 +0000
@@ -75,17 +75,18 @@
75 node_actions[role].append(new_action)75 node_actions[role].append(new_action)
7676
77 # For LMP init in multinode case77 # For LMP init in multinode case
78 all_lmp_modules = json_jobdata["lmp_module"]78 if "lmp_module" in json_jobdata:
79 for role in node_lmp.keys():79 all_lmp_modules = json_jobdata["lmp_module"]
80 for lmp in all_lmp_modules:80 for role in node_lmp.keys():
81 new_lmp = copy.deepcopy(lmp)81 for lmp in all_lmp_modules:
82 if 'parameters' in new_lmp \82 new_lmp = copy.deepcopy(lmp)
83 and 'role' in new_lmp["parameters"]:83 if 'parameters' in new_lmp \
84 if new_lmp["parameters"]["role"] == role:84 and 'role' in new_lmp["parameters"]:
85 new_lmp["parameters"].pop('role', None)85 if new_lmp["parameters"]["role"] == role:
86 new_lmp["parameters"].pop('role', None)
87 node_lmp[role].append(new_lmp)
88 else:
86 node_lmp[role].append(new_lmp)89 node_lmp[role].append(new_lmp)
87 else:
88 node_lmp[role].append(new_lmp)
8990
90 group_count = 091 group_count = 0
91 for clients in json_jobdata["device_group"]:92 for clients in json_jobdata["device_group"]:
@@ -106,7 +107,8 @@
106 node_json[role][c]["group_size"] = group_count107 node_json[role][c]["group_size"] = group_count
107 node_json[role][c]["target_group"] = target_group108 node_json[role][c]["target_group"] = target_group
108 node_json[role][c]["actions"] = node_actions[role]109 node_json[role][c]["actions"] = node_actions[role]
109 node_json[role][c]["lmp_module"] = node_lmp[role]110 if "lmp_module" in json_jobdata:
111 node_json[role][c]["lmp_module"] = node_lmp[role]
110112
111 node_json[role][c]["role"] = role113 node_json[role][c]["role"] = role
112 # multinode node stage 2114 # multinode node stage 2

Subscribers

People subscribed via source and target branches