Comment 1 for bug 1639930

Revision history for this message
Scott Moser (smoser) wrote : Re: initramfs kernel configuration ignored if only ip6= on kernel command line

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.
Also, a change to 'DHCP6_CONTENT_1' in tests/unittests/test_net.py to contain what we're currently expecting.

diff --git a/cloudinit/net/cmdline.py b/cloudinit/net/cmdline.py
index 4075a27..a077730 100644
--- a/cloudinit/net/cmdline.py
+++ b/cloudinit/net/cmdline.py
@@ -199,7 +199,7 @@ def read_kernel_cmdline_config(files=None, mac_addrs=None, cmdline=None):
         if data64:
             return util.load_yaml(_b64dgz(data64))

- if 'ip=' not in cmdline:
+ if 'ip=' not in cmdline and 'ip6=' not in cmdline:
         return None