/srv/irclogs.ubuntu.com/2022/12/01/#cloud-init.txt

=== SirScott2 is now known as SirScott
=== danieli1 is now known as danieli
=== djhankb3 is now known as djhankb
=== kilian is now known as holzingk
=== chiluk_ is now known as chiluk
AnhVoMSFTin cc_set_password it looks like there's a potential race condition where we're checking for the status of ssh service and if the return code is 3, which indicates the service is stopped/not yet started, cloud-init will update the sshd_config file but not restart the SSH daemon. However, if SSH service starts anytime during that window between the check and the writing of the sshd_config, 16:10
AnhVoMSFTthe new sshd_config will not take effect. 16:10
meenaAnhVoMSFT: you should submit that as bug.16:59
=== jrm2 is now known as jrm
AnhVoMSFTthanks meena - checking in with blackboxsw and falconjr in case I'm missing something and the bug shouldn't be there17:41
falcojrAnhVoMSFT: I think filing a bug makes sense here. I'm not familiar with any particular reason why it would be that way17:45
blackboxswAnhVoMSFT: ahh interesting, that is something we changed fairly recently17:45
blackboxswright the intent there was too still support systems that may have had ssh installed, but potentially disabled17:46
blackboxswSo, we didn't want cloud-init to inadvertently start said service if that's the case. But, cloud-init should do better at understanding the not-yet start vs not enabled at all.17:47
AnhVoMSFTinteresting, do you have the commit for the change?17:49
blackboxswAnhVoMSFT: I think this is the relevant commit that added our exit code handling https://github.com/canonical/cloud-init/commit/5054ffe18817:59
-ubottu:#cloud-init- Commit 5054ffe in canonical/cloud-init "Handle error if SSH service no present. (#1422)"17:59
AnhVoMSFTah, that explains why the issue started showing up after the customer moved to 22.2 (they updated their images after 22.2 was released)18:00
blackboxswso It's been in since 22.2 (and refactored a bit to two other commits afterward) but I believe the race exists and needs to be better handled18:00
blackboxswyeah18:00
=== EugenMayer591 is now known as EugenMayer59
AnhVoMSFThttps://bugs.launchpad.net/cloud-init/+bug/199852620:19
-ubottu:#cloud-init- Launchpad bug 1998526 in cloud-init "cloud-init not restarting ssh service after writing sshd_config" [Undecided, New]20:19
blackboxswcould be a custom apparmor profile.20:20
blackboxswthanks for the bug AnhVoMSFT 20:22
meenanew bug: https://bugs.launchpad.net/cloud-init/+bug/199853922:07
-ubottu:#cloud-init- Launchpad bug 1998539 in cloud-init "writing of sudoers is not idempotent" [Undecided, New]22:07
meenai am failing to make cloud-init use /var/lib/cloud/seed/nocloud/user-data as the seed23:44

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