/srv/irclogs.ubuntu.com/2022/10/19/#cloud-init.txt

jrmHi.  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:00
meenajrm: that would be, if anywhere, under setup.py00:03
meenasetuptools is just directly copying them.00:03
Guest93meena: this is log from a "fresh boot" of a debian image: https://0bin.net/paste/oJ+LERXt#YH9NPj9ICeO-pyA6srBAiCvoEgRB/V69pRuIUWNVLEL00:04
meenaso, unless setuptools has some hook, you'd have to patch setup.py to do the right thing…00:04
jrmmeena: 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
meenaGuest93: so, it's correctly identified, but can't find the datasource00:05
Guest93Yea 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 something00:06
MingheHello, 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 contribute00:10
MinghePR link: https://github.com/canonical/cloud-init/pull/178000:10
-ubottu:#cloud-init- Pull 1780 in canonical/cloud-init "add mariner support" [Open]00:10
meenaGuest93: what does the user-data look like?00:10
Guest93No userdata, only metadata currently00:11
Guest93I 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.py00:14
Guest93But, the weird thing is that my data source is in the same dir00:15
* meena hasn't written any data sources yet00:16
meenaMinghe: i would ping people who were active on reviewing other sources, or just anyone here with an @ hat.00:17
* meena → bed.00:17
Minghegot it00:48
Minghefalcojr would you able to review my PR?00:48
=== janitha76 is now known as janitha7
falcojrMinghe: yep! Will do. I saw some back and forth on that PR so I was waiting until the other comments were finished01:16
Minghefalcojr Thank you!01:43
=== gstoeh is now known as carael
caraelhello 13:33
meenaHello carael !13:35
caraelhow are you ?13:35
* meena has added 28 lines of code, and now 28 tests are failing13:36
meenaperfect ratio, imo.13:36
caraelis that the place to learn cloud init ?13:36
meenacarael: it is. I'm a developer, of sorts, but I almost exclusively work on BSD support.13:39
caraelgreat , nice to meet you 13:40
caraelwhere r u from then ?13:40
meenaThat is a very difficult question to answer.13:49
meenahrm, 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 that15:21
meenaso I'm gonna do some…thing…15:21
meenawow. down to 1 failure.15:32
meenasomeone needs to explain to me the purpose is of try_set_link_up()15:36
meenaFirst off: I'm pretty, and sure, BSD can do that… but also: What's the point?15:37
meenablackboxsw, 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 claims15:50
-ubottu:#cloud-init- Pull 1779 in canonical/cloud-init "Net: add BSD ifconfig(8) parser" [Open]15:50
falcojrI'll take a look today15:51
meenabut I have a feeling, if I try this, I'll get a lot less stray failed reads on /sys15:52
meenahrm, i wonder what good my caching is, if I don't store an Ifconfig() object…15:54
meenafunny FreeBSD's cloud-init *could* run on more platforms, thanks to not using dmidecode…16:04
* meena should go pick up her child… oops16:11
Guest93I'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:09
Guest93I 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:10
falcojrGuest93: it depends on what you mean by custom datasource. It's the datasource's responsibility to feed the networking information to cloud-init.18:15
Guest93Ah, yea currently all it does is EphemeralDHCP to get access to the datasource18:16
johnjayedoes cloud-init disable the grub selection menu or is that another app that does it?18:19
falcojrjohnjaye: cloud-init doesn't do that18:21
johnjayeok. 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 menu18:22
meenajohnjaye: chances are that the grub timeout has been set to 018:38
falcojrmeena: Can you add your ifconfig output to the PR? I'm having some issues with the parsing code, but linux may output things differently19:13
johnjayeah ok19:50
meenafalcojr: i just used some of the existing ones19:52
meenafalcojr: but i can give you my machines' output as examples19:52
falcojryep, that's what I mean19:53
meenafalcojr: 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/ae7e543260a77a691e6865358d2788d319:56
meenai just found something I won't be able to parse correctly!19:58
meenaa tun device.19:58
meenahttps://gist.github.com/fef17df31318603b937b27d0dce1b01f19:59
meenafalcojr: 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 testing20:05
meenaright, let's build a package and see if cloud-init can get this machine configured!20:07
meenaI mean, it's DHCP, i really hope it can lol20:07
meena(how do i pass some *other* network config via NoCloud?)20:08
blackboxswmeena: 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=<Base64 encoded YAML config string>` can be provided on the kernel cmdline too if you have access to inject that config20:16
meenablackboxsw: 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 FreeBSD20:17
meenablackboxsw: how come it can't just be done via the same ISO that the user-data/meta-data is passed in by?20:18
blackboxswmeena: 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 instance20:19
blackboxswNoCloud 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 testing20:20
blackboxswthe required vs optional files are  here https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceNoCloud.py#L88-L9120:21
meenablackboxsw: i'm not quite there yet;)20:21
meenastill just baby steps20:21
blackboxswyeah it's hard to boil an ocean :)20:21
meenaBut I'm quite impressed how well my code seems to integrate so far…20:22
meenaI 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 do20:23
blackboxswyou 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
meenablackboxsw: not public, but I'm behind20:26
blackboxswno worries.  I was just wondering and expect that you'll continue communicating when things need attention20:27
blackboxswand thanks20:27
meenachrony should add timesyncd to this table https://chrony.tuxfamily.org/comparison.html21:16
meenado lots of cloud providers use the rename feature of network devices?22:19
meenait's… terribly inconvenient…22:19
meenai'm gonna be importing re into every file i touch, if no one stops me22:53
meenahttps://gist.github.com/63a2163a644910128ebf463807a9cd1422:53

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