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

sshd can start before cloud-init injects keys #2462

Closed
ubuntu-server-builder opened this issue May 10, 2023 · 2 comments
Closed

sshd can start before cloud-init injects keys #2462

ubuntu-server-builder opened this issue May 10, 2023 · 2 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1333920

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = 2014-10-10T15:39:12.939621+00:00
date_created = 2014-06-24T19:11:45.575046+00:00
date_fix_committed = 2014-08-21T18:06:38.418572+00:00
date_fix_released = 2014-10-10T15:39:12.939621+00:00
id = 1333920
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1333920
milestone = None
owner = jordane
owner_name = Jordan Evans
private = False
status = fix_released
submitter = jordane
submitter_name = Jordan Evans
tags = []
duplicates = []

Launchpad user Jordan Evans(jordane) wrote on 2014-06-24T19:11:45.575046+00:00

Description of problem:

When using automated scripts for deployment, many wait for sshd to come up, then ssh in. Since cloud-init and sshd are started in parallel, this creates a race condition for cloud-init to add ssh keys before sshd starts or the user can't login and the automated scripts can fail.

Specifically, this is happening to me using test-kitchen with the kitchen-openstack plugin, which uses Fog. It calls wait_for and watches for sshd to come up. It catches sshd before cloud-init finishes installing keys, and fails to ssh.

Reproducing:

Attempt to ssh in before cloud-init finishes but after sshd is up and running.

Steps to Reproduce:

  1. Pull in Fedora Cloud image for OpenStack
  2. Configure test kitchen to use Fedora
  3. Run test-kitchen tests

Actual results:

ssh fails, which causes test-kitchen or other automated scripts to fail.

Expected results:

ssh should succeed.

This is specifically affecting me on Fedora-20, but can potentially affect any distribution using systemd.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 10, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2014-08-21T18:06:37.436842+00:00

fix committed in revno 995.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2014-10-10T15:39:11.859903+00:00

fixed in 0.7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant