/srv/irclogs.ubuntu.com/2024/12/15/#cloud-init.txt

* dilfridge gives up further attempts for today ("clearly I'm holding it the wrong way up")00:02
minimaldilfridge: as an Alpine user I don't use cloud-init with systemd so I'm unfamiliar with the services00:30
minimalthere was some systemd "simplification" as part of #5818 and #583000:31
holmanbdilfridge: lmk if you have questions after reading 548900:59
holmanbThe breaking changes doc page has some more info regarding that change00:59
holmanbAnd the blog post should help too, which I can link if you can't find01:00
holmanbdilfridge: but yeah enabling that service isn't the expected way to enable cloud-init01:01
holmanbit's not very well documented, but there is a systemd generator which should automatically enable cloud-init01:04
holmanbIt uses ds-identify to identify which cloud it's running on01:04
holmanb(and if it can identify a cloud at all)01:05
holmanbIf it identifies a cloud, then it adds cloud-init.target to the systemd boot transaction01:05
holmanband the other services get pulled in via respective WantedBy=cloud-init.target01:06
holmanbThis allows a single image to launch on various different clouds and run the correct logic.01:09
holmanbAlternatively if you want your image to be tailored to a specific cloud you could set a single datasource01:10
holmanball of this is true before and after #5489, hopefully this context helps01:13
holmanbdilfirdge: not sure about the broken link, would need more context 01:15
holmanbdilfridge: oh, and cloud-init.service was renamed to cloud-init-network.service for exactly the reason that you stumbled on01:19
holmanbit's perfectly reasonable for a person to assume that enabling/starting cloud-init.service is how to interact with the cloud-init service - but that couldn't be further from the truth01:19
holmanbcloud-init.service is the second of four services, that run at different times - nothing more, nothing less01:20
holmanbs/is/was/01:20
holmanbcloud-init.service was a terribly confusing name for the second stage01:42
holmanbthere are reasons why it was named that way but those reasons are just a historical footnote today01:42
holmanbThe change we made is painful, but hopefully for the better in the long run01:44
holmanbdilfridge: recommended reading -> https://cloudinit.readthedocs.io/en/latest/explanation/boot.html01:44
holmanbdilfridge: we should talk about systemd ordering for gentoo too when you get a chance 01:54
holmanbBut I'm off for the night01:54
dilfridgeno offense and sorry if I'm asking stupid stuff, but ... even the boot ^ description page does not answer - what initiates the first step? i.e. what runs ds-identify ?13:22
dilfridge(hmm, apparently the systemd generator does that...)13:28
dilfridgehmm the problem seems to be that ds-identify does not find the cdrom image for NoCloud13:32
dilfridgeno, it does find the iso - "ISO9660DEVS=/dev/sr0=CIDATA" and "Found single datasource: NoCloud"13:49
dilfridgels13:49
dilfridgeoh LOL... " ... line 1: netcat: command not found"13:51
* dilfridge adds netcat to runtime dependencies13:51
holmanbdilfridge: specifically net-analyzer/openbsd-netcat14:20
holmanbBecause unix socket support14:21
holmanbdilfridge: no offense taken :)14:22
holmanbOkay I see you figured that out already 14:27
dilfridgehttps://github.com/canonical/cloud-init/pull/593314:30
-ubottu:#cloud-init- Pull 5933 in canonical/cloud-init "fix: use program name of netcat as installed by upstream, 'nc'" [Open]14:30
dilfridgenetcat installs itself by default only as "nc", the long name is debian/ubuntu special14:30
dilfridgeand now it works again :)14:31
holmanbAt least one other distro uses it - arch I think? 14:33
holmanbBut if nc is more standard then of course we should use that14:34
holmanbThanks for the PR! 14:34
holmanbProbably won't get to it today14:35
dilfridgeI checked our build system and it doesn't pass any specific binary name, and I checked the ubuntu control file, where "netcat" is added as slave under alternatives14:35
dilfridgeno hurry14:35
holmanbGlad you got it working again14:35
dilfridgelearning a lot here :D14:35
holmanbHeh, yep :)14:36
holmanbAnd if the docs are lacking PRs and reports are always welcome.14:37
holmanbThe docs have come a long way in the last couple of years but they still have a long way to go14:38
dilfridgethe next image build is in a few hours, then with 24.4 and the patch, looking forward to trying that out14:40
holmanbNice14:41
holmanbThere's also a dependency that was dropped in the last year-ish: python3-netifaces14:42
holmanbI don't remember if we got that updated in gentoo or not14:42
holmanbAnd I don't recall if gentoo had any distro-dependent tests disabled, but if so those can probably be dropped14:44
holmanbBecause we cleaned up some distro dependant test failures and added an alpine-based unit test job to ci14:45
dilfridgeI'll have a look, sure15:07
dilfridgelooks like nothing creates the dir /run/cloud-init/share  yet23:25
* dilfridge needs to verify that still, but tomorrow23:25
dilfridge(that makes the generation of the sockets fail with "No such file or directory" in every service)23:31
dilfridgeroot23:39
dilfridgeoops23:39
dilfridgealso, do the 4 services have to be enabled "manually" or is the generator somehow supposed to take care of that? :|23:40
holmanbGenerator does that23:55
holmanblike I said, the generator enables cloud-init.target23:56
holmanb(it just manually creates the symlink)23:56
holmanbAnd the other services have WantedBy=cloud-init.target in the [Install] section23:57
holmanbErr, /run/cloud-init/share should be generated automatically.23:59
holmanbPastbin a log? 23:59

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