/srv/irclogs.ubuntu.com/2019/07/30/#cloud-init.txt

Gonerihi, could you take a look at https://code.launchpad.net/~goneri/cloud-init/+git/cloud-init/+merge/368507 and https://code.launchpad.net/~goneri/cloud-init/+git/cloud-init/+merge/36564110:50
GoneriI built images that include the two patches: http://bsd-cloud-image.org/10:51
schlitzerhello, is there a guide on how to write a custom plugin for cloud-init?12:30
Odd_Blokerharper: Is there a way for a user (or metadata source on an ISO) to change network configuration to happen on every boot?  Or is that only configurable on the DataSource in the code?13:28
tribaalOdd_Bloke: vaguely related: I'm trying to do the opposite (modify the list in cloud_config_modules in the conf from our datasource). I'm not sure I understand how it works - what reads that config key? I can change the behavior manually just fine (by playing with conf files), but I don't understand where/how to do the same programatically14:52
tribaalI'm not sure another datasource does anything similar (nothing I could find seems to tweak that particular set of entries). But if I knew where it's read it would already help me quite a bit :)14:54
tribaalOdd_Bloke: nevermind, enough digging yield the answer - for the record, the solution is that the datasource's self.extra_config is "util.mergemanydicts" 'd with the conf. So adding my config tweak to the datasource's extra_config does what I want. \o/16:27
Odd_Bloketribaal: Great!17:14
rharperOdd_Bloke: (updating network-config on each boot is an event type that we've sent in a few datasources) however, in the hotplug branch; I've changes that allow user-data to opt-in to changes for each boot;  that is, for datasources which allow per-boot events; users can opt-in or out of what boot events to respond to;18:46
Odd_BlokeThanks!18:50
Odd_BlokeThis was for triage, and I wasn't even entirely sure that's what they were asking about, so I left a more general message in the end.18:50
rharperfor ConfigDrive, or NoCloud; we'd need to update the datasources to allow EventType.BOOT (we default to EventType.BOOT_NEW_INSTANCE); and then user data could add the update_events: config to opt-in to that18:51
rharperOdd_Bloke: I think I know which one you're talking about; we have had general questions about allowing an updated iso or configdrive/nocloud to be applied on each boot18:51
rharperso once a rebased hotplug branch lands, we can update other datasources to accept EventType.BOOT as well18:52
Odd_BlokeYeah, I think that would be a nice enhancement.18:52
rharpereffectively, any datasource which has a network_config property could allow users to opt-in18:52
AnhVoMSFThey folks if I have a simple cloud-config with packages/write_files/runcmd, is there anyway to quickly test it on an already-provisioned VM ?19:29
Odd_Blokerharper: https://bugs.launchpad.net/cloud-init/+bug/1834875 is feeling more and more like it's a fundamental enough bug in {kernel,systemd,?} that we can't just workaround it from our perspective.20:12
ubot5Ubuntu bug 1834875 in cloud-init "cloud-init growpart race with udev" [Medium,In progress]20:12
* rharper reads the update20:13
rharperOdd_Bloke: can we vary to a previous image which older kernel ?20:15
rharperor possible boot generic kernel instead?20:15
rharperthat might help point to kernel regression20:15
rharperI agree it appears to be out of our hands20:15
Odd_Blokerharper: Yeah, though the report is cosmic and later.20:16
Odd_BlokeOh, right, but on Azure that may mean less with the custom kernel.20:16
Odd_Blokerharper: Hmph, cosmic and bionic look to me like they had the same linux-azure version (because HWE), which suggests it isn't the kernel.20:50
rharperOdd_Bloke: surely we've had updates to the linux-azure kernel20:51
rharperlike security fixes or other refreshes?20:51
rharperand we can still test a generic kernel to see if it reproduces20:51
rharpersomething underneath the instances may have changed which exposes the issue20:52
Odd_Blokerharper: The issue is reported as present in cosmic and not in bionic.20:52
Odd_BlokeAnd cosmic and bionic were on the same linux-azure until cosmic EOL'd.20:52
Odd_BlokeI've looked at the udev diff from bionic to cosmic and it was fairly minimal, though.20:54
Odd_BlokeSo I'll ask for a linux-generic run and see if that turns up anything interesting.20:54
rharperwell, what about Disco or E20:56
rharperas cosmic os EOL20:56
Odd_BlokeMy thinking was that as we started seeing this in cosmic, changes that weren't present in cosmic are unlikely to be the cause.21:00
Odd_Bloke(I mean, I also haven't ever really looked at the udev source before, so I could very easily be missing an important change that I don't understand.)21:03
rharperright, systemd-udev is userspace; but the event order is coming from the kernel21:03
Odd_BlokeThe kernel event order is the same on failure and passing, I think.21:04
Odd_BlokeLet me double check that.21:04
Odd_BlokeYes, the kernel emits (sda, sda1, sda14, sda15) in that order in both cases.21:07
Odd_BlokeUh, sorry, the kernel emits change events for (sda, sda1, sda14, sda15) and then the add/remove for sda14 (from the partx call).21:09
Odd_BlokeBut the same order on both hosts.21:09
Odd_BlokeAnd udev on the passing instance processes (sda, sda15, sda14, sda14, sda14, sda1), whereas on the failing instance it's (sda, sda15, sda1, sda14, sda14, sda14).21:10
Odd_Bloke(In both cases, the three sda14 events are in the order (change, remove, add).)21:10
Odd_BlokeSo my intuition is that the kernel emits the sda1 event while the partition changes are still in flux somehow, and we fail if udev processes the sda1 event early enough to hit that "in flux" period.21:12

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