/srv/irclogs.ubuntu.com/2022/11/21/#cloud-init.txt

meenaI have a question about the init scripts: Is there every any reason to only enable one of the cloud-init daemons?10:10
=== esv_ is now known as esv
minimalmeena: you mean scripts rather than daemons? There's only 1 "daemon" with cloud-init, the hotplug script13:46
blackboxswmeena: not that I can think of. each init script corresponds to the 4 boot stages. Different parts of cloud-init discovery or configuration run during each of the boot stages. If you don't run init-local or init stages you risk not discovering certain datasources which are only detected in init-local or init stage. If you skip modules-config or modules-final you don't apply parts of the user-data configuration in the cc_* modules.14:13
meenablackboxsw: aye.14:36
meenameena: what's the hotplug script? and does that work on not-linux? (does it even work on Alpine?)14:36
minimalmeena: it's for handling hotplugged network interfaces, i.e. on AWS14:38
minimalthe shipped script does not work on (base) Alpine as it is written in Bash but I have packaged a derivative that runs on sh/ash14:38
meenahow does a script run as daemon?14:45
minimalmeena: in the sense that it runs and keeps running rather than runs for a few seconds and exits15:05
minimalit listens on a pipe (from memory) and processes data from it15:05
meenaah,15:05
minimalbasically (again from memory) it listens for udev events and reacts to them15:06
meenaminimal: this thing? https://github.com/canonical/cloud-init/blob/HEAD/tools/hook-hotplug15:09
minimalyeah15:10
meenahow do people manage to write 20 lines of shell code, that's not sh compatible?15:13
minimalhttps://git.alpinelinux.org/aports/tree/community/cloud-init/03-hook-hotplug-sh.patch15:14
meenaminimal: oh, right, no arrays, … brrr…15:18
meenabut, still, easier to fix that than expected15:18
meenahow come you didn't push it upstream?15:18
minimalI haven't tested in yet, hotplug is only support by Ec2, ConfigDrive2, and OpenStack datasources from memory15:19
minimalmeena: in a related note I have a patch for doas support which I haven't upstreamed as doas is fragmented (Alpine is using opendoas) and it relies in functionality only currently present in opendoas15:23
meenameena: boooo15:25
meenai mean, that sounds great15:25
minimalbasically doas only supports a single config file /etc/doas.conf whereas opendoas added also support for a directory where multiple files can be read from - so my doas support acts in a similar way to c-i sudo support of creating file in /etc/doas.d/15:26
meenaspeaking of sudo / doas: somebody should really make the sudo thing idempotent15:27
meenahttps://gist.github.com/620feecb55db46cdeab5c12fa986ae6115:28
minimaldoesn't the contents of /etc/sudoers.d/90-cloud-init-users get replaced rather than appended to?15:33
minimalhaven't checked the code yet...15:34
meenanot on my machines15:34
meenaevery time i run cloud-init clean -sl i get a new entry15:34
minimaladd, the code appends to file is it exists15:36
minimalfunction write_sudo_rules in distros/__init_.py or freebsd.py, netbsd.py15:37
meenaminimal: indeed, i just saw that, too15:39
meenaso it's a feature15:39
meenaI think we should read the file, and if the contents is the same as what we have, skip writing it15:41
minimalI think just write the file regardless (unless the intention was for the image creator to prepopulate the file, in which case couldn't user-related entries in /etc/clould/cloud.cfg achieve the same?)15:42
minimalwrite as in overwrite15:42
meenayeah, i think overwrite would be less… surprising.15:46
minimalmeena: BTW I noticed you'd raised a launchpad issue some time ago about freebsd support for cc_ca-certs15:47
minimalI'm doing some work with that code currently15:47
meenaminimal: reminder to myself, to implement it15:47
minimalis there a clear document as to how freebsd handles certs?15:47
minimalI'm already trying to figure out if the existing RHEL support is fully functional or not15:48
meenaminimal: usually, our man pages are pretty good ;) https://man.freebsd.org/certctl15:48
meenaand if not, that's a bug.15:48
minimalok, i'll have a look and try and add FreeBSD support while I'm at all15:49
meenait's on my radar, but my radar is currently beeping out of control15:50
minimalwell I'm rejigging the code anyway so it's not much more effort to try and add it15:51
minimalplus wouldn't want my changes to make it any harder to add other os support in future15:51
minimalonce I get a PR together then you can test FreeBSD support for me ;-)15:52
blackboxswok one more upstream release published to ubuntu Lunar: [ubuntu/lunar-proposed] cloud-init 22.4.1-0ubuntu1 (Accepted)  thanks falcojr 21:38
blackboxswfalcojr: plan is to now queue these uploads for ubuntu/kinetic|jammy|focal|bionic. so that when our 22.4 SRU clears the queue, we ping S-R-U release vanguards to assess and approve the 22.4.1 upload containing only the fix https://github.com/canonical/cloud-init/pull/185321:39
-ubottu:#cloud-init- Pull 1853 in canonical/cloud-init "net: skip duplicate mac check for netvsc nic and its VF" [Merged]21:39
falcojrblackboxsw: so we can just let them sit in approved queue until current SRU clears?21:40
blackboxsw@falcojr we can do either. let them sit or I can upload once we vet the ubuntu/* branches and we will only ping from S-R-U review once we've cleared solutions QA.  Probably best if we ping/await  solutions QA results on 22.4 before muddying the upload queue to unapproved (B, F, J, K) series21:42
falcojrI'll see if there's any updates from them, but tomorrow is technically the end of the waiting period21:43
blackboxswyeah let's double check. I really don't want to push a release out if solutions QA doesn't have a +1 for us here21:43
blackboxswespecially given upcoming US-holiday 21:44

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