/srv/irclogs.ubuntu.com/2022/12/03/#cloud-init.txt

meenaminimal: what, even, is dhcp6?00:14
minimalwhat do you mean? I've using a network-config v2 file00:15
minimalso "version: 2\nethernets:\n  eth0:\n    dhcp4:false\n    dhcp6: true\n00:16
minimalbut cloud-init.log shows: stages.py[INFO]: Applying network configuration from ds bringup=False: {'version': 2, 'ethernets': {'eth0': {'dhcp4': True, 'dhcp6': True}}}00:19
meenaI mean, what does dhcp6 do?00:21
meenara?00:21
minimalit enables DHCPv6 support, that's not the issue though, I want to disable DHCPv4 support but it is somehow being overriden00:22
minimalmeena: DHCPv6 would work together with RA, yes.........but that's not relevant to the issue00:22
meenaoh, I didn't know there *is* DHCPv600:35
minimalRFC 3315 from 200300:36
minimalthere is a cloud-init testcase for dhcpv6 only, but its using network-config v1, not v2, as input00:52
blackboxswminimal: on Ubuntu, since we have netplan, v2 config is passed directly though to the renderer layer and written out to /etc/netplan/50-cloud-init.yaml for us. For non-netplan systems the network config gets converted to internal network_state and eventually rendered out to the network  backplane. Alpine linux is /etc/network/interfaces (ENI) right?01:11
minimalblackboxsw: figured it out - cidata ISO works as expected, eni file does not have dhcpv4 entry, however using same v2 network-config in a seed directory DHCPv4 *is* enabled - I guess its perhaps merging seed dir config with fallback somehow?01:12
blackboxswminimal: right, each nocloud datasource meta-data is sourced with priority  and merged together if multiple sources are viable01:13
minimalright, but I was using only seed directory, no other source and the dhcp4: false was flipped to dhcp4: true01:13
blackboxswohh, hrm01:14
minimalseparately, for network-config v2 still trying to work out to indicate non-static-IPv6, non-dhcpv6-~IPv6, e.g. slaac related, RA related stuff01:15
minimali.e. in order to get "iface eth0 inet6 auto" in /e/n/i file01:15
minimal"dhcp6: true" gives me "iface eth0 inet6 dhcp" which is fine for DHCPv601:16
blackboxswhrm wondering what default could be generating that dhcp4: true. 01:16
minimalthat's why I wondered if somehow the "fallback" was being consulted01:17
blackboxswIt's possible in an image that network config could also be present in the image in /etc/cloud or /etc/cloud.cfg.d/*.cfg  which would pollute any other network config provided from other sources for nocloud01:18
blackboxswbut, I'm grasping at straws01:18
minimalnot in my images ;-)01:18
minimaland the behaviour is different when I built an image with files in the seed directory vs with no such files but provided with cidata ISO at boot time01:19
blackboxswDataSourceNoCloud::_merge_new_seed  looks like it will completely overwrite the entire network-config of the latest valid seed file it sees any network-config in a discovered nocloud viable source. So I don't see how it is getting a 'merge' of network-config from one source vs another here https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceNoCloud.py#L34301:25
blackboxswit looks to me like last network-config present anywhere wins out in NoCloud01:26
blackboxswwhich would be network-config file seen on CIDATA labeled device. 01:27
minimalyeah, that's fine, the strangeness appeared when there was a CIDATA provided, only /var/lib/cloud/seed/nocloud/network-config01:28
minimals/was a/was no/01:29
blackboxswnot sure offhand, and being pulled into the weekend vortex shortly :/01:29
minimalno problem, I'll have a look at it again myself01:30
minimalwould welcome your thoughts on IPv6 network-config v2 settings in general (especially for eni rather than netplan) but we can chat about that next week01:31
blackboxsw+1 will mull that over .. this is related to "separately, for network-config v2 still trying to work out to indicate non-static-IPv6, non-dhcpv6-~IPv6, e.g. slaac related, RA related stuff" ?01:32
minimalyeah, I've used static IPv6 in the past fine, its all that other stuff and how to get eni with the right settings for it01:33
blackboxswok this is broader than me, but will refresh context a bit on it to see if I can think of something smart to say there01:34
minimalthe testcases for this seem to only use v1 config01:34
blackboxswyeah looking at commit history too in this space 62bbc262c3c7f633eac1d09ec78c055eef05166a and aa1014cae2e326109581d4624f3a195a89369fd7 makes me think there may be a gap there in v2. But I'll have to get more context there to be sure01:40
minimalI'll think up more work for you over the weekend ;-)01:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!