/srv/irclogs.ubuntu.com/2020/01/23/#cloud-init.txt

Xat`hello guys09:22
Xat`how is scripts-per-instance determined ?09:22
Xat`how cloud-init knows about the first boot ?09:23
powersjXat`, the instance-id is read, if that changes it is considered a new instance09:28
Xat`powersj: I am testing with local instance on vbox, how this is implemented ?09:32
Xat`On cloud provider, I guess instance-id is retrieve from instance metadata . How it works with vbox or vmware09:35
Xat`wait a min, maybe cloud-init provides it09:35
Xat`let me query the metadata url09:35
Xat`ok no it does not09:36
Xat`powersj: nvm, I gonna read about instance metadata with cloud-init ;)09:38
Xat`I changed the value from /run/cloud-init/.instance-id , then did a reboot but the script in the scripts-per-instance has not been executed09:40
=== cpaelzer__ is now known as cpaelzer
Odd_Blokeblackboxsw: You have some changes requested on https://github.com/canonical/cloud-init/pull/70 if you want to take another look15:53
blackboxswOdd_Bloke: otubo. https://github.com/canonical/cloud-init/pull/70 looks good. was there a Launchpad bug related to this commit set?16:31
blackboxswI've approved  pull 70, just didn't squash merge yet incase we forgot to correlate to a launchpad (or redhat bug)16:32
blackboxswahh yes there was16:38
blackboxswhttps://bugs.launchpad.net/cloud-init/+bug/178178116:38
ubot5Ubuntu bug 1781781 in curtin "/swap.img w/fallocate has holes" [Medium,Confirmed]16:38
blackboxswok I'll tie that bug to the squashed commit message16:38
blackboxswohh interesting Odd_Bloke paride, on an azure vm where I've config'd ipv6 and ipv4 on nic0  and only ipv4 on nic1. IMDS is showing/allocating ipv6 addresses to nic1.17:21
blackboxswcloud-init query ds.meta_data.imds.network | pastebinit17:21
blackboxswhttp://paste.ubuntu.com/p/T2CSCQTRVC/17:21
blackboxswI think we may have a minor issue t to file for clarity with azure folks.17:22
Odd_BlokeYeah, sounds like some clarification is necessary.17:31
akiki expected a non-zero exit code if the events log says container die17:45
akikuhh wrong channel17:45
cyberpearany chance of passing the cloud-init config via `-fw_cfg` option of qemu? kind of like how Fedora CoreOS does its ignition config? `--qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=/path/to/example.ign"` https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/#_launching_with_qemu18:02
Odd_Blokecyberpear: Using the firmware configuration like that isn't supported, so the two options I would suggest are using the kernel cmdline or a NoCloud metadata drive.  Both of those options are documented at https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html#datasource-nocloud18:50
Odd_Blokecyberpear: (You can also file a feature request using the bug link in the topic, if you'd like. :)18:51
Odd_Blokeblackboxsw: https://github.com/cloud-init/ubuntu-sru/pull/87 <-- for your review; in particular, review of the verification script before I start running it for all releases would be appreciated :)19:53
blackboxswOdd_Bloke: looks good. The testing you are doing there is probably a bit deeper than needed as we could have used `lxc exec test-$SERIES -- cloud-init devel net-convert --output-kind=netplan --directory /out.d --network-data=network.yaml --distro ubuntu` and validated the output results instead of having to setup an lxc and override configs.    Did you want to exercise the whole system instead, it is definitely21:16
blackboxswmore thorough to setup lxc network on launch and your test is valid21:16
blackboxswcomment and pointer added https://github.com/cloud-init/ubuntu-sru/pull/87 take what you will.21:24
ahosmanMSFTHi @blackboxsw it's been a while, I've been inbetween teams. I I noticed azurecloud integration has an issue with the function _wait_for_system(self, wait_for_cloud_init) in the base instance.py class. This function is called after the vm is booted and tries to run a script and ssh. When removing that function there are no ssh issue's, but for now it ssh'ing is 50/50. Can you help me look into this?21:32
blackboxswhi ahosmanMSFT.21:33
blackboxswis that failing due to timeout?21:34
ahosmanMSFTYes21:34
ahosmanMSFTWhen I remove that function it's a 100% success21:36
blackboxswso on a test run that did fail you'd probably want to pass --preserve-instance and see if ssh connectivity came up sometime later after the default boot_timeout that you have set for azure which is 300 seconds.21:38
blackboxswon a test system that is retained (and exhibited the timeout failure) I'd be curious to see cloud-init analyze blame to see if cloud-init was spending an inordinate amount of time setting up21:40
ahosmanMSFTI did some tests and ssh connective is available, I think it has to do with either the scripts or something else in that function21:40
blackboxswif cloud-init setup on Azure is < 30 seconds, then the issue is somehow that the initiall ssh connection to the vm is timing out without connect21:40
ahosmanMSFThmm I haven't run blame on the system21:40
ahosmanMSFTI presume it it has nothing to do with ssh'ing it's self, but the wait  part because it ssh's immediately when that function is removed21:42
blackboxswahosmanMSFT: also what that 'script' waits for is for a systemd enabled system to report either `systemctl is-system-running == 'running' or 'degraded'`21:42
blackboxswso checking `systemctl is-system-running` on the system will tell you what state it is in21:42
blackboxswahosmanMSFT: and a `systemd-analyze blame` on the timedout system will also tell you where the boot process spent most of it's time21:43
blackboxsw*its*21:43
ahosmanMSFTOk, I'll try that and let you know. Got a meeting soon though.21:54
Odd_Blokeblackboxsw: https://github.com/canonical/cloud-init/pull/185 <-- very small CI fix/change22:04
Odd_Blokeblackboxsw: And https://github.com/cloud-init/ubuntu-sru/pull/8822:14
ahosmanMSFTDo cloud tests run every PR, I know they run every night @blackboxsw22:20
Odd_BlokeWe run a subset of the lxd tests for each PR.22:32
Odd_BlokeBut the full LXD test suite and the non-LXD test suites only run nightly.22:32
ahosmanMSFThow about azure/ec222:34
Odd_BlokeAs I said, the non-LXD test suites only run nightly. :)22:37
ahosmanMSFTok, that makes sense since those tests would consume more time22:37
blackboxswmore time and more $$  spinning up instances on the clouds :)22:50
meenaOdd_Bloke: what about contextlib vs contextlib2?22:51
blackboxswahosmanMSFT: did you know the azure instance type which exhibits byte-swapping behavior?23:01
blackboxswI'm trying to validate that your fix resolves the issue w/ incorrectly seeing 'new' instance-id across boots23:01
blackboxswas that fix is part of this SRU23:01
ahosmanMSFTIt was on all Azure gen2 VM's when switching nodes on azure23:02
blackboxswthanks ahosmanMSFT23:02
ahosmanMSFT@blackboxsw I'm witnessing some weird behavior if azurcloud/image.py two different if statements one executes one doesn't they both have the same self._img_instance value of NONE, can you verify this. This is why images aren't launching on azurecloud integration tests. https://paste.ubuntu.com/p/VW8SH8QXsj/23:15
Odd_Blokemeena: I haven't looked at it yet, but I assume it can go?23:19
blackboxswahosmanMSFT: is self._img_instance the string "NONE" instead of the python value of None?23:25
blackboxswthat would trigger one path to run, and the other not23:25
ahosmanMSFTThey both have the same value, you can see when it’s initialized in azure cloud/image.py.__init__23:27
blackboxswahosmanMSFT: your             LOG.debug("self._img_instance: %s" % self._img_instance) is down below  self.platform.create_instance( and             self._img_instance.start(wait=True, wait_for_cloud_init=True)23:31
blackboxswso it's one of those two that isn't completing without error (which is why your logs don't show             LOG.debug("self._img_instance: %s" % self._img_instance)23:32
blackboxswso the logic paths are properly followed. just something bogus happening in the create_instance or instance.start() calls right23:32
blackboxswahosmanMSFT: is there a specific cloud_test name that typically fails for you when things do fail?23:34
ahosmanMSFTblackboxsw it doesn’t fail individual tests, but when running multiple tests it fails to create clean image for the rest of tests due to it failing to creat a snapshot23:36
blackboxswok will run a suite and see if I can get it to fail for me23:37
blackboxswwon't be able to kick that off though until I'm done with current SRU verification on Azure specifically (as I don't want to collide w/ my manual test runs in the same account)23:38
blackboxswI just have one more manual SRU test to run (I had hit a configuration problem as I sent in email). But I *think* I've worked around it by creating a load balancer for the moment.23:39
ahosmanMSFTblackboxsw: Thanks, I’ll keep hacking at it too23:40

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