Merge lp:~andreserl/maas/lp_1459865 into lp:~maas-committers/maas/trunk

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 4182
Proposed branch: lp:~andreserl/maas/lp_1459865
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 36 lines (+14/-1)
2 files modified
src/provisioningserver/kernel_opts.py (+1/-1)
src/provisioningserver/tests/test_kernel_opts.py (+13/-0)
To merge this branch: bzr merge lp:~andreserl/maas/lp_1459865
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Blake Rouse (community) Approve
Review via email: mp+267836@code.launchpad.net

Commit message

Fix LP: #1459865: Fix enlistment by ensuring correct kernel parameters are being passed.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Adjust the if and a test would be nice for this.

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve
Revision history for this message
Christian Reis (kiko) wrote :

No test?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/provisioningserver/kernel_opts.py'
--- src/provisioningserver/kernel_opts.py 2015-07-09 13:38:56 +0000
+++ src/provisioningserver/kernel_opts.py 2015-08-12 16:33:34 +0000
@@ -127,7 +127,7 @@
127127
128def compose_purpose_opts(params):128def compose_purpose_opts(params):
129 """Return the list of the purpose-specific kernel options."""129 """Return the list of the purpose-specific kernel options."""
130 if params.purpose == "commissioning" or params.purpose == "xinstall":130 if params.purpose in ["commissioning", "xinstall", "enlist"]:
131 # These are kernel parameters read by the ephemeral environment.131 # These are kernel parameters read by the ephemeral environment.
132 tname = prefix_target_name(132 tname = prefix_target_name(
133 get_ephemeral_name(133 get_ephemeral_name(
134134
=== modified file 'src/provisioningserver/tests/test_kernel_opts.py'
--- src/provisioningserver/tests/test_kernel_opts.py 2015-07-09 13:38:56 +0000
+++ src/provisioningserver/tests/test_kernel_opts.py 2015-08-12 16:33:34 +0000
@@ -216,6 +216,19 @@
216 "overlayroot=tmpfs",216 "overlayroot=tmpfs",
217 "ip=::::%s:BOOTIF" % params.hostname]))217 "ip=::::%s:BOOTIF" % params.hostname]))
218218
219 def test_enlist_compose_kernel_command_line_inc_purpose_opts(self):
220 # The result of compose_kernel_command_line includes the purpose
221 # options for a non "commissioning" node.
222 params = self.make_kernel_parameters(purpose="enlist")
223 cmdline = compose_kernel_command_line(params)
224 self.assertThat(
225 cmdline,
226 ContainsAll([
227 "root=/dev/disk/by-path/ip-",
228 "iscsi_initiator=",
229 "overlayroot=tmpfs",
230 "ip=::::%s:BOOTIF" % params.hostname]))
231
219 def test_commissioning_compose_kernel_command_line_inc_extra_opts(self):232 def test_commissioning_compose_kernel_command_line_inc_extra_opts(self):
220 mock_get_curtin_sep = self.patch(233 mock_get_curtin_sep = self.patch(
221 kernel_opts, 'get_curtin_kernel_cmdline_sep')234 kernel_opts, 'get_curtin_kernel_cmdline_sep')