canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.88k stars 859 forks source link

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

Closed ubuntu-server-builder closed 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1848690

Launchpad details
affected_projects = []
assignee = harald-jensas
assignee_name = Harald Jensås
date_closed = 2019-12-19T22:58:20.764100+00:00
date_created = 2019-10-18T09:25:40.263855+00:00
date_fix_committed = 2019-10-31T16:15:32.702141+00:00
date_fix_released = 2019-12-19T22:58:20.764100+00:00
id = 1848690
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1848690
milestone = None
owner = harald-jensas
owner_name = Harald Jensås
private = False
status = fix_released
submitter = harald-jensas
submitter_name = Harald Jensås
tags = []
duplicates = []

Launchpad user Harald Jensås(harald-jensas) wrote on 2019-10-18T09:25:40.263855+00:00

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'

ubuntu-server-builder commented 1 year ago

Launchpad user Server Team CI bot(server-team-bot) wrote on 2019-10-31T16:15:30.881678+00:00

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

ubuntu-server-builder commented 1 year ago

Launchpad user Chad Smith(chad.smith) wrote on 2019-12-19T22:58:22.329972+00:00

This bug is believed to be fixed in cloud-init in version 19.2-76. If this is still a problem for you, please make a comment and set the state back to New

Thank you.