[00:00] Hi. I'm doing some work the FreeBSD cloud-init-devel port/package. Is there a simple way to tell the cloud-init build tools to install the configuration files (cloud.cfg, 05_logging.cfg, and 99_freebsd.cfg) with .sample suffixes? I'll skip the details, but our package tools have some logic to 'do the right thing' with configuration files when they have a .sample suffix. [00:03] jrm: that would be, if anywhere, under setup.py [00:03] setuptools is just directly copying them. [00:04] meena: this is log from a "fresh boot" of a debian image: https://0bin.net/paste/oJ+LERXt#YH9NPj9ICeO-pyA6srBAiCvoEgRB/V69pRuIUWNVLEL [00:04] so, unless setuptools has some hook, you'd have to patch setup.py to do the right thing… [00:05] meena: That seems to be the case for 05_logging.cfg, and 99_freebsd.cfg, but cloud.cfg is being generated directly to the staging dir. It's challenging with our USE_PYTHON=autoplist. [00:05] Guest93: so, it's correctly identified, but can't find the datasource [00:06] Yea that's what I thought but I went through and updated the source and had it output the generated datasource; I copy/pasted it and cat'd it, it's definitely there, that's why I'm confused on if I'm missing something [00:10] Hello, I've opened a new PR on the main to add mariner OS support on cloud-init. Can anyone review it and approve it pipeline testing since this is my first time contribute [00:10] PR link: https://github.com/canonical/cloud-init/pull/1780 [00:10] -ubottu:#cloud-init- Pull 1780 in canonical/cloud-init "add mariner support" [Open] [00:10] Guest93: what does the user-data look like? [00:11] No userdata, only metadata currently [00:14] I think you're right about it not being able to find the data source. I've modified __init__.py and it only seems to find the DataSourceNone.py [00:15] But, the weird thing is that my data source is in the same dir [00:16] * meena hasn't written any data sources yet [00:17] Minghe: i would ping people who were active on reviewing other sources, or just anyone here with an @ hat. [00:17] * meena → bed. [00:48] got it [00:48] falcojr would you able to review my PR? === janitha76 is now known as janitha7 [01:16] Minghe: yep! Will do. I saw some back and forth on that PR so I was waiting until the other comments were finished [01:43] falcojr Thank you! === gstoeh is now known as carael [13:33] hello [13:35] Hello carael ! [13:35] how are you ? [13:36] * meena has added 28 lines of code, and now 28 tests are failing [13:36] perfect ratio, imo. [13:36] is that the place to learn cloud init ? [13:39] carael: it is. I'm a developer, of sorts, but I almost exclusively work on BSD support. [13:40] great , nice to meet you [13:40] where r u from then ? [13:49] That is a very difficult question to answer. [15:21] hrm, this is now failing tests in somewhat unexpected places, because initializing BSDNetworking calls subp(['ifconfig', '-a']) and lots of unrelated things are checking for one subp call exactly, and if they're getting an additional one, they don't like that [15:21] so I'm gonna do some…thing… [15:32] wow. down to 1 failure. [15:36] someone needs to explain to me the purpose is of try_set_link_up() [15:37] First off: I'm pretty, and sure, BSD can do that… but also: What's the point? [15:50] blackboxsw, falcojr — i think https://github.com/canonical/cloud-init/pull/1779 is pretty solid now to get some eyes from y'all. A quality-check, before I proceed, and maybe some directions what to tackle next would be greatly appreciated. I should do some of my own: make sure this thing actually does what it claims [15:50] -ubottu:#cloud-init- Pull 1779 in canonical/cloud-init "Net: add BSD ifconfig(8) parser" [Open] [15:51] I'll take a look today [15:52] but I have a feeling, if I try this, I'll get a lot less stray failed reads on /sys [15:54] hrm, i wonder what good my caching is, if I don't store an Ifconfig() object… [16:04] funny FreeBSD's cloud-init *could* run on more platforms, thanks to not using dmidecode… [16:11] * meena should go pick up her child… oops [18:09] I'm testing a custom datasource and I noticed that the NIC name is different; installer has it default to ens3, but the NIC on the system is ens4. So, after cloud-init runs it doesnt bring the interface online. This normal type of behavior? [18:10] I know it's related to cloud-init because once I installed cloud-init the issue started to crop up, previously (no cloud-init) there was no issue. [18:15] Guest93: it depends on what you mean by custom datasource. It's the datasource's responsibility to feed the networking information to cloud-init. [18:16] Ah, yea currently all it does is EphemeralDHCP to get access to the datasource [18:19] does cloud-init disable the grub selection menu or is that another app that does it? [18:21] johnjaye: cloud-init doesn't do that [18:22] ok. i've been tinkering with debian cloud images trying to understand how they work. i noticed the nocloud image is the only one that allows editing of the grub menu [18:38] johnjaye: chances are that the grub timeout has been set to 0 [19:13] meena: Can you add your ifconfig output to the PR? I'm having some issues with the parsing code, but linux may output things differently [19:50] ah ok [19:52] falcojr: i just used some of the existing ones [19:52] falcojr: but i can give you my machines' output as examples [19:53] yep, that's what I mean [19:56] falcojr: https://gist.github.com/ea7ccf925a5a77cd834756867a812bab my local VM. a server running my websites: https://gist.github.com/5ee247db774f2b7d4250a64173535e98 — a local openbsd vm: https://gist.github.com/ae7e543260a77a691e6865358d2788d3 [19:58] i just found something I won't be able to parse correctly! [19:58] a tun device. [19:59] https://gist.github.com/fef17df31318603b937b27d0dce1b01f [20:05] falcojr: if my headache passes, and I manage to replace IPv6 and IPv4 addresses with RFC example addresses in the bunch of pastes i got from people, I can add those to our assets for broader testing [20:07] right, let's build a package and see if cloud-init can get this machine configured! [20:07] I mean, it's DHCP, i really hope it can lol [20:08] (how do i pass some *other* network config via NoCloud?) [20:16] meena: you can provide /var/lib/cloud/seed/nocloud-net/network-config (version 1 or version 2) if your meta-data and user-data files live there too. Oherwise you can provide a file in /etc/cloud/cloud.cfg.d/99-mynetwork.cfg with network: directives . `network-config=` can be provided on the kernel cmdline too if you have access to inject that config [20:17] blackboxsw: I haven't fixed up FreeBSD to read the kernel line yet, and also: I have no idea how to pass a kernel line thru libvirt/qemu to FreeBSD [20:18] blackboxsw: how come it can't just be done via the same ISO that the user-data/meta-data is passed in by? [20:19] meena: you can provide the network-config file in the same directory or ISO that you pass it correct. Sorry lost context on how you are presenting a NoCloud source to the instance [20:20] NoCloud datasource will opt to use the network-config file if present ... NoCloud also sources a 'vendor-data' file if you wanted optional vendor-data that could be overriddedn by user-data if you had some constomizations you were testing [20:21] the required vs optional files are here https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceNoCloud.py#L88-L91 [20:21] blackboxsw: i'm not quite there yet;) [20:21] still just baby steps [20:21] yeah it's hard to boil an ocean :) [20:22] But I'm quite impressed how well my code seems to integrate so far… [20:23] I think it should be really easy to rip out half of cloudinit.net in the next few weeks, and stick it into networking, with very minimal overhead given what Ifconfig/Ifstate already do [20:26] you just invoked mi-ni-mal. meena are you tracking of current progress toward your goals and initial timing estimates in a public forum/page/hackmd etc? [20:26] blackboxsw: not public, but I'm behind [20:27] no worries. I was just wondering and expect that you'll continue communicating when things need attention [20:27] and thanks [21:16] chrony should add timesyncd to this table https://chrony.tuxfamily.org/comparison.html [22:19] do lots of cloud providers use the rename feature of network devices? [22:19] it's… terribly inconvenient… [22:53] i'm gonna be importing re into every file i touch, if no one stops me [22:53] https://gist.github.com/63a2163a644910128ebf463807a9cd14