subnet_is_ipv6() function does not work for types ipv6_dhcpv6-stateless|stateful

Bug #1848690 reported by Harald Jensås on 2019-10-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Undecided
Harald Jensås

Bug Description

def subnet_is_ipv6(subnet):
    """Common helper for checking network_state subnets for ipv6."""
    # 'static6' or 'dhcp6'
    if subnet['type'].endswith('6'):
        # This is a request for DHCPv6.
        return True
    elif subnet['type'] == 'static' and is_ipv6_addr(subnet.get('address')):
        return True
    return False

Function return false for ipv6_dhcpv6-stateless|stateful, the eni renderer does not add '6' to 'inet' so it's rendered like: 'iface iface0 inet auto|dhcp' not 'iface iface0 inet6 auto|dhcp'

Related branches

Changed in cloud-init:
status: New → In Progress
assignee: nobody → Harald Jensås (harald-jensas)

This bug is fixed with commit fcc92ad1 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=fcc92ad1

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

Other bug subscribers