sysconfig needs fix for ipv6 gateway routes

Bug #1694801 reported by Ryan Harper on 2017-05-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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
    version: 1
        - type: physical
          name: interface0
          mac_address: "52:54:00:12:34:00"
              - type: static
                address: 2001:4800:78ff:1b:be76:4eff:fe06:96b3
                netmask: 'ffff:ffff:ffff:ffff::'
                  - gateway: 2001:4800:78ff:1b::1
                    netmask: '::'
                    network: '::'

% ./tools/ --network-data ipv6-static.yaml \
  --kind yaml --output-kind sysconfig -d target-sysconfig

% grep -nr IPV6_DEFAULTGW target-sysconfig/; echo $?

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-sysconfig/etc/sysconfig/network-scripts/route6-interface0
# Created by cloud-init on instance boot automatically, do not edit.
::/0 via 2001:4800:78ff:1b::1

Related branches

Ryan Harper (raharper) wrote :
Scott Moser (smoser) on 2017-07-18
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ryan Harper (raharper)
Scott Moser (smoser) on 2017-07-21
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.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers