tripleo-image-elements/elements/restore-ssh-host-keys/README.md
Clint Byrum 294480f484 Add an element to restore ssh keys from /mnt/state
This is intended to work around a race condition where cloud-init looks
for ssh keys on the state partition before it has loaded the state
partition. Since it only finds an empty directory, it goes ahead and
creates new keys, which is undesirable.

This change will restore the keys from /mnt/state when os-refresh-config
is run.

Change-Id: I094d4a8322410a3f2c6d1711c03b998615675aee
2015-01-15 09:27:46 -05:00

17 lines
814 B
Markdown

Because of poor interactions with cloud-init and nova rebuilds, we
have a timing problem when trying to store SSH host keys on the state
drive. Basically cloud-init checks for them before it mounts the state
drive.
So we're going to back them up to the state drive when we intend to do
a rebuild, and then restore them if they are present. Note that there
is not currently a standard place to do such a backup in TripleO. The
operator would need to do this before any rebuilds are issued, or expect
that machines will get new SSH host keys after rebuild.
This element will restore host keys from /mnt/state/\_ssh\_host\_keys, if
they are found.
To allow external services to determine when the ssh host key has been
restored we are appending a string to the sshd version information when a host
key is restored.