← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~smoser/maas/1.2.iscsi-root-equal into lp:maas/1.2

 

Scott Moser has proposed merging lp:~smoser/maas/1.2.iscsi-root-equal into lp:maas/1.2.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~smoser/maas/1.2.iscsi-root-equal/+merge/146447

Backport revision 1428. fixes 1075313.
-- 
https://code.launchpad.net/~smoser/maas/1.2.iscsi-root-equal/+merge/146447
Your team MAAS Maintainers is requested to review the proposed merge of lp:~smoser/maas/1.2.iscsi-root-equal into lp:maas/1.2.
=== modified file 'src/provisioningserver/kernel_opts.py'
--- src/provisioningserver/kernel_opts.py	2012-11-08 09:14:58 +0000
+++ src/provisioningserver/kernel_opts.py	2013-02-04 15:52:32 +0000
@@ -124,19 +124,20 @@
     """Return the list of the purpose-specific kernel options."""
     if params.purpose == "commissioning":
         # These are kernel parameters read by the ephemeral environment.
+        tname = "%s:%s" % (ISCSI_TARGET_NAME_PREFIX,
+                           get_ephemeral_name(params.release, params.arch))
         return [
             # Read by the open-iscsi initramfs code.
-            "iscsi_target_name=%s:%s" % (
-                ISCSI_TARGET_NAME_PREFIX,
-                get_ephemeral_name(params.release, params.arch)),
+            "iscsi_target_name=%s" % tname,
             "iscsi_target_ip=%s" % params.fs_host,
             "iscsi_target_port=3260",
             "iscsi_initiator=%s" % params.hostname,
             # Read by cloud-initramfs-dyn-netconf and klibc's ipconfig
             # in the initramfs.
             "ip=::::%s:BOOTIF" % params.hostname,
-            # cloud-images have this filesystem label.
-            "ro root=LABEL=cloudimg-rootfs",
+            # kernel / udev name iscsi devices with this path
+            "ro root=/dev/disk/by-path/ip-%s:%s-iscsi-%s-lun-1" % (
+                params.fs_host, "3260", tname),
             # Read by overlayroot package.
             "overlayroot=tmpfs",
             # Read by cloud-init.

=== modified file 'src/provisioningserver/tests/test_kernel_opts.py'
--- src/provisioningserver/tests/test_kernel_opts.py	2012-11-08 09:14:58 +0000
+++ src/provisioningserver/tests/test_kernel_opts.py	2013-02-04 15:52:32 +0000
@@ -128,7 +128,7 @@
         self.assertThat(
             cmdline,
             ContainsAll([
-                "root=LABEL=cloudimg-rootfs",
+                "root=/dev/disk/by-path/ip-",
                 "iscsi_initiator=",
                 "overlayroot=tmpfs",
                 "ip=::::%s:BOOTIF" % params.hostname]))


Follow ups