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

anis there somewhere that talks about how to install all the necessary import modules? Like a pip requirements ?04:28
aniI am getting this error04:29
aniE   ModuleNotFoundError: No module named 'configobj'04:29
aniERROR: InvocationError for command /home/cavery/build/cloud-init-centos/ani-cloud-init/cloud-init/.tox/py3/bin/python -m pytest -vvvv --showlocals --durations 10 -m 'not hypothesis_slow' --cov=cloudinit --cov-branch tests/unittests (exited with code 4)04:29
anii see https://github.com/canonical/cloud-init/blob/main/test-requirements.txt and https://github.com/canonical/cloud-init/blob/main/requirements.txt04:49
holmanbHi ani o/04:59
holmanbani: tox should automatically handle that05:01
holmanbBut yes, the files you mentioned should provide the required dependencies for unit tests05:03
holmanbi don't know that we document it explicitly for users - test deps should be handled by tox automatically and packaging should already work, so i don't think there's really an expectation for users to need to know which external module dependencies to provide05:05
holmanbAlso I just tested with tox from epel on centos 9 stream, looks like tox installed deps correctly with `tox -e py3`05:17
holmanbAlthough two tests just failed... 05:19
holmanbHeh, okay tar is a unit test dependency I guess05:20
aniOK05:45
=== kilian is now known as holzingk
holmanb_weeeeeee16:56
holmanb_all the bsd PRs16:56
holmanb_meena: when you get a chance could you peak at this one: https://github.com/canonical/cloud-init/pull/468316:56
-ubottu:#cloud-init- Pull 4683 in canonical/cloud-init "fix: IscDhclient discover DHCP leases on FreeBSD" [Open]16:56
holmanb_oh hi ubottu, ears burning?16:56
holmanb_meena: it's pretty short: +7/-1 for LOC changes, plus tests16:58
meenaholmanb: looking17:22
meenaholmanb: what does "This change adds allows discovering such lease files." this mean?17:24
holmanb"such" could be substituted with "those" in that sentance17:25
holmanbIt's referring to the leases at that path17:26
meena"adds" vs "allows" feels like an either/or thing17:29
Code_Bleumeena: holmanb: I thought I tested this on OpenBSD before and it worked, but now I'm not sure.  Now when I run 'cloud-init analyze show' I get this - https://sprunge.us/begTkI18:59
meenaCode_Bleu: did you delete the appropriate .pyc files before applying the patch?19:00
Code_Bleumeena: pretty sure before I created this image I'm working with I manually cleared out everything and even ran pip uninstall cloud-init , rm -rf /run, cloud-init clean --logs...etc19:02
meenaCode_Bleu: so you're testing this patch, or what exactly are you testing right now?19:06
Code_Bleumeena: I'm not really testing anything.  I'm on an instance of OpenBSD that I created  several days ago ...right have my PR was merged.  I just so happened to connect to it and run the 'cloud-init analyze show' and got that error19:07
meenaaaaah19:07
meenaokay, so we need to fix that then.19:07
meenathat works somewhat betterer on FreeBSD, so we want at least that level of support in allBSD19:08
Code_Bleuare you able to confirm on your end that it is an issue and it's just not me ๐Ÿ˜‰ 19:08
meenaCode_Bleu: can you open a bug for that?19:08
meenaneed to put kiddo to bed now, so I'll take care of it after19:09
Code_Bleu๐Ÿ‘ 19:09
Code_Bleumeena: disregard.  I'm an ID10T.  My stupid logs were 0 bytes in size, so I must have cleared it or something.  So, obviously the analyze wont work without data to analyze :facepalm:19:15
meenawhy not tho?19:22
meenaI would expect more sensible error message than a cryptic exception 19:25
holmanb_thanks for reviewing that meena19:31
holmanb_we've talked about making that function distro-specific before, I think (in a review of some different code, iirc)19:32
holmanb_or maybe that was with minimal?19:32
holmanb_while back, can't remember19:33
meenathe getter functions at least19:33
holmanb_yeah exactly19:33
holmanb_the filename check I don't care about so much, that's just checking string values in memory19:34
Code_Bleumeena: good point.  have it check if logs are not 0 bytes for starters ๐Ÿ˜„ 19:35
holmanb_wait19:35
holmanb_oh nvm19:35
holmanb_Code_Bleu: agreed, if we can report better errors, we should19:36
holmanb_meena: and moreso to make it easier to refactor in the future into methods in distro/19:36
Code_Bleuhttps://github.com/canonical/cloud-init/issues/468619:42
-ubottu:#cloud-init- Issue 4686 in canonical/cloud-init "cloud-init analyze on OpenBSD needs better error handling" [Open]19:42
Code_Bleumeena: holmanb_ ^19:43
holmanb_Code_Bleu: appreciated20:02
meenaCode_Bleu: i would venture a guess that this particular behaviour won't be restricted to OpenBSD 20:19
Code_Bleumeena: I was thinking the same thing, but thought I'd be specific and not assume it did work on other OS or other BSD.  If ya'll think it makes sense, I can remove 'OpenBSD' from the bug.20:25
Code_BleuI'll leave the Env details of the OS I ran it on OpenBSD, but I'll update the description to just be generic.20:26
Code_Bleumeena: updated20:27
meenaCode_Bleu: thanks.20:50
Code_Bleumeena: well ๐Ÿ’ฉ  We prob should have updated the 'build-on-openbsd' to remove the dmidecode with your #4654 PR ?20:55
Code_Bleuhttps://github.com/canonical/cloud-init/blob/4006c23cba5a5e65f0dba4db97491a09cd9a851e/tools/build-on-openbsd#L1520:57
holmanbAh well, we can do that in a followup Code_Bleu 21:47
holmanbCode_Bleu: have you tried running unittests on OpenBSD? 21:49
holmanbCurious if they pass21:49
meenaholmanb: my guess is that more tests fail than on FreeBSDโ€ฆ and on FreeBSD currently only 2 tests fail with python netlink patches21:52
meenaOpenBSD has no netlink, so those will fail for sure, and should be excluded from running / expected to fail on not (Linux / FreeBSD)21:52
meenaI still haven't figured how to fix those damn ls output tests21:53
meenaCode_Bleu: tox -e py3 # should do everything needed, but you'll need tox and bash as a start21:53
meenaCode_Bleu: the next iteration should be to make dmidecode the fallback on OpenBSD21:59
meenaholmanb: need to fix this one https://gist.github.com/igalic/d7770b21294d95bfdbae505e122d0a6822:14
holmanbtar is also required if it's not already installed 22:15
meenaholmanb: tar is in the base system on BSDs22:18
meenaon OpenBSD, perl is still in base@22:18
Code_Bleuholmanb: meena: I have ran tox -e py3 before, but not sure how that relates to not removing the dmidecode from the 'build-on-openbsd'.  Or maybe you were asking for other reasons?22:26
meenaCode_Bleu: how badly does tox -e py3 fail on OpenBSD?22:27
Code_BleuI had tested using meena's fix before it got merged and had dmidecode removed from my test system and it all worked.  I just didn't remove it from my PR since meena's PR hadn't been merged yet and forgot to mention to have that just removed from the build-on-openbsd as a package requirement.22:28
meenaCode_Bleu: to be fully functional, it's still a dependency, but now it's very optional22:29
meenagiven that we kinda cover  75% of all requests that our sources ask of dmidecode22:29
Code_Bleumeena: correction.  I ran the tox -e py3 on the repo that was on my local Gentoo box.  I never ran it on OpenBSD itself.  I just ran it for purposes of getting tired of pushing commits up and the CI fail :P 22:29
Code_Bleumeena: so we just plan on keeping dmidecode as a package that the build-on-openbsd is going to install?22:31
meenaCode_Bleu: i'm torn, but my instinct is to rip it out22:31
meenaholmanb: those ls tests already have @pytest.mark.parametrize, i wonder if i can use that to say, this is what it says on busybox / BSD22:36
meenaminimal: how come we have no cloudinit.util.is_Alpine() ?22:46
meenaI have committed a crime: https://gist.github.com/igalic/b4ff1fefad329331f43d1f74bfdc44c923:07
minimalholmanb: which function were you referring to?23:07
minimalmeena: isn't that covered by is_Linux() ?23:12
meenaminimal: no, busybox ls and gnu ls work differently23:12
minimalok, but that has nothing to do with Linux / not Linux23:13
meenabusybox and BSD agree on the output, but disagree on the return code 23:13
minimalso where are you expecting that any is_Alpine() function may be needed?23:14
meenareally, so far, just for this stupid test23:14
minimalwhich test?23:14
meenamaybe i should rewrite it to something more sensible23:14
meenasee this patch, https://gist.github.com/igalic/b4ff1fefad329331f43d1f74bfdc44c923:14
minimalAlpine can have either Busybox tar or "fall fat" tar installed, do determining if code is running on Alpine does not indicate which version of tar is installed...23:17
minimalthe only way to know is do so "tar --version" or equivalent23:17

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