[16:10] <AnhVoMSFT> in 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] <AnhVoMSFT> the new sshd_config will not take effect. 
[16:59] <meena> AnhVoMSFT: you should submit that as bug.
[17:41] <AnhVoMSFT> thanks meena - checking in with blackboxsw and falconjr in case I'm missing something and the bug shouldn't be there
[17:45] <falcojr> AnhVoMSFT: I think filing a bug makes sense here. I'm not familiar with any particular reason why it would be that way
[17:45] <blackboxsw> AnhVoMSFT: ahh interesting, that is something we changed fairly recently
[17:46] <blackboxsw> right the intent there was too still support systems that may have had ssh installed, but potentially disabled
[17:47] <blackboxsw> So, 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:49] <AnhVoMSFT> interesting, do you have the commit for the change?
[17:59] <blackboxsw> AnhVoMSFT: I think this is the relevant commit that added our exit code handling https://github.com/canonical/cloud-init/commit/5054ffe188
[17:59] -ubottu:#cloud-init- Commit 5054ffe in canonical/cloud-init "Handle error if SSH service no present. (#1422)"
[18:00] <AnhVoMSFT> ah, 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] <blackboxsw> so 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 handled
[18:00] <blackboxsw> yeah
[20:19] <AnhVoMSFT> https://bugs.launchpad.net/cloud-init/+bug/1998526
[20:19] -ubottu:#cloud-init- Launchpad bug 1998526 in cloud-init "cloud-init not restarting ssh service after writing sshd_config" [Undecided, New]
[20:20] <blackboxsw> could be a custom apparmor profile.
[20:22] <blackboxsw> thanks for the bug AnhVoMSFT 
[22:07] <meena> new bug: https://bugs.launchpad.net/cloud-init/+bug/1998539
[22:07] -ubottu:#cloud-init- Launchpad bug 1998539 in cloud-init "writing of sudoers is not idempotent" [Undecided, New]
[23:44] <meena> i am failing to make cloud-init use /var/lib/cloud/seed/nocloud/user-data as the seed