Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ubuntu-server-builder opened this issue May 12, 2023 · 1 comment
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

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

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2022-07-06T20:46:34.682710+00:00
date_fix_committed = None
date_fix_released = None
id = 1980877
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1980877
milestone = None
owner = chad.smith
owner_name = Chad Smith
private = False
status = triaged
submitter = chad.smith
submitter_name = Chad Smith
tags = []
duplicates = []

Launchpad user Chad Smith(chad.smith) wrote on 2022-07-06T20:46:34.682710+00:00

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

@ubuntu-server-builder ubuntu-server-builder added bug Something isn't working correctly launchpad Migrated from Launchpad labels May 12, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Chad Smith(chad.smith) wrote on 2022-07-06T20:59:36.903153+00:00

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant