[00:31] minimal: nice :) thanks for sharing [00:33] meena: is there anything special about freebsd on ec2 that would warrant this being datasource specific behavior? https://github.com/canonical/cloud-init/blob/040090a31f483014ec78cd353bb55bfae121bebd/cloudinit/sources/DataSourceEc2.py#L130 [00:39] holmanb: what does a dhclient-script look like? [00:40] meena: by default in cloud-init, it looks a lot like /bin/true ;) [00:41] we use that as a hack to limit side-effects [00:41] holmanb: then why does it need special-casing…? [00:41] hrm? [00:41] what do you mean by special-casing? [00:41] or rather: What does it look like on EC2 that it needs special-casing? [00:42] errr, I think you may be asking the same thing I am? [00:42] I'm wondering why this behavior is specific to ec2 [00:43] the /bin/true reference: https://github.com/canonical/cloud-init/blob/main/cloudinit/net/dhcp.py#L150 [00:43] cloudinit/net/dhcp.py also uses "-sf /bin/true" [00:43] snap :-) [00:43] :) [00:45] holmanb: not directly related, but when I looked at the dhclient related stuff recently I was confused as to whether IPv6 is ever used (as then dhclient would need "-6" option) [00:45] why use -sf then to begin with?? [00:45] meena: i think he means to avoid any script being unexpectedly used [00:46] yeah, avoiding using the default script is I think the end goal - there isn't a way to disable running the script, so it just uses /bin/true as a no-op [00:46] minimal: I don't htink v6 is used yet [00:46] if you don't specify "-sf" at all then /sbin/dhclient-script is used if it exists [00:47] and since avoiding calling /sbin/dhclient-script was the goal, which freebsd didn't support, I think that's why this freebsd-specific call ended up in the ec2 datasource [00:47] looking at the commit history that's the story I'm seeing anyways [00:47] holmanb: ok, make sense. I was just starting to sketch out udhcpc and dhcpcd support and trying to understand current dhclient behavoiur as part of that [00:48] minimal: +1 nice, udhcp and dhcpcd are the interesting ones on the ubuntu side as well [00:49] however some sad news on the dhcpcd side [00:49] the last post on the mailing list [00:49] let me check..........but I can guess what it is about [00:50] either someone died, or they're ending development [00:50] somewhere in between, yeah [00:50] https://roy.marples.name/archives/dhcpcd-discuss/0003457.html [00:50] :/ [00:51] oh gosh [00:51] updated on github as recently as 3 months ago by Roy [00:51] oh yeah, I read that at the time, I thought something had happened recently [00:53] not that I know of [00:54] holmanb: so, to summarize: https://github.com/canonical/cloud-init/blob/main/WIP-ONGOING-REFACTORIZATION.rst . DHCP needs to move into distro. [00:56] seeing as the Azure people are going to rip out their special-casing (blacklist_driver[s]), I'm going to focus on moving get_interfaces/get_interface(s)_by_mac() into distro. All the ground-work is now there in BSD. [00:56] And I can probably happily ignore some weird Linux weirdnesses, especially where they are completely undocumented. [00:56] undocumented weirdness is where the fun is at [00:57] holmanb: aaaaaaand that's why i like BSD… if something is undocumented, it's a bug, but even so, at least the code is easy to read and understand… and FIND. [00:58] heh :D [00:59] well what I was going to point out is that both dhclient and udhcpc handle IPv4 and IPv6 via two different binaries/cli calls ("dhclient" and "dhclient -6", "udhcpc" and "udhcpc6") whereas dhcpcd does/can do both via a single call [00:59] minimal: yeah, that's one of the reasons for the dhcpcd preference on our side as well [01:00] that was why I was tryingf to figure out if existing dhclient code used "-6" or not, and if so in which situation/order [01:00] as dropping dhcpcd in "out of the box" would try both v4 & v6 unless configured othewise [01:01] minimal: I'll be queuing up some time for provisional dhcpcd support within the next month or two [01:01] minimal: I was just comparing the man pages side by side and noticed that as well :-) [01:01] never used cd myself [01:01] dhcpcd [01:02] yeah I've not had much time to do clound-init stuff recently, only got rid of other stuff yesterday so want to get some backlogged c-i changes out as PRs in the next week or so [01:02] we have datasource-specific dhclient calls scattered about as well, which complicate the task a bit [01:04] holmanb: my brief look into udhcpc/dhcpcd was also why I started wondering about network-config v2 DHCP settings as well (and then how they'd appear in eni so I could check they'd then get acted upon correctly in Alpine) [01:05] ^ IPv6 DHCP related settings I mean [01:05] well IPv6 SLAAC/DHCPv6/RA etc [01:06] :) [01:07] but 1st to get those other code changes out the door.... [01:14] I'm fairly certain, btw, that FreeBSD's dhclient can't do DHCPv6 out of the box. You'd need to install something else… which could turn into a chicken egg problm [01:14] meena: no "-6" option for it? [01:15] minimal: nope [01:15] it's ISC dhclient isn't it? [01:16] https://github.com/freebsd/freebsd-src/tree/main/sbin/dhclient [01:16] good grief… /* $OpenBSD: dhclient.c,v 1.63 2005/02/06 17:10:13 krw Exp $ */ [01:17] goodness [01:17] like, it's been updated, or at least secured, and all, but… brrrr… [01:17] .\" Copyright (c) 1997 The Internet Software Consortium. [01:17] so its based on ISC's code, perhaps a prehistoric version [01:18] #include ← "secured" [01:18] ah, yeah there's a comment about capsicum on the manpage as well [01:18] falls back to a chroot for sandboxing [01:18] so I guess they forked it before ISC added IPv6 support [01:19] they forked it before IPv6 was standardized, minimal. [01:20] meena: doesn't make my statement incorrect though ;-) [01:20] LOL [01:20] imagine sifting thru 25 years of ISC dhcplient code to try add IPv6 support today. [01:21] wonder if there's some more recent "useful" DHCPv4 options not supported then [01:25] other than -sf? 🤷🏻‍♀️ [01:26] -1 seems useful… [01:26] well I'm guess it supports RFC3442 [01:26] meena: yupe, the c-i code uses "-1" when it calls dhclient [01:28] it runs "/usr/sbin/dhclient -1 -v -lf /run/dhclient.lease -pf /run/dhclient.pid eth0 -sf /bin/true" on Linux [01:29] I need to run [01:29] i need to sleep [01:29] seeya o/ [01:29] cya [15:58] aciba: ubuntu/devel branch merge to tip of main. I'm syncing it now, and will rekick integration test runners [16:01] blackboxsw: let's see the green color there :) [16:27] minimal / holmanb: https://reviews.freebsd.org/D22012