← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~smoser/maas/maas-hostname-kludge into lp:maas

 

Scott Moser has proposed merging lp:~smoser/maas/maas-hostname-kludge into lp:maas.

Commit message:
temporary kludge: add 'hostname' to the commissioning kernel cmdline

This is a kludge to get us around the inability to use:
 ip=::::$hostname
as we'd like to in order to solve LP: #1046405.

After we have updated ephemeral images released that have
cloud-initramfs-dyn-netconf installed, we will be able to
replace:
 ip=dhcp hostname=$hostname
with
 ip=::::$hostname:BOOTIF

which will make ipconfig from klibc use the specified hostname
but only attempt to bring up the specific mac address specified
by BOOTIF.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~smoser/maas/maas-hostname-kludge/+merge/126258

add 'hostname' to the commissioning kernel command line

This is a kludge to get us around the inability to use:
 ip=::::$hostname
as we'd like to in order to solve LP: #1046405.

After we have updated ephemeral images released that have
cloud-initramfs-dyn-netconf installed, we will be able to
replace:
 ip=dhcp hostname=$hostname
with
 ip=::::$hostname:BOOTIF

which will make ipconfig from klibc use the specified hostname
but only attempt to bring up the specific mac address specified
by BOOTIF.

-- 
https://code.launchpad.net/~smoser/maas/maas-hostname-kludge/+merge/126258
Your team MAAS Maintainers is requested to review the proposed merge of lp:~smoser/maas/maas-hostname-kludge into lp:maas.
=== modified file 'src/provisioningserver/kernel_opts.py'
--- src/provisioningserver/kernel_opts.py	2012-09-18 20:47:18 +0000
+++ src/provisioningserver/kernel_opts.py	2012-09-25 14:34:30 +0000
@@ -119,8 +119,13 @@
             "iscsi_target_ip=%s" % params.fs_host,
             "iscsi_target_port=3260",
             "iscsi_initiator=%s" % params.hostname,
+            ## TODO(smoser): remove hostname after an ephemeral image is
+            ## released with cloud-initramfs-dyn-netconf. see LP: #1046405 for
+            ## more info. instead use the updated 'ip=' line below.
+            "hostname=%s" % params.hostname,
             # Read by klibc 'ipconfig' in initramfs.
-            "ip=dhcp",
+            "ip=dhcp",  # TODO(smoser) remove this
+            # "ip=::::%s:BOOTIF" % hostname, # TODO(smoser) use this
             # cloud-images have this filesystem label.
             "ro root=LABEL=cloudimg-rootfs",
             # Read by overlayroot package.

=== modified file 'src/provisioningserver/tests/test_kernel_opts.py'
--- src/provisioningserver/tests/test_kernel_opts.py	2012-09-18 22:53:25 +0000
+++ src/provisioningserver/tests/test_kernel_opts.py	2012-09-25 14:34:30 +0000
@@ -126,6 +126,8 @@
                 "iscsi_initiator=",
                 "overlayroot=tmpfs",
                 "ip=dhcp"]))
+        # TODO(smoser) after newer ephemeral image is released, replace
+        # "ip=dhcp" with: "ip=::::%s:BOOTIF" % params.hostname
 
     def test_compose_kernel_command_line_inc_common_opts(self):
         # Test that some kernel arguments appear on both commissioning


Follow ups