Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(set_passwords): Run module in Network stage #5395

Merged
merged 1 commit into from
Jun 20, 2024

Commits on Jun 8, 2024

  1. perf(set_passwords): Run module in Network stage

    Cloud-init blocks login until Config stage completes[1] to prevent users
    from connecting to the instance via ssh prior to user configuration[2].
    To enable faster ssh, cloud-init can simply move the set_passwords
    module sooner in boot. This follows precedent of previous races of this
    kind[3].
    
    The grub_dpkg module sometimes takes a long time to run, so this
    should improve time to ssh in that case and some others.
    
    This will make both chpasswd and passwd run earlier in boot than before.
    This should be safe, since chpasswd and passwd both use PAM, which to my
    knowledge just requires r/w access to /etc/.
    
    This effectively reverts b3c9b6a and moves the set_passwords
    module into Network stage.
    
    [1] canonical#2111
    [2] https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2013403
    [3] https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/781101
    holmanb committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    f96f20a View commit details
    Browse the repository at this point in the history