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

minimalmeena: nope, you'd have to boot off some other media and chroot into the OS to run grub-install00:32
irshadhHi. I made a mistake on the Canonical CLA form here (https://ubuntu.com/legal/contributors/agreement). Is there a way to correct it? Thank you.04:25
=== nikolay_ is now known as hjckr
meenahttps://marc.info/?l=openbsd-ports&m=170488957300891&w=2 this is a lot of feedback13:32
holmanbirshadh: just sign it again with the correct information 14:07
holmanbmeena: that is a lot14:11
holmanbmeena: this one looks like it is based on false assumptions:14:11
holmanb> that way the user gets the templates somewhere in the system and they can choose when to use them.14:12
holmanbsince these template files don't get selected by users but by code, right? 14:13
holmanbminimal: does alpine use isc-dhclient?15:06
holmanbI don't see it in the depends https://git.alpinelinux.org/aports/tree/community/cloud-init/APKBUILD15:06
holmanbI've never looked at an APKBUILD before, but they look pretty intuitive15:08
holmanbminimal: also, I'm guessing that py3-tox isn't needed in checkdepends, since the check function only contains `python3 -m pytest` and doesn't invoke pytest via tox15:11
holmanbhappy to toss a PR for that if you want it, but not really sure where/how to do that15:12
minimalholmanb: Alpine *can* use dhclient, udhcpc is the default DHCP client as it comes wityh Busybox, for more info regarding DHCP client see the "Additional Alpine packages required by specific DataSources" section of https://git.alpinelinux.org/aports/tree/community/cloud-init/README.Alpine16:17
holmanbminimal: ahhh, that has the missing information I was looking for16:18
minimalI specifically did not add dhclient as a dependancy and Alpine packaging does not have "Suggests" or "Recommends" unlike Debian/Ubuntu16:18
holmanbthat makes sense, thanks!16:18
minimalbasically once c-i creates a ENI file it then runs "ifup" which handles finding an installed DHCP client to use (udhcpc, dhclient, dhcpcd)16:19
holmanbgotcha16:20
minimalthe only "issue" is where c-i wants to run a DHCP client directly itself for ephemeral DHCP, which is why I added that note16:20
holmanbI would expect udhcpc to work in ephemeral on several clouds16:21
holmanbI think udhcpc needs to add classless static routes and support for unknown options to work on OpenStack and Azure, maybe some others too16:21
minimalholmanb: APKBUILD files AFAIK are "conceptually based on" Gentoo's PKGBUILD files16:21
holmanbPKGBUILD are arch no?16:22
minimalok? perhaps you're right, I forget :-)16:22
holmanbbut yeah looks similar to a PKGBUILD, and also not that different than Gentoo's ebuild either16:22
minimalre: udhcpc, well that README does refer to using dhclient with those DSes as a requirement/"safe" choice16:23
holmanbagreed - the readme is how I'd write it16:23
holmanbthe contributor who added udhcpc support said they'd come back to finish it, but never did16:24
meenaholmanb: yeah, but i think a lot of unix grey beards are still rubbed the wrong way by a thing called templates being in etc16:24
minimalas for py3-tox, ok I'll try a package rebuild without it to verify. I *think* someone else might have added that dep as originally the package didn't run any tests at all and someone else (2 years ago?) then enabled the tests16:25
holmanbI'll add an issue on GH for finishing udhcpc and ping them in case they feel like finishing it16:25
minimalmeena: if you look at my Alpine packaging I actually remove all the non-Alpine and non-general templates16:25
minimallikewise I remove non-Alpine modules (i.e. Debian APT ones etc)16:26
meenawhy not allow people to transform alpine onto Debian using cloud-init 16:27
minimalI once tried removing all the non-ENI network ones but then had runtime errors and so left those in16:27
holmanbminimal: sounds good. Tox is just used during development and in Github Actions to manually install the python dependencies using pip and requirements.txt (and the other requirements files). On distros you probably want to test with the distro-provided dependencies, tox doesn't really make sense (and in your case isn't even used).16:27
minimalI'm not sure what "transform alpine onto Debian using cloud-init" means16:27
minimalyou mean replace an installed and running Alpine system with a Debian one?16:28
meenacc_debianize.py16:28
minimalwhat is cc_debianize.py? That's not in the c-i source16:29
meenabecause I just made it up16:30
minimalso I'm still not sure what you're referring to16:30
meenabut, like, have you never bootstrapped Debian from some other OS? or perhaps in your case bootstrapped Alpine from something else 16:31
meenaanyway, I'm just rambling nonsense, sorry16:31
minimalI did ask whether you meant "you mean replace an installed and running Alpine system with a Debian one?"16:32
minimalin which case the Debian package of clout-init would be installed complete with its Debian templates16:32
meenaI had to, on occasion, bootstrap FreeBSD (zfs) from FreeBSD (ufs)16:33
minimalI'm familiar with the general concept of "installing in place" as people sometimes/often do that for Alpine on VPSes where the provider does not have an option to create an Alpine VPS16:34
minimalbut as I point out the cloud-init package for the "destination" distro/OS will have suitable c-i templates for it to use16:35
meenaminimal: truth is: the reason for my rambling is: I'm deflecting, cuz I'm shying away from that kind of work for any of the BSDs16:41
minimalmeena: https://git.alpinelinux.org/aports/tree/community/cloud-init/APKBUILD#n133 onwards is where I remove non-Alpine-relevant files during packaging16:45
meenaminimal: that's kinda simple enough 17:32
minimalmeena: now you've put the idea in my head of writing c-i user-data use with VPS/Cloud Providers who only have Debian/Ubuntu/whatever cloud-init images but no Alpine image to, on 1st boot, use a script ot replace the host OS with Alpine and then reboot, with the user-data then being used again (for the 1st time by Alpine) to do config :-)18:01
minimalI'll codename it either "Russian Doll" or "Trojan Horse" lol18:03
meenayou're welcome18:06
holmanbcjp256: ping20:01
holmanbcjp256: I see that unknown-245 contains the same address as dhcp-server-identifier on azure. Is it ever the case that these two will contain different values?20:05
holmanbthat code was ported from walinuxagent based on the commit history20:29
holmanband in walinux agent i see a hint for why unknown-245 might be used20:29
holmanba comment in a test introduced in commit c484d3012c0512c2 states "validate that the wireserver address is coming from option 245 (on default configurations the address is also available in the domain-name-servers option, but users may set up a custom dns server on their vnet)"20:30
cjp256holmanb: in theory they could be different.  I understand option 245 was meant to allow for changing the wireserver address, if needed.21:11
cjp256can you link to that commit? I don't see it in my repo21:12
holmanbcjp256: that commit was in walinux agent21:22
holmanbhttps://github.com/Azure/WALinuxAgent/commit/c484d3012c0512c2f6d9406d5c3a1b89d33eb32321:22
-ubottu:#cloud-init- Commit c484d30 in Azure/WALinuxAgent "Take wireserver address from option 245 in DHCP lease (#1303)"21:22
holmanbcjp256: gotcha, no worries I was just asking to be sure it is still needed21:25
holmanbmeena: 22:19
meenaholmanb: 22:19
holmanbI think the temp_utils.py also needs some help with ephemeral directory22:19
falcojrXD22:19
meenamy22:19
meenaI did think, that was too easy22:20
holmanbmeena: probably not a real bug, but probably filling up directory with tempfiles over time22:20
holmanbcould probably just replace _ROOT_TMPDIR with a call to helpers.Paths.run_dir22:20
meenawho's idea was a module global constant anyway?22:23
holmanbI take that back, now that the bsd path is relocated this will cause bugs22:23
holmanbcmd/main.py and cmd/devel/logs.py each define their own /run/cloud-init variable22:24
meenahttps://github.com/canonical/cloud-init/commit/409918f9ba83e45e9bc5cc0b6c589e2fc8ae9b6022:24
-ubottu:#cloud-init- Commit 409918f in canonical/cloud-init "Use /run/cloud-init for tempfile operations."22:24
meenaWe should fix that before the next release22:24
holmanbmeena: the problem isn't the module global constant, the problem is that it only gets used *sometimes*22:25
meenaAlso, the fact that it went unnoticed in tests tells me I've done a bad job testing that change22:25
holmanbalso helpers/azure.py does it22:26
meenafun times22:28
holmanbthere is also a user facing string in devel/render.py that is technically untrue since it _does_ use the right path but has hardcoded /run/cloud-init22:29
holmanbmeena: I can file a bug if you want, lmk22:29
holmanbagreed, should fix it before next release22:30
meenaplease do, I'm in bed rn, and the only thing i need to get up for is to do some things I  forgot in the kitchen22:31
holmanbmeena: sounds good, will do22:42
holmanbalso just noticed a couple of calls to Paths({}), which is no-bueno22:45

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