=== vrubiolo1 is now known as vrubiolo [11:19] Should the cloud-init package enable the relevant systemd services or should the user do it? [12:04] wCPO: depends? [12:12] meena: Okay? What is best practice? [12:13] cloud-init-generator only enables the cloud-init.target, the services still needs to be enabled manually AFAIK [12:14] what's cloud-init-generator? [12:15] meena: https://github.com/canonical/cloud-init/blob/master/systemd/cloud-init-generator.tmpl [13:34] meena: the services are wanted by the target [13:34] so the generator just controls whether or not hte target is active [13:35] so wCPO , the answer to your question is: [13:37] on systemd system, the package should place the generator (cloud-init-generator) in /lib/systemd/systemd-generators [13:37] and should install the systemd units and target as is. [13:38] the services are 'WantedBy' cloud-init.target [13:38] and the target is not enabled by default. [13:41] Are you sure? In.my testing the generator enables the target? [14:18] The generator wouldn't have to enable the target if it were enabled by default. === philroche_ is now known as philroche [16:30] Good morning folks! The 20.3 release recently exposed a new cloud-init bug that we've picked up from telemetry. The "report ready marker file" was being written before the "report ready call" actually happens while in preprovisioning. There have been several instances where the marker file is written but the report ready call fails. The fix is at https://github.com/canonical/cloud-init/pull/590 === johnsonshi_ is now known as johnsonshi [16:52] johnsonshi: What is the impact of this issue on affected systems? [17:03] Odd_Bloke: Upon the occasional random reboot initiated by the platform, after the VM comes back up, cloud-init sees that the "report ready marker file" already exists. It immediately moves to poll for reprovisiondata instead of attempting to report ready again in preprovisioning. [17:03] This causes several preprovisioned VMs to fail. [17:04] Aha, right, I missed "preprovisioning" in your first statement. Presumably there is no user impact, if you're catching these instances before they're released? [17:04] Yup there is no direct user impact [17:04] They are being caught during preprovisioning of the VMs. [17:05] Hehe the DataSourceAzure codebase is a mess which is why the incorrect report ready marker file bug was missed for years :D [17:09] Odd_Bloke: which we are all working towrads improving. Thanks for the prompt reviews as always! [17:15] Odd_Bloke: We'll be discussing internally and continue monitoring. We'll want to see if it causes too much trouble before evaluating the hot fix approach. I do think they're rare, the cloud images have been out for a week now. [17:20] Odd_Bloke: So what is best practice? Should I ask the ArchLinux package maintainer to run "systemctl enable cloud-" as part of the installation? The Redhat package does that: https://github.com/canonical/cloud-init/blob/master/packages/redhat/cloud-init.spec.in#L130 [18:01] I'm very curious to see these new integration tests!! === tds2 is now known as tds [18:45] meena: https://github.com/canonical/cloud-init/pull/592/ is the first test in the new style. [18:48] (And https://cloudinit.readthedocs.io/en/latest/topics/integration_tests.html is the documentation.) [18:49] Odd_Bloke, that looks really useful [18:50] Yeah, falcojr did a really good job with the framework, I think. [18:58] falcojr: Very small tweak to the PR template: https://github.com/canonical/cloud-init/pull/597 [19:47] wCPO: IIRC, an enabled service means "can be started", not "will be started", so I think they should be enabled. Let me double check what the Ubuntu packaging does. [19:48] Yep, looks like it's enabled there too. [19:49] Odd_Bloke: did you create https://bugs.launchpad.net/cloud-init/+bug/1884607 ? [19:49] Ubuntu bug 1884607 in cloud-init "cloudinit.net refactor: generate_fallback_config" [Low,Triaged] [19:49] never mind, it's from june [19:51] meena: Yep, I reported a bug for every function that needs refactoring, they're all tagged `net-refactor`. [19:53] Odd_Bloke: i looked for it the other day, but couldn't find it [19:56] Odd_Bloke: I see.. The setup.py script should probably "enable" them then.. === waxfire2 is now known as waxfire [20:07] wCPO: We don't really expect people to use setup.py to install cloud-init into a system on which it should run; that should really be done via distro packages because of how closely integrated into boot cloud-init is, and so setup.py is more of a utility for packagers. [20:08] Odd_Bloke: I'm not using setup.py the packager is, but setup.py should enable the services right? [20:09] wCPO: I'm not familiar with many other projects that have systemd units to install, but I don't believe that would be standard for a setup.py installation: enablement is done by installing symlinks into paths that systemd "owns", and I don't think we can reliably do that in our packaging. [20:10] (We don't even do that in our Ubuntu packaging; debhelper takes care of enabling services at install time automatically.) [20:20] It shouldn't be that hard, but setup.py does not support symlinks it seems. [20:22] Right; Python packages can be installed on Windows, they aren't the tool for packaging GNU/Linux system software. [20:24] Kinda make sense. It would be nice though, if it could be documented that it is expected for the packer to enable the services.