Fix race condition causing sshd start failure during provisioning #460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rc.localscript ran in parallel with multi-user services, so ssh.service often started (and restarted) while/root/firstboot.shwas deleting keys. cloud-init’s set-passwords module made this worse by restarting ssh mid-run.rc.localwith a oneshot firstboot.service (delete keys, create new keys, reconfigure sysstat) that runs Before=ssh.service and leaves the/root/firstboot_donefile as a marker - as was done previously.v2.14.0.1(After=network-online.target cloud-init.service) and wait for firstboot.service to ensure ssh keys have been regenerated. This guarantees sshd, cloud-init, and WALinuxAgent all start only after the first-boot tasks succeed.Resolves #458