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

habyshey folks, when I add a key for a local package repository via the `user-data` file, it adds the key into /etc/trusted.gpg, which breaks attempting to run `apt update`. Has anyone else run into this?00:45
habysI'm thinking to work around it by putting the keys into /etc/trusted.d/source.gpg manually, but that is a lot more trouble than using the built-in `sources:` section in `user-data`.00:46
holmanhabys: How are you adding the key? Could you share a link to your user-data file?01:32
holmanhabys: What version of cloud-init are you on? There were some recent feature additions in the apt module around key handling.01:34
habysinteresting, I will copy paste the relevant part in a sec01:52
habysI was just taking the down time to write a script to pull down new iso, kernel, and initrd for our ipxe environment01:53
habysI don't know the version of cloud-init, but the installer ISO was from 2022-11-0301:53
habysah: /usr/bin/cloud-init 22.3.4-0ubuntu1~22.04.101:54
habyshere is what I hope is the relevant part of the config, here I am adding our local puppet mirror: https://termbin.com/rgfj01:58
habysoh heh, that's not local, but the idea is the same.01:59
habysI found my notes from setting this up manually, I would take the puppet repo key and put it in `/usr/share/keyrings/puppet7.gpg` then refer to it in `/etc/apt/sources.list.d/puppet7.list`: `deb [arch=amd64 signed-by=/usr/share/keyrings/puppet7.gpg] https://apt.puppetlabs.com jammy puppet`02:49
habysit's pretty late here, so I will probably miss any response. Thank you for looking. I have another question that's killing me.. Every time something isn't perfect in my `user-data` file, I get this crash: https://i.imgur.com/UKBUYIR.png03:36
habysafaict, there is nothing about what caused the crash on the screen and the listed crash file also does not tell what caused the crash.03:37
habysfor example I can put an intentionally bad command in `late-commands:` but I can not grep for it in these logs. Any help there would really really help me, and help me be more self sufficient.03:38
habysty! Good night03:38
meenahabys: autoinstall and cloud-init aren't the same thing07:12
meenaI think you wanna ask #ubuntu-server for help here07:15
habysI thought cloud-init parses `user-data`?11:04
acibahabys: the autoinstall key is treated as an opaque config, the only validation cloud-init does is checking that a version subkey is present: https://github.com/canonical/cloud-init/blob/main/cloudinit/config/cc_ubuntu_autoinstall.py#L13511:10
acibahabys: the autoinstall config is then handed-over to subiquity11:13
acibahabys: autoinstall documentation: https://ubuntu.com/server/docs/install/autoinstall11:14
habysthanks for helping, I'll read this because I am definitely having trouble understanding what the different components are doing11:19
JackHi,13:46
JackFor file ownership issue, could we need to create a new module to handle it?13:46
Jackhttps://bugs.launchpad.net/cloud-init/+bug/1990513/comments/713:46
JackI'd like to hear your advice whether a new module is valuable.13:46
-ubottu:#cloud-init- Launchpad bug 1990513 in cloud-init "write_files defer not using ownership for new folders" [High, Triaged]13:46
falcojrJack: since we already have the functionality in 'write_files', I think the behavior there could be updated13:49
falcojrif a directory already exists, don't modify the permissions, but if it doesn't exist, create it with the owner/permissions specified13:49
JackThanks for your suggestion, I'll try to implement it and file a PR for your review13:55
JackHi15:24
JackI am trying to Sign the Canonical contributor license agreement.15:24
JackWhat should be filled in 'Please add the Canonical Project Manager or contact'15:24
JackIt is a required field.15:24
falcojryou can put James Falcon15:24
JackThanks15:25
JackAnd Launchpad id is username of launchpad, right?15:25
falcojryes, that can be left blank if you don't have one15:26
JackGot it, thx15:26
minimaltail g15:37
minimaloops15:37
minimalmeena: I see you getting a mention: https://www.freebsd.org/status/report-2022-10-2022-12/#_freebsd_as_a_tier_1_cloud_init_platform15:37
meenaminimal: that's not a mention, that's my report 16:04
holmanminimal: any reason you can't can't just mock cloudinit.distros.networking.subp.subp" each each test individually?16:22
holmanminimal: the patch in the shared function goes out of scope when the function ends https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch16:24
holmanI think meena mentioned that in the PR, maybe that got missed16:24
holmanmy gut reaction to that set of tests is that there's a lot of repitition16:28
holman150 lines in that test class and it's mostly copy/pasta -> some parametrization could make that a lot more succinct16:28
holmanbut obviously you didn't write them that way, don't feel like you have to do that16:29
JackHi guys16:29
JackFeel free to review this PR if you have time.16:29
Jackhttps://github.com/canonical/cloud-init/pull/198016:29
JackFix https://bugs.launchpad.net/cloud-init/+bug/199051316:29
-ubottu:#cloud-init- Pull 1980 in canonical/cloud-init "Set ownership for new folders" [Open]16:29
-ubottu:#cloud-init- Launchpad bug 1990513 in cloud-init "write_files defer not using ownership for new folders" [High, Triaged]16:29
minimalholman: I did at first try mocking subp in each test and it didn't work - that was before I decided to move the mock to the _mock_init function16:38
holmanminimal: works for me https://dpaste.org/GPoOp16:42
minimalI haven't had time this week to update the PR with feedback, I'll be doing that later today16:46
holman+1 sounds good16:50
=== EugenMayer591 is now known as EugenMayer59
=== EugenMayer599 is now known as EugenMayer59

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