fastpath install duplicates iSCSI initiator names, blocking iSCSI HW

Bug #1444992 reported by Mark Brown on 2015-04-16
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
MAAS
High
Unassigned
cloud-images
Undecided
Unassigned
curtin
Medium
Nish Aravamudan
maas-images
Medium
Unassigned
livecd-rootfs (Ubuntu)
Undecided
Unassigned

Bug Description

When using fastpath install, each host is given an identical iSCSI initiator name. This does not happen with Debian install mode. The result is HW SANs that use iSCSI get confused. This is an actual customer/partner issue at present.

It would appear to be fallout of the image based approach to installation.
The /etc/iscsi/initiatorname.iscsi file contains something like:
 ## DO NOT EDIT OR REMOVE THIS FILE!
 ## If you remove this file, the iSCSI daemon will not start.
 ## If you change the InitiatorName, existing access control lists
 ## may reject this initiator. The InitiatorName must be unique
 ## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
 InitiatorName=iqn.1993-08.org.debian:01:dcafddf1c8b

That is what gets used as the initiator, and is seemingly generated at
package-install time. It needs to be re-created
uniquely per installed host.

Related branches

Jeff Lane (bladernr) wrote :

This could become a huge issue for certification scenarios.

Mark Brown (mstevenbrown) wrote :

This could also potentially cause problems in OIL.

Gavin Panella (allenap) wrote :

This will generate a new name, rewriting initiatorname.iscsi:

  echo GenerateName=yes >> /etc/iscsi/initiatorname.iscsi
  service open-iscsi restart

Blake Rouse (blake-rouse) wrote :

This also could be done in the maas images instead of having curtin perform this action.

Changed in maas:
milestone: none → 1.8.0
status: New → Triaged
importance: Undecided → High
Changed in maas:
milestone: 1.8.0 → 1.9.0
Scott Moser (smoser) wrote :

marked this as triaged.
although i'm not really sure where it should be fixed.

Changed in curtin:
status: New → Triaged
Changed in maas-images:
status: New → Triaged
importance: Undecided → Medium
Changed in curtin:
importance: Undecided → Medium
Changed in maas:
milestone: 1.9.0 → none
Nobuto Murata (nobuto) wrote :

This affected me too. Initiator name must be unique all the time. It was hard to find this bug in the past unless we had a control on storage array side reporting duplicate initiator names. We always assumed initiator name was generated uniquely by postinst of open-iscsi package except pre-installed MAAS image.

Nobuto Murata (nobuto) wrote :

A workaround to make sure every MAAS node's IQN unique would be using late_commands of curtin:

[/etc/maas/preseeds/curtin_userdata]
...
late_commands:
  iscsi_initiator_name: curtin in-target -- sed -i -e "s|^InitiatorName=.*|InitiatorName=$(iscsi-iname -p iqn.1993-08.org.debian:01)|" /etc/iscsi/initiatorname.iscsi
  iscsi_update_initramfs: curtin in-target -- update-initramfs -u
...

Now that open-iscsi is in cloud-image as well(LP: #1511008), this issue is not MAAS image specific, and more environments would be affected.

Blake Rouse (blake-rouse) wrote :

Adding cloud-images since its now provided from cloud-images.

Nish Aravamudan (nacc) on 2016-12-15
Changed in curtin:
assignee: nobody → Nish Aravamudan (nacc)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.440

---------------
livecd-rootfs (2.440) zesty; urgency=medium

  [ Steve Langasek ]
  * live-build/ubuntu-cpc/functions: don't call sleep as part of
    umount_settle; udevadm settle is synchronous and there's no reason to
    sleep after it.
  * live-build/ubuntu-cpc/functions: umount_partition: don't call
    umount_settle for each submount; just unmount them one by one and
    settle at the end.
  * Support passing IMAGE_TARGETS in the environment, to limit which images
    are output as part of a build; particularly useful for ubuntu-cpc builds
    which output multiple image types.

  [ Nishanth Aravamudan ]
  * live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI
    Initiator Name at first iscsid run for cloud images to ensure it is
    unique (LP: #1444992).

  [ Brian Murray ]
  * Fix the OVF's metadata to include Ubuntu specific identifiers and
    descriptions instead of the generic Linux ones. Thanks to Chris Glass.
    (LP: #1656293)
  * Add replace_grub_root_with_label function thereby consolidating multiple
    uses of the same calls to sed. Thanks to Dan Watkins.

  [ Adam Conrad ]
  * Set device_tree_address for the new kernel in the RPi bootloader config.txt

 -- Adam Conrad <email address hidden> Thu, 23 Mar 2017 11:39:22 -0600

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Nish Aravamudan (nacc) wrote :

Note that even with this fix, end users if they use their own image based off
an instance that used a cloud image to start will probably trigger: https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1677726.

I am thinking we should revisit the overall design a bit and ensure that behavior makes sense and is necessary for all use cases. I'll try and set something up but will follow-up in the other bug, FYI.

The livecd-rootfs changes fixed this for cloud-images.

Changed in cloud-images:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers