Fix cloud-init-nocloud to actually work.
Bug 1124593 reported that ssh host keys were not being created, and the lack of seed metadata files was the cause. Add those files and remove the workaround. Change-Id: I6fb55be7f8c7efd1f75aeba9123f495e312ff695
This commit is contained in:
parent
1fa27e745d
commit
03b437db0e
@ -1,3 +1,6 @@
|
|||||||
Configures cloud-init to only use on-disk metadata/userdata sources. This
|
Configures cloud-init to only use on-disk metadata/userdata sources. This
|
||||||
will avoid a boot delay of 2 minutes while polling for cloud data sources
|
will avoid a boot delay of 2 minutes while polling for cloud data sources
|
||||||
such as the EC2 metadata service.
|
such as the EC2 metadata service.
|
||||||
|
|
||||||
|
Empty on-disk sources are created in /var/lib/cloud/seed/nocloud/.
|
||||||
|
|
||||||
|
8
elements/cloud-init-nocloud/install.d/05-inject-local-source-data
Executable file
8
elements/cloud-init-nocloud/install.d/05-inject-local-source-data
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# without these files, cloud-init will not perform stock operations such as
|
||||||
|
# generating sshd hostkeys.
|
||||||
|
|
||||||
|
mkdir -p /var/lib/cloud/seed/nocloud
|
||||||
|
touch /var/lib/cloud/seed/nocloud/user-data
|
||||||
|
touch /var/lib/cloud/seed/nocloud/meta-data
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# NOTE: this file should be removed once cloud-init is properly generating hostkeys
|
|
||||||
# https://bugs.launchpad.net/diskimage-builder/+bug/1124593
|
|
||||||
dpkg-reconfigure openssh-server
|
|
Loading…
Reference in New Issue
Block a user