Comment 2 for bug 1910261

Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi Karsten, thanks for filing this bug! It's not really clear to me what's going on here: cloud-init should be writing out SSH host keys during cc_ssh execution, which we can see happens in the log.

My best guess as to what is going on is that there is either (a) some `ssh_keys` configuration which doesn't specify any valid keys: this would cause us to take the path which doesn't _generate_ the keys, but also wouldn't write out any keys; or, (b) there is an empty `ssh_genkeytypes` configuration which means that we take the generation path, but have no key types to generate. By looking at the journal, I can see that sshd-keygen service instances are running: this could mean that (a) or (b) are intentionally configured in the base image you're building from (because they expect sshd-keygen to perform this, so don't want cloud-init to do so). (It could also mean that sshd-keygen is actively removing the keys that cloud-init created; I don't know what the service does, exactly, so I can't be sure.)

I can see from the logs that no user-data is specified to the instance: this means that any such configuration would have to be in /etc/cloud somewhere.

Could you pastebin the contents of /etc/cloud/cloud.cfg and any files in /etc/cloud/cloud.cfg.d/ and include a link here? Once you've done so, please move this bug back to New.

Thanks!

Dan