/srv/irclogs.ubuntu.com/2022/09/14/#cloud-init.txt

toabctlhey cloud-init team. I want to inform you that the focal & bionic lxd metadata updated the nocloud-net templates. Chad told me that I should inform you when this change lands. See https://bugs.launchpad.net/cloud-images/+bug/1988401 for details.11:06
ubottuLaunchpad bug 1988401 in cloud-images "LXD image metadata: Update nocloud-net templates in compressed LXD image metadata for releases older than 22.04 Jammy" [Medium, Fix Released]11:06
acibathanks toabctl. I am seeing some integration tests failing due to the change of behavior (datasource detection) on that change: https://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-bionic-lxd_vm/102 and https://app.travis-ci.com/github/canonical/cloud-init/jobs/58276505412:09
toabctlaciba, https://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-bionic-lxd_vm/102/consoleFull uses serial=20220902 . that should be unaffected so this might be a different problem12:12
toabctlthe error from travis is correct. the error from jenkins seems exactly the opposite. the jenkins error should actually be fixed with the change . maybe you did unconditionally backport the datasource changes in the CI? travis shows:12:15
toabctlif ImageSpecification.from_os_image().release in [12:15
toabctl6110                "bionic",12:15
toabctl6111                "focal",12:15
toabctl6112            ]:12:15
toabctl6113                datasource = "DataSourceNoCloud"12:15
toabctl6114            else:12:15
toabctl6115                datasource = "DataSourceLXD"12:15
acibaI assumed both were caused by the same. We will have a look, thanks!12:21
SDes91Hi all, I am making a bootable disk image using docker containers. I have installed `cloud-init` using the APT package manager. I wish to know how can I configure cloud-init so that it picks up the `user-data` file from a specific partition like that in Raspberry Pi 4 (`/boot/firmware`) partition?14:10
meenaSDes91: cloud-init does a lot of probing to figure out what kind of cloud it's on, and based on that, decides where to look for its user-data15:10
meenaSDes91: you can (re-)run that probing (manually) with /usr/local/lib/cloud-init/ds-identify or wherever that is on Linux15:17
SDes91I am actually planning to use `NoCloud`. So maybe I can symlink the files in the partition to their respective files in the `/var/lib/cloud` directory?15:20
holmanSDes91: not sure exactly what you're doing, but symlinking files shouldn't be necessary for normal cloud-init operation. 15:22
holmanas meena suggested, ds-identify (with a certain env var) should print out NoCloud as an option if your NoCloud partition is detected15:23
holmansomething like this: DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify15:26
holmanadd --force if you already ran it (otherwise it uses a cached result)15:26
holmanalso without the correct partition label and filesystem type, NoCloud will not be detected, so that detail is really important15:28
SDes91holman in a nutshell, I have a custom ubuntu image for ARM64 which is practically is built from the ground up. This includes cloud-init via APT package. I also have to setup custom boot partition for this image, I am assuming based on documentation for NoCloud if my boot partition is of type VFAT, cloud-init will be able to pick the cloud-config15:29
SDes91files in them and setup my hardware device. Am I right to understand this?15:29
holmanSDes91: hmm, I've never tried re-using the boot partition for this, I've always had a separate partition, but I can't think of a reason your approach wouldn't work (but make sure you have the label, per that docs: "The filesystem volume label must be cidata or CIDATA."15:31
holmanSDes91: We have a little demo for NoCloud using qemu that might be helpful to poke at if you have questions.15:33
SDes91I am hoping I can achieve that via `sfdisk` or even with some Hashicorp Packer plugin.15:33
SDes91*fingers-crossed* seems a bit daunting but hope it works out.15:34
holmanSDes91: if you grep the NoCloud doc page for `echo "instance-id` you'll hit a section that shows you how to set up a local file-backed NoCloud disk for qemu that contains the required files.15:34
holmanGood luck :)15:34
meenanothing pre-baked: https://learn.hashicorp.com/search?query=cloud-init&product=packer15:41
SDes91meena I am aware of that hence I had to work through a Repository https://github.com/shantanoo-desai/packer-ubuntu-server-uefi albeit for AMD64 Ubuntu images.15:42
SDes91Packer in essence creates a server where the cloud-init files will be fetched by the emulated image and then be configured accordingly. Only difference for ARM64 (I am basing this on Raspberry Pi) is that typically you add the user-data file already on the boot partition on the SD Card.15:45
meenaSDes91: well, yes, unless your ARM64 is in a different sort of cloud, like oracle's15:49
SDes91True. Packer does provide two builders for ARM images, one of them offers partitioning, so maybe I might be able to create `cidata` partition with the files in them and hope that cloud-init will be able to pick the stuff up "out-of-the-box"15:51
blackboxswfalcojr: holman have you seen the LXD VM recent focal integration test error E       `AssertionError: Unexpected warning count != 0. Found: ["WARNING]: Running ['netplan', 'apply'] resulted in stderr output: \x1b[0;1;31mFailed to connect system bus: No such file or directory\x1b[0m", 'WARNING]: Used fallback datasource']`  I haven't seen it on current `lxc launch ubuntu-daily:focal  --vm --profile pycloudlib-vm-focal-v3`16:57
blackboxswyet it seems I can reproduce that error with our integration tests. ` CLOUD_INIT_PLATFORM=lxd_vm CLOUD_INIT_OS_IMAGE=focal tox -e integration-tests tests/integration_tests/modules/test_lxd.py`16:58
blackboxswWill dig in now and report my findings if it wasn't already talked through yesterday. I'm thinking this was the "other" integration test failure aciba mentioned trying to peek at16:59
falcojryeah, I was wondering if he'd have a status before EOD for him 17:01
falcojrwe have other integration test failures I plan on looking at too for triage 17:02
blackboxswfalcojr: holman I agree we with cjp256 may need better handling of the `DataSource.update_metadata_if_supported` in the event that the datasource is not longer accessible or cloud-init introduces a regression that results in get_data == False across upgrade path. But, I don't think it ecessarily should be fixed in 22.3.2 as it preexists 22.2 and probably needs a more pragmatic approach to how we "stage" metadata updates 18:16
blackboxswbefore persisting them to the obj.pkl. https://github.com/canonical/cloud-init/pull/1725#issuecomment-124709656218:16
ubottuPull 1725 in canonical/cloud-init "define new attribute for pre-22.3 pickles" [Merged]18:16
blackboxsw I don't think it necessarily should be fixed in 22.3.2*.....   cjp256 falcojr holman aciba: Do you think it's reasonable then that we just cherry-pick (instance-id persistence for Azure) b861ea8a5e1fd0eb33096f60f54eeff42d80d3bd and (azure: define new attribute for pre-22.3 pickles) 51351f24d80637b0a58a4c706003e64dd32579b3 to create our 22.3.2 upstream release?18:17
falcojrsounds reasonable to me18:27
holmanno objections from me19:00
falcojrblackboxsw or holman: integration tests are blocked until #1732 (or #1730 if my machine is crazy) merges20:17
falcojrcan one of you take a look, but first test we have the right series20:17
holmanwill do, looking20:18
falcojrI looked through the LXD changelog and didn't see anything regarding this change20:18
blackboxswI also think per cjp256's comment on Azure raising InvalidMetadataException we actually "want" that type of behavior from the Azure datasource when we get past is_platform_viable checks because no non-azure platforms should get into this part of the code, and we want to raise visible errors when that happens instead of "return False" https://github.com/canonical/cloud-init/pull/1725#issuecomment-124725674820:18
ubottuPull 1725 in canonical/cloud-init "define new attribute for pre-22.3 pickles" [Merged]20:18
blackboxsw@falcojr when testing 1732 earlier today I hit a prob on focal (ran  fine on Bionic) with`Failed to connect system bus: No such file or directory` ..... I'll check with 173020:21
falcojrother way around? I just put up 1732. But it runs fine on Bionic? It ran for me on Focal but failed on Bionic still using the NoCloud datasource20:27
cjp256blackboxsw: we are on the same page, pulling in those two fixes would be best for now20:33
holman@falcojr @blackboxsw: confirmed #1732 fails on bionic and not focal locally for me20:35
falcojrhmmm, so my machine is the weird one20:35
falcojrand #1730 is fine for both? (other way to verify is launch bionic-daily and check if it detects LXD or NoCloud)20:36
holmans/1732/1730/20:36
holmansorry mixed up PR numbers there20:36
holman@falcojr @blackboxsw: confirmed #1730 fails on bionic and not focal locally for me20:36
holmanI had both open locally and read the wrong one as typing20:37
falcojrok, that scares me less then20:38
holman:D20:40
holmanand 1732 passes on both 20:45
holman+1 @cjp256, sounds good thanks20:48
falcojrthanks for the reviews20:49
cjp256any idea when a new -proposed will hit to test?21:47
falcojrhopefully tomorrow if all goes well22:01
meenaI could've sworn we had a cloudinit/parsers directory. is that gone? or am i delusional and it never existed?22:04
cjp256falcojr: thanks!22:34
holmanmeena: are you thinking of the one under distros? https://dpaste.org/7Jkcj23:34
=== holman is now known as holmanb
=== holmanb is now known as holman

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