eni rendering of ipv6 gateways fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Ryan Harper | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Zesty |
Fix Released
|
Medium
|
Unassigned | ||
Artful |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
Network configuration provided to cloud-init that has an ipv6 address
and additional manual default route will fail to bring up the routes
correctly.
[Test Case]
The basic idea below is:
a.) launch an instance with proposed version of cloud-init.
b.) inside instance, get cloud-init's network rendering tool from trunk
c.) run the rendering tool against a config that failed before.
d.) check rendered ENI config to verify it looks correct.
## launch an instance.
$ release=xenial
$ ref=$release-
$ lxc-proposed-
$ lxc launch $ref $name
$ lxc exec $ref $name /bin/bash
## get render tool
% wget https:/
% cat > net-config.yaml <<"EOF"
version: 1
config:
- type: physical
name: eth0
mac_address: "c0:d6:9f:2c:e8:80"
subnets:
- type: static
address: "2001:1::2/64"
routes:
- gateway: "2001:4800:
netmask: "::"
network: "::"
EOF
$ python3 ./net-convert.py \
--network-
--output-
--mac=
--directory
% cat out.d/etc/
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 static
address 2001:1::2/64
post-up route add -A inet6 default gw 2001:4800:
pre-down route del -A inet6 default gw 2001:4800:
## The output above is the expected output. The failure path
## would have post-up and pre-down like:
post-up route add -net :: netmask :: gw 2001:4800:
pre-down route del -net :: netmask :: gw 2001:4800:
[Regression Potential]
Regressions for this change are almost certainly limited to
rendering of ipv6 networking configuration and most likely limited
to routing.
[Other Info]
Upstream commit at
https:/
=== End SRU Template ===
cloud-init trunk and xenial, yakkety, zesty and artful all fail
A network config with a ipv6 gateway route like:
subnets:
- type: static
address: 2001:4800:
netmask: 'ffff:ffff:
routes:
- gateway: 2001:4800:
netmask: '::'
network: '::'
For eni rendering, this should create a post-up/post-down route command that generates a default ipv6 route entry, like this:
post-up route add -A inet6 default gw 2001:4800:
pre-down route del -A inet6 default gw 2001:4800:
However, what is currently generated is this:
post-up route add -net :: netmask :: gw 2001:4800:
pre-down route del -net :: netmask :: gw 2001:4800:
That does not install the route correctly as a default gateway route.
This is fallout from commit d00da2d5b0d45db
net: normalize data in network_state object
This commit removed ipv6 route 'netmask' values, and converted them to
prefix length values, but failed to update the eni renderer's check for
ipv6 default gateway.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper: Approve
-
Diff: 175 lines (+91/-1)3 files modifiedcloudinit/net/eni.py (+1/-1)
cloudinit/net/sysconfig.py (+5/-0)
tests/unittests/test_net.py (+85/-0)
- cloud-init Commiters: Pending requested
-
Diff: 357 lines (+232/-3)4 files modifiedcloudinit/net/eni.py (+1/-1)
cloudinit/net/sysconfig.py (+18/-0)
cloudinit/sources/DataSourceAzure.py (+1/-1)
tests/unittests/test_net.py (+212/-1)
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init: | |
assignee: | nobody → Ryan Harper (raharper) |
Changed in cloud-init (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Zesty): | |
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 Zesty): | |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | Confirmed → Won't Fix |
no longer affects: | cloud-init (Ubuntu Yakkety) |
Changed in cloud-init: | |
status: | Fix Committed → Fix Released |
Changed in cloud-init: | |
status: | Fix Released → Fix Committed |
description: | updated |
tags: |
added: verification-done-xenial verification-done-zesty removed: verification-needed-xenial verification-needed-zesty |
The attachment "eni-fix- ipv6-route- gateway. patch3" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]