sysconfig needs fix for ipv6 gateway routes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Ryan Harper |
Bug Description
Static IPV6 subnet with a ipv6 route fails to set the default IPV6 gateway.
With cloud-init master:
% cat ipv6-static.yaml
network:
version: 1
config:
- type: physical
name: interface0
subnets:
- type: static
- gateway: 2001:4800:
% ./tools/
--kind yaml --output-kind sysconfig -d target-sysconfig
% grep -nr IPV6_DEFAULTGW target-sysconfig/; echo $?
1
Currently only the subnet is checked for 'ipv6' setting, however, the routes array may include a mix of v4 or v6 configurations, in particular, the gateway
in a route may be ipv6, and if so, should export the value via IPV6_DEFAULTGW in the ifcfg-XXXX file.
Additionally, if the route is v6, it should rendering a routes6-XXXX file; this is present but missing the 'dev <interface>' scoping.
% cat target-
# Created by cloud-init on instance boot automatically, do not edit.
#
::/0 via 2001:4800:
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper: Approve
-
Diff: 54 lines (+8/-6)2 files modifiedcloudinit/net/sysconfig.py (+6/-5)
tests/unittests/test_net.py (+2/-1)
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Ryan Harper (raharper) |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New
Thank you.