/srv/irclogs.ubuntu.com/2024/01/04/#cloud-init.txt

minimalok, so they're putting the cart before the horse lol00:01
holmanbyou could say that I suppose00:46
holmanbthe pr description laid out a plan saying that they'll contribute the datasource next, and I know there is some internal pressure to get it to happen so I wasn't too worried about it00:51
holmanbbut I guess normally I'd ask to see the whole PR for a working datasource (though that's admittedly a lot more to review than the +76/-1 they have currently)00:51
holmanbmy main concern with their current approach is that I think it's possible (though unlikely) for a false positive based on that grep in /proc/mounts00:52
minimalholmanb: my fault for not reading the PR properly, doh!00:59
holmanball good :)01:00
minimalI'm curious how a WSL datasource is going to work01:01
minimalespecially as yesterday I was talking to someone trying to get cloudbase-init working on Windows lol01:02
holmanbminimal: its going to be a little weird01:02
holmanbheh, cloudbase-init01:02
holmanbis it still maintained?01:03
minimalyeah it's been around for year, yupe had a look at it yesterday and it has recent commits01:03
holmanbhuh01:03
minimalhttps://github.com/cloudbase/cloudbase-init/commits/master/01:04
* holmanb stops writing words about the aix code02:23
holmanbminimal: oh nice, they plan to add freebsd02:24
holmanbhttps://cloudbase.it/cloudbase-init/02:24
meenai didn't even see https://github.com/canonical/cloud-init/pull/4713#discussion_r1441224689 09:15
-ubottu:#cloud-init- Pull 4713 in canonical/cloud-init "Support for AIX" [Open]09:15
meenaI guess i was too focused on all the other weird things in this09:16
holmanbmeena: no worries, and thanks for starting reviewing it15:09
holmanbmeena: there's a lot of weirdness to chew on15:09
meenayeah, i feel like they need someone to sit down and hold their hand thru this process15:10
holmanbsame15:11
holmanbThat's why i wrote as much as i did in my initial review15:11
holmanbHonestly maybe i should drop the content that i wrote into the docs15:12
meena"so you want to cloud-init to a new platform?"15:12
minimalholmanb: not sure if you looked at the channel logs for the holiday period, I posted some IBM links re cloud-init, seems like the changes in that PR have been used by them for a long time, one doc talking about a REALLY old cloud-init version15:16
meenaminimal: i tried hard to repress those memories15:16
minimalso they're not really porting cloud-init to a "new" platform now, they hacked AIX (and other) support into their own "fork" quite some time ago :-(15:17
meenaminimal: that doesn't explain the syntax errors tho15:18
meena(which i also missed)15:18
holmanbminimal: I must have missed the docs you linked15:18
holmanbminimal: but that doesn't surprise me since the new files have a copyright 201515:19
meenaholmanb: need to go shopping & cooking now. Gimme a shout if you merge my PR so i can update the OpenBSD and FreeBSD ports.15:30
holmanbmeena: will try to re-review this morning15:36
holmanband will ping when done15:36
holmanbmeena: I had one question about print_info() in the review, I don't see changes or response on that so guessing that got missed?15:38
holmanbhttps://github.com/canonical/cloud-init/pull/4677/files#r144107061015:38
-ubottu:#cloud-init- Pull 4677 in canonical/cloud-init "fix(runpath): On *BSD, create /run is not ephemeral" [Open]15:38
minimalholmanb: https://www.ibm.com/docs/zh-tw/powervc/2.0.1?topic=aix-custom-powervc-cloud-init-modules and https://www.ibm.com/docs/zh-tw/powervc/2.0.1?topic=init-installing-configuring-cloud-aix15:38
holmanbthanks minimal15:50
holmanblast updated 2023 and the second instruction says "make sure python 2.7 is installed"15:51
holmanboof15:51
meenaholmanb: oh, you had answered that yourself.17:18
holmanbno, I wasn't answering my own question - just adding context about which ones I think should stay17:19
holmanbI still think we should drop the DI_LOG and ensure_sane_path calls17:19
holmanbunless there is some reason that I haven't realized17:19
meenaI need to go over that code again. sh is just the worst 17:19
meenalike, imagine having data structures, instead of global variables?17:20
holmanbmeena: agreed - could you rewrite ds-identify in rust while you're fixing that? thanks!17:20
minimalplease don't rewrite ds-identify any more until I finish rewriting it! ;-)17:21
holmanbI guess we can all take turns rewriting ds-identify17:22
meenaI think Odd_Bloke started on actually17:47
meenathere's https://github.com/OddBloke/distro-info-rs17:50
meenaah, here it is, https://github.com/OddBloke/rs-identify17:54
meenaoh, and obviously I already contributed FreeBSD support, lol17:57
minimaloh dear, I thought you were joking about Rust...18:01
meenaI just had another discussion in #bsdports with people complaining about having to compile rust so they can compile python-cryptography18:05
meenawhen the real problem is that due to the way our dependencies are structured, every time curl updates, rust needs to be recompiled, which, imo, is the real problem18:06
meenabut i repeat myself18:07
minimalit's not just dependancies, from memory Rust only supports a few archs as "tier 1"...which is not great for distros support a range of archs18:08
meenafun fact: I removed dmidecode as dependency on cloud-init in FreeBSD, so that it could be made platform independent18:10
meenaminimal: I think FreeBSD is a Tier 3 platform…… 18:11
meenaanyway, i don't think anyone is in a hurry to reimplement ds-identify18:12
meenait'd be too much work for too little gain18:12
minimalmeena: yupe, unfortunately as my Alpine-related changes to ds-identify use "virt-what" to detect which VM is used that added "dmidecode" back as an Alpine package dep :-(18:13
minimalvirt-what has dmidecode dep18:13
meenaboooo18:13
meenatime to either fix dmidecode or virt-what18:14
meenaoh, cuz you don't have systemd to tell you what virtualization you're on18:15
minimalvirt-what is using dmidecode, don't have time to try and create a virt-what PR to try and use /sys instead18:15
minimalmeena: yupe, precisely18:15
minimaland I've so far not found a suitable alternative to virt-what18:15
minimalmeanwhile I'm fighting with growpart testcases as I added a new subp call to growpart and need to figure out mocks for those testcases :-(18:17
meenahttps://github.com/canonical/cloud-init/blob/main/tools/ds-identify#L455 that sysctl is so handy18:19
minimalyeah. I'll use virt-what for now but keep an eye out for any suitable alternative in the future18:23
minimalits only 48kB of shell + 172kB for dmidecode so not a large extra dep18:24
meenafor this, https://github.com/systemd/systemd/blob/main/src/basic/virt.c#L24918:36
minimalthat's 1064 lines of non-standalone code, whereas virt-what is shellscript where I could just replace dmidecode calls with reading files in /sys/..............or write my own virt-what alternative in shell also18:42
holmanbyeah I think that there have been a few ds-identify rust attempts in the past19:24
holmanband I was only joking, not in a hurry to replace it19:25
holmanbmeena: FreeBSD & NetBSD are Tier 2 for x86_6419:26
holmanbsame for musl on x86_64 and aarch6419:28
minimalthe Rust "issue" is more about other archs like armv7, ppc64le and riscv64 (and perhaps even more obscure archs that some distros support)19:31
holmanbgiven the linux kernel's ongoing adoption, I'm hopefully that will increase pressure for adding tier 1 support to other platforms over time19:33
minimalalso, perhaps wrongly, I get the impression that the whole Rust dev infra is not really distro-friendly, i.e. "oh yeah that code doesn't work because you're using version A.B.C of dep RANDOM-DEP whereas you need to use the git master/main of RANDOM-DEP from 10 minutes ago"19:34
holmanbtrue - that's always been a problem with OS development though, stability requires maturity and a slower pace of change19:35
minimaland again, perhaps wrongly, I get the impression that some (much?) Rust stuff just doesn't do releases at all19:35
holmanbthere's a reason cloud-init doesn't use the latest jsonschema and tries hard to limit dependencies19:36
minimalwasn't there a "so when will cloud-init be rewritten in Rust?" issue raised a month or 2 ago? lol19:37
holmanbnot sure what you mean by that, crates _are_ releases aren't they?19:37
meenawhoohooo it's 19:38 and kiddo is asleep and it's before 22:30, which i think is the earliest she's been asleep at for the past two weeks19:38
meenaSo much free time now19:38
holmanbminimal: yeah, those kind of issues are pretty narrow-sighted and also too common from rust fanatics - I left the issue open so that if we get any more I can close them as duplicates19:39
holmanbmeena: think we can land the /run one today?19:39
minimalholmanb: I've never touched Rust myself so I'm probably getting the wrong impression of some stuff but from watching comments in the likes of the alpine devel channel, especially when a new Rust version comes out and it has to be bootstrapped etc19:40
meenahow many thousands lines of code is cloud-init?19:41
meenaand how many person-years of engineering is it? 19:42
holmanbexcluding tests, the python code in cloudinit is around 67k LOC19:43
holmanbincluding tests somewhere around 150k19:44
meenaif we set out today to rewrite it bit by bit, with all that we know, about clouds and distros, not so much about python quirks, how many years of engineering would it take to replicate that (while picking up on rust quirks?)19:44
holmanbnot stripping whitespace: `find cloudinit -name '*.py' | xargs wc -l`19:44
minimalmeena: perhaps look at what was the CoreOS c-i alternative in GoLang (is "ignition" the same code or another rewrite?)19:45
holmanbignition is CoreOS-only last time I checked19:46
holmanband runs from initramfs19:46
holmanbyeah no clue on the engineering time, and frankly not interested in a feature-for-featurer rewrite in any language19:46
holmanbimproving performance by augmenting certain parts of cloud-init in a different language might be feasible19:47
minimalI've not seen any c-i alternative that comes close to c-i in terms of matching its functionality, they usually just implement a few DSes19:49
meenaand only a few modules19:51
meenaholmanb: here's what's happening without the DI_LOG=stderr21:03
meenatools/ds-identify: 185: 3: Bad file descriptor21:03
meenatools/ds-identify: 185: 3: Bad file descriptor21:03
meenaholmanb: i removed `set_run_path`, because that, as it turns out, is not necessary21:47
holmanbhow are you running it? 22:40
holmanbmeena: see my latest comment22:46
meenaholmanb: set_run_path needs to come after read_uname_info22:53
meenaotherwise, i might have to do this:22:54
meenahttps://gist.github.com/igalic/1a959dbeb0f81a516e5a29a518419dfd to ensure we stay working on Linux by default…22:54
holmanbAhhhh, I forgot that22:55
holmanbthat explains why the DI_LOG issue22:56
meenait does?22:56
holmanbBecause DI_LOG is set in set_run_path22:56
meenaduh, that's why i have to override it22:57
* meena shouldn't be doing 3 things at once 22:57
holmanbYou and me both multitasking a bit too much22:57
* holmanb is reviewing like 3 PRs at the same time22:58
meenaI'm writing a project plan, rewatching Life on our Planet for the third time, and trying to make sense of 2000 lines of sh22:58
holmanbI might have an idea for this23:02
meenai could also just bomb out in set_run_path if DI_UNAME_KERNEL_NAME isn't set23:04
holmanbNeed to drive across town jn a snowstorm first, but i think this is best fixed in the logger function23:07
holmanbCheck id DI_LOG is set to "" and set to stderr if not23:07
meenaholmanb: okay, done.23:18
holmanbMade it23:27
holmanbsnack then ill review23:28

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