/srv/irclogs.ubuntu.com/2022/07/29/#cloud-init.txt

=== danieli6 is now known as danieli
anankeI have a weird issue, where identical (and fairly simple) cloud-init config passed via AWS userdata behaves just fine on Amazon Linux 2, but on ubuntu and kali AMIs (haven't tried any more) cloud-init seems to try to actually _execute_ /var/lib/cloud/instance/user-data.txt16:24
anankehere's a sample log: http://sprunge.us/tlrTjt16:24
blackboxswthat does seem weird. have any sample userdata for us?16:24
blackboxswwow that's strange16:25
blackboxswananke: I think the past of /var/log/cloud-init.log would be more helpful to supplement the cloud-init-output.log you pasted16:25
anankenow here's the interesting part: those config directives are in fact executing just fine, because files are written as per write_file, etc16:25
anankelemme get the sample userdata16:26
blackboxswcool `sudo cloud-init query userdata` may help on that system16:26
blackboxswbe wary of credentials :)16:26
anankehere's the userdata: https://dpaste.org/QJXDs16:27
anankehere was the full log: http://sprunge.us/NCSfcU16:28
anankeI'm going to kick off a sample ec2 instance and run that query command16:29
anankehmm, vanilla ubuntu doesn't show those problems, wonder if it's something we have in our cloud-init's configs in AMIs we created. though I do get the error about : /var/lib/cloud/instance/scripts/runcmd: 2: source: not found16:38
blackboxswthx for the example wonder if         ${WaitConditionHandle} needs to be escaped in this case.  but this example will give me something to play w/ in `lxc launch ubuntu-daily:kinetic -c user.user-data="$(cat your-data.yaml)"`16:38
ananke${WaitConditionHandle} is populated by cloudformation in this case, and should be one line (though it's a long URL)16:40
blackboxswananke try cat ​/var/lib/cloud/instance/scripts/runcmd  I presume cloud-init shellifying your code isn't rendering what you expect it to16:40
blackboxswyou should be able to invoke that runcmd script directly with sudo to test debug expected behavior16:41
anankethanks, I'll take a look16:41
anankehave been at this all morning. what's frustrating is that on amazon linux 2 it seems to work just fine, while the other AMIs I'm using seem to be showing those errors, AND they seem to execute the commands from `runcmd` _twice_. Once, earlier in the boot, then a minute or two later16:42
anankeohh, interesting. 'source' error is because #!/bin/sh is used16:53
anankewonder if amazon linux 2 uses bash to construct runcmd script16:54
blackboxswsorry,  went into a hole on review of Ubuntu uploads for a bit. testing of lxd_container with tip of main is green  https://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-kinetic-lxd_container/50/ Azure still in progress https://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-kinetic-azure/51/.19:00
blackboxswgetting an aws runner going to confirm we are good for a quick release of tip into ubuntu kinetic19:01
blackboxswhttps://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-kinetic-ec2/48/ running now too. once we see results here, I will publish https://github.com/canonical/cloud-init/pull/1625 to Ubuntu 22.10 (kinetic)19:04
ubottuPull 1625 in canonical/cloud-init "Ubuntu/devel: New upstream snapshot 22.2-112-g78941a75-0ubuntu1~22.10.1" [Open]19:04

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