initramfs network configuration ignored if only ip6= on kernel command line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Undecided
|
Unassigned | ||
cloud-init |
Fix Released
|
Medium
|
Unassigned | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Scott Moser | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
On a system booted with both ip6= and ip= on the kernel command line
cloud-init will raise an exception and fail to process user-data and
have its normal affect on boot.
That is because cloud-init previously raised an exception when more
than one file in /run/net*.conf declared the same DEVICE. Changes to
isc-dhcp and initramfs-tools have changed their behavior and cloud-init
has to adjust to allow DEVICE6= and DEVICE= in separate files.
[Test Case]
Boot a system on a network with both ipv4 and ipv6 dhcp servers,
and pass kernel command line with:
ip=dhcp ip6=dhcp
[Regression Potential]
Regression seems unlikely as this is relaxing a check. Where previously
an exception would have been raised, cloud-init will now go on.
So it seems most likely, something that didn't work before (due to raised
exception) would now still not work, but with failures. That is not
expected, but that would likely be where regressions were found.
=== End SRU Template ===
In changes made under bug 1621615 (specifically a1cdebdea), we now expect that there may be a 'ip6=' argument on the kernel command line. The changes made did not test the case where there is 'ip6=' and no 'ip='.
The code currently will return with no network configuration found if there is only ip6=...
Related bugs:
* bug 1621615: network not configured when ipv6 netbooted into cloud-init
* bug 1621507: initramfs-tools configure_
* bug 1635716: Can't bring up a machine on a dual network (ipv4 and ipv6)
Related branches
- cloud-init Commiters: Pending requested
-
Diff: 94 lines (+28/-20)2 files modifiedcloudinit/net/cmdline.py (+1/-1)
tests/unittests/test_net.py (+27/-19)
tags: | added: maas-ipv6 |
Changed in maas: | |
milestone: | none → 2.1.2 |
Changed in maas: | |
milestone: | 2.1.2 → 2.1.3 |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Xenial): | |
assignee: | nobody → Scott Moser (smoser) |
description: | updated |
description: | updated |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | Confirmed → In Progress |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
The initial fix is easy, but bug 1621615 changes sneaked in without a unit test.
I'd really like a unit test of read_kernel_ cmdline_ config to accompany this change. /test_net. py to contain what we're currently expecting.
Also, a change to 'DHCP6_CONTENT_1' in tests/unittests
diff --git a/cloudinit/ net/cmdline. py b/cloudinit/ net/cmdline. py net/cmdline. py net/cmdline. py cmdline_ config( files=None, mac_addrs=None, cmdline=None): yaml(_b64dgz( data64) )
index 4075a27..a077730 100644
--- a/cloudinit/
+++ b/cloudinit/
@@ -199,7 +199,7 @@ def read_kernel_
if data64:
return util.load_
- if 'ip=' not in cmdline:
+ if 'ip=' not in cmdline and 'ip6=' not in cmdline:
return None