/srv/irclogs.ubuntu.com/2022/02/10/#cloud-init.txt

blackboxsw+1 apple-corps[m] you could open a browser to https://paste.ubuntu.com/ and ctrl-C -ctrl-v your content into the form there if that helps00:18
blackboxswfalcojr: paride holmanb for tomorrow: typo/thinko on jammy image stream names for azure integration test runs: https://github.com/canonical/pycloudlib/pull/18200:19
ubottuPull 182 in canonical/pycloudlib "azure: fix cut-n-paste image issue" [Open]00:19
blackboxswonce the above lands, we'll need a PR to bump pycloudlib commitish in integration-requirements.txt to tip of main so Jammy Azure builds can start succeeding00:23
blackboxswin cloud-init/integration-requirements.txt that is00:23
apple-corps[m]blackboxsw: sent a response to the email. It seems like the script is valid and where expected. No errors or warning from cloud-init00:45
=== gschanuel215 is now known as gschanuel21
=== jbg7 is now known as jbg
blackboxswsorry falcojr if you'd already looked I fixed the integration test I added on /run/cloud-init/cloud-id PR https://github.com/canonical/cloud-init/pull/124419:21
ubottuPull 1244 in canonical/cloud-init "cloud-id: publish /run/cloud-init/cloud-id-<cloud-type> files" [Open]19:21
blackboxswheh you already  did thanks!19:21
falcojrblackboxsw: literally just approved it =P19:21
blackboxswpycloudlib.Instance.read_from_file got me with the rstrip of whitespace on that one19:22
apple-corps[m]blackboxsw: Any ideas on what I can do next to debug that cloud-init script? I replied via email. It appears that the script is shellified. I run the script as root manually, no errors19:53
apple-corps[m]I replied via email following up on your details regarding the logs, etc.19:54
blackboxswapple-corps[m]: checking now. thx20:03
blackboxswapple-corps[m]: also, the fact that cloud-init status --long in your email said "running" means cloud-init is still trying to finish setup.20:46
blackboxswapple-corps[m]: you might also want to run `sudo cloud-init status --wait --long` on the instance to make sure all of cloud-init's boot/config stages completed20:46
blackboxswif it is taking your system a really long time to get setup, something is likely funky with networking. you can run `cloud-init analyze blame`and `systemd-analyze blame` to get a better understanding of why things are taking so long20:48
blackboxswcjp256: hrm per your mount integration test what lsb_release  did you try to exercise? I'm seeing failures on Jammy due to keys changingt from lsblk --json output.21:25
blackboxswI'll sort it locally and provide a patch suggestion to https://github.com/canonical/cloud-init/pull/1250 otherwise I think we can land it21:25
ubottuPull 1250 in canonical/cloud-init "mounts: fix mount opts string for ephemeral disk" [Open]21:25
blackboxswahh this looks like a jammy `lsblk --json` may have introduced specific json format incompatible 'mountpoints': [...]  instead of 'mountpoint': '...' unrelated to your PR.21:33
blackboxswsuggested integration test diff pushed to https://github.com/canonical/cloud-init/pull/125021:50
ubottuPull 1250 in canonical/cloud-init "mounts: fix mount opts string for ephemeral disk" [Open]21:50
blackboxswthe thing about the _netdev mount option is.... we shouldn't be running mount -a until network is already up because cloud-init doesn't run cc_mount until the init-network stage when network is already up.22:00
blackboxswthat said, we have invalid disk mount options at the moment, we'll fix that in this PR and then look at whether we can actually drop the _netdev mount option in the future22:01
apple-corps[m]blackboxsw: thanks. I will look to collect more information and attempt to resolve the issue or file a report.22:11
blackboxswfalcojr: I pushed the minor integration test change to test_disk_setup as a separate PR https://github.com/canonical/cloud-init/pull/126122:13
ubottuPull 1261 in canonical/cloud-init "tests: lsblk --json output changes mountpoint key to mountpoinst []" [Open]22:13
esvhey ppl, I am working with a customer who's running the following command thru a bootcmd: - cloud-init-per instance <tag> command123.sh 22:32
esvand he swears up and down that the instance was rebooted from the command line and not from the hypervisor. 22:33
esvmy question is why it keeps trying to run it, is it because it has never found the binary b4?22:33
esvoh, the command123.sh script (customer specified full path) does not exist.22:35
blackboxswesv cloud-init analyze show will show number of reboots cloud-init saw and also report whether bootcmd is skipped or not per boot22:38
blackboxsw`cloud-init analyze show`22:38
blackboxswoops. esv, also the bootcmd module runs always (every reboot) so script will have to be cognizant of idempotent behavior across reboots see: `Module frequency: always` @ https://cloudinit.readthedocs.io/en/latest/topics/modules.html#bootcmd22:40
blackboxswit's different than runcmd module which is `Module frequency: once-per-instance` https://cloudinit.readthedocs.io/en/latest/topics/modules.html#runcmd22:41
blackboxswwhich means cloud-init will only re-run runcmd if instance-id changes in metadata22:41
blackboxswsorry, I have split my attention here and may have misread the initial question/intent22:42
esvno worries, this information is much appreciated and helps me work on a different case. 22:43
blackboxswyeah mixing cloud-init-per instance in bootcmd is interesting. I'll peek at that in lxc launches to see if it holds up across reboot22:44
esvit is interesting how I tried to change  the home directory of a user with a runcmd and with a per-instance script, the runcmd seems to be winning all the time22:44
blackboxsws/hold up/doesn't fire/22:44
blackboxswesv, funny that up until now I don't think I've yet used cloud-init-per, I'm walking through how it looks at cloud-init's semaphores etc to see if that's not working as desired22:50
blackboxswesv are we sure `cloud-init query instance-id` isn't changing across boots?22:51
esvthat's the beauty of my job, everyday I get to learn how customers are shooting themselves in the foot22:52
blackboxswso I can confirm the shallow understanding that cloud-init-per instance SOME_TAG echo 'madeit' will run once and only once unless instance-id changes22:54
blackboxswI can also confirm that if customer's <tag> changes it'll keep running that thing as if it is a new instance-id22:55
esvthe strange thing is that customer keeps getting error messages that the file doesn't exist on every reboot22:55
blackboxswso if <tag> changes across reboot, the script will run again22:55
blackboxswroot@dev-b:~# cloud-init-per instance WHATa /root/doit.sh 22:56
blackboxswYEP22:56
blackboxswroot@dev-b:~# cloud-init-per instance WHATa /root/doit.sh 22:56
blackboxswroot@dev-b:~# cloud-init-per instance WHATb /root/doit.sh 22:56
blackboxswYEP22:56
blackboxswroot@dev-b:~# cloud-init-per instance WHATb /root/doit.sh 22:56
blackboxswsorry either instance-id delta or tag delta results in re-trigger22:56
esvtold the customer to fix the script name and move it from bootcmd to runcmd.22:56
blackboxsw+1 that's easiest and runs once per instance (unless they need that script run earlier in boot) and will runcmd will ensure   to get executed if instance-id changes on subsequent boot,  but won't run every boot be default22:58
esvthnx22:58
blackboxswno worries22:58
blackboxsw16:18:57 err_msg    = "No such file or directory: b'lxc'"   well that's strange from our jenkins23:42
blackboxswsure enough23:42
blackboxsw$ snap changes 23:43
blackboxswID   Status  Spawn               Ready               Summary23:43
blackboxsw453  Done    today at 23:15 UTC  today at 23:16 UTC  Auto-refresh snap "lxd"23:43
blackboxsw$ date23:43
blackboxswThu Feb 10 23:42:41 UTC 202223:43
blackboxswrekicking the lxd_container job23:43

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