Comment 7 for bug 1639930

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

Well, further investigation showed to me that maas boots with:
   ip=off ip6=dhcp
   ip=dhcp ip6=off
but will never boot with either
   a.) ip=dhcp ip6=dhcp
   b.) ip6=dhcp

An oddity in the initramfs implementation is that 'ip6=dhcp' will enable ip=dhcp. Which seems arcane, but since ip=off is available, it does at least allow the user to imply sane behavior.

Because maas will never do both ipv6 and ipv4, then in their code path the initramfs will never creates a /run/net-eth0.conf and /run/net6-eth0.conf in their environment. That was the case that the changes here fixed. So, my statement in comment 6 was incorrect.

However, I have verified that this actually does work via some manual testing using qemu and some work i'd done for open-isci testing.

We boot a qemu system like this:
qemu-system-x86_64 -enable-kvm -device virtio-scsi-pci,id=virtio-scsi-xkvm -device virtio-net-pci,netdev=net00 -netdev type=tap,id=net00,script=no,downscript=no,ifname=tapvm0 -echr 0x5 -m 1024 -nographic -kernel /tmp/tgt-boot-test.UT2p0T/kernel -initrd /tmp/tgt-boot-test.UT2p0T/initrd -append "nomodeset iscsi_initiator=maas-enlist iscsi_target_name=tgt-boot-test-UT2p0T iscsi_target_ip=10.5.219.1iscsi_target_port=3260 iscsi_initiator=maas-enlist ip6=dhcp ro net.ifnames=0 BOOTIF_DEFAULT=eth0 root=/dev/disk/by-path/ip-10.5.219.1:3260-iscsi-tgt-boot-test-UT2p0T-lun-1-part1 overlayroot=tmpfs console=ttyS0 ds=nocloud-net;seedfrom=http://10.5.219.1:32600/"