v1 network render to netplan does not render IPv6 global nameserver address

Bug #1980877 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Low
Unassigned

Bug Description

cloud-init v 22.2:

Example config with subnet `type: ipv6_slaac` doesn't render any nameserver information in config /etc/netplan/50-cloud-init.yaml when global nameserver is provided.

Steps to reproduce:

cat > network-config <<EOF
version: 1
config:
    - type: physical
      name: eth0
      mac_address: '06:70:c5:13:04:1e'
      subnets:
      - type: ipv6_slaac
    - type: nameserver
      address:
      - '2a03:7900:2:0:31:3:104:161'
      search:
      - 'demo.de'
EOF
PYTHONPATH=. python3 -m cloudinit.cmd.main devel net-convert --network-data=network-config --kind=yaml -D ubuntu -O netplan -d outputd

# ACTUAL OUTPUT - lacks nameserver
$ cat outputd/etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        eth0:
            dhcp6: true
            match:
                macaddress: 06:70:c5:13:04:1e
            set-name: eth0

It may be that this isn't a bug because ipv6_slaac doesn't provide DNS information and requires that the a separate https://www.networkacademy.io/ccna/ipv6/stateless-dhcpv6 server is running on the network backplane that the node can separately contact to get DNS info.

Currently cloud-init netplan renderer only applies global nameserfver information to subnets which contain an "addresses" config directive an no nameserver" directive.
https://github.com/canonical/cloud-init/blob/main/cloudinit/net/netplan.py#L421-L422

Chad Smith (chad.smith)
summary: - v1 network render to netplan does not render IPv6 nameserver address
+ v1 network render to netplan does not render ipv6_slaac nameserver
+ address
Revision history for this message
Chad Smith (chad.smith) wrote : Re: v1 network render to netplan does not render ipv6_slaac nameserver address

For this particular issue: I believe adding a dns_nameservers: ['2a03:7900:2:0:31:3:104:161'] to eth0's subnets definition will get you want you overriding default behavior.

Changed in cloud-init:
status: New → Triaged
importance: Undecided → Low
summary: - v1 network render to netplan does not render ipv6_slaac nameserver
+ v1 network render to netplan does not render IPv6 global nameserver
address
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.