Merge ~lamont/cloud-init/+git/bug-1621615-device6:master into cloud-init:master

Proposed by LaMont Jones
Status: Merged
Merged at revision: a1cdebdea65ccd827060c823146992bba9debe19
Proposed branch: ~lamont/cloud-init/+git/bug-1621615-device6:master
Merge into: cloud-init:master
Diff against target: 21 lines (+4/-3)
1 file modified
cloudinit/net/cmdline.py (+4/-3)
Reviewer Review Type Date Requested Status
cloud-init Commiters Pending
Review via email: mp+309718@code.launchpad.net

Commit message

Add support for 'DEVICE6' and /run/net6-${DEVICE6}.conf

Description of the change

Fixing the original regression in initramfs-tools introduced 'DEVICE6' for IPv6 configuration, as well as /run/net6-${DEVICE6}.conf. This addresses those changes, and is needed for (at least) yakkety to work under MAAS.

To post a comment you must log in.
Revision history for this message
LaMont Jones (lamont) wrote :

Confirmed to work as part of the set (see Bug#1621507) -- this needs to land in zesty, and get backported to yakkety/xenial.

Revision history for this message
Scott Moser (smoser) :
ff71719... by LaMont Jones

Incorporate review feedback

Revision history for this message
LaMont Jones (lamont) wrote :

Done.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/net/cmdline.py b/cloudinit/net/cmdline.py
2index 933317d..4075a27 100644
3--- a/cloudinit/net/cmdline.py
4+++ b/cloudinit/net/cmdline.py
5@@ -76,12 +76,13 @@ def _klibc_to_config_entry(content, mac_addrs=None):
6
7 data = _load_shell_content(content)
8 try:
9- name = data['DEVICE']
10+ name = data['DEVICE'] if 'DEVICE' in data else data['DEVICE6']
11 except KeyError:
12- raise ValueError("no 'DEVICE' entry in data")
13+ raise ValueError("no 'DEVICE' or 'DEVICE6' entry in data")
14
15 # ipconfig on precise does not write PROTO
16- proto = data.get('PROTO')
17+ # IPv6 config gives us IPV6PROTO, not PROTO.
18+ proto = data.get('PROTO', data.get('IPV6PROTO'))
19 if not proto:
20 if data.get('filename'):
21 proto = 'dhcp'

Subscribers

People subscribed via source and target branches