Merge lp:~smoser/maas/trunk-remove-hostname-kludge into lp:~maas-committers/maas/trunk

Proposed by Scott Moser
Status: Merged
Approved by: Scott Moser
Approved revision: no longer in the source branch.
Merged at revision: 1137
Proposed branch: lp:~smoser/maas/trunk-remove-hostname-kludge
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 42 lines (+5/-10)
2 files modified
src/provisioningserver/kernel_opts.py (+4/-7)
src/provisioningserver/tests/test_kernel_opts.py (+1/-3)
To merge this branch: bzr merge lp:~smoser/maas/trunk-remove-hostname-kludge
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Jeroen T. Vermeulen Pending
Review via email: mp+127571@code.launchpad.net

Commit message

start using ip=::::<hostname>:BOOTIF again

The released version of precise image (20101001) now has suitable
cloud-initramfs-dyn-netconf to turn:
 ip=::::<hostname>:BOOTIF
into
 ip=::::<hostname>:eth0

This lets us tell the initramfs dhcp client (ipconfig) to request the
given hostname, and to explicitly only attempt dhcp on the boot interface.

This is basically a revert of revno 1079.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

Looks good, but

- ] + compose_hostname_opts(params)

I think this got lost by accident. It was added only yesterday, by jtv, to pass the correct domain (and hostname, so maybe that needs modification).

review: Needs Fixing
Revision history for this message
Scott Moser (smoser) wrote :

It did not get lost.
I removed it as I explicitly want only 'hostname' there.

Revision history for this message
Scott Moser (smoser) wrote :

oh yeah, and I explicitly removed it in cleanup a while ago.
there was (and is) no justification for having that on the ephemeral/enlistment command line.

Revision history for this message
Gavin Panella (allenap) wrote :

Okay, approved to unblock you, so you can land, but I'm going to add jtv as a reviewer so he gets a chance to chip in.

review: Approve
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

This leaves only one call site for compose_hostname_opts, and there, domain is always going to be set so the function doesn't get to do much interesting work. We might as well get rid of it then.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/kernel_opts.py'
2--- src/provisioningserver/kernel_opts.py 2012-10-01 08:39:59 +0000
3+++ src/provisioningserver/kernel_opts.py 2012-10-02 18:57:21 +0000
4@@ -132,19 +132,16 @@
5 "iscsi_target_ip=%s" % params.fs_host,
6 "iscsi_target_port=3260",
7 "iscsi_initiator=%s" % params.hostname,
8- # Read by klibc 'ipconfig' in initramfs.
9- "ip=dhcp", # TODO(smoser) remove this
10- # "ip=::::%s:BOOTIF" % params.hostname, # TODO(smoser) use this
11+ # Read by cloud-initramfs-dyn-netconf and klibc's ipconfig
12+ # in the initramfs.
13+ "ip=::::%s:BOOTIF" % params.hostname,
14 # cloud-images have this filesystem label.
15 "ro root=LABEL=cloudimg-rootfs",
16 # Read by overlayroot package.
17 "overlayroot=tmpfs",
18 # Read by cloud-init.
19 "cloud-config-url=%s" % params.preseed_url,
20- ## TODO(smoser): remove hostname after an ephemeral image is
21- ## released with cloud-initramfs-dyn-netconf. see LP: #1046405 for
22- ## more info. instead use the updated 'ip=' line above.
23- ] + compose_hostname_opts(params)
24+ ]
25 else:
26 # These are options used by the Debian Installer.
27 return [
28
29=== modified file 'src/provisioningserver/tests/test_kernel_opts.py'
30--- src/provisioningserver/tests/test_kernel_opts.py 2012-10-01 20:25:17 +0000
31+++ src/provisioningserver/tests/test_kernel_opts.py 2012-10-02 18:57:21 +0000
32@@ -131,9 +131,7 @@
33 "root=LABEL=cloudimg-rootfs",
34 "iscsi_initiator=",
35 "overlayroot=tmpfs",
36- "ip=dhcp"]))
37- # TODO(smoser) after newer ephemeral image is released, replace
38- # "ip=dhcp" with: "ip=::::%s:BOOTIF" % params.hostname
39+ "ip=::::%s:BOOTIF" % params.hostname]))
40
41 def test_compose_kernel_command_line_inc_common_opts(self):
42 # Test that some kernel arguments appear on both commissioning