changed mdata-get and two initialization scripts#2
Open
MerlinDMC wants to merge 3 commits into
Open
Conversation
…of "No metadata for root_authorized_keys" should not be used as a key
Author
|
If someone has created a VM with the provided images for centos for example and forgot to add his pubkey in the metadata, changed the metadata and rebooted the VM he/she would not be able to log in because of the false authorized_keys already generated. In that case it is enough to use VNC to login as root and delete the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mdata-get
mdata-get tries to read from the socket even if it is not available and runs in retries until canceled manually
I've added code to check for socket presence before the read loop starts.
set-root-authorized-keys
If no metadata is set for root_authorized_keys a false .ssh/authorized_keys file is generated.
I've added code to test if the metadata could be read before generating folders and files.
run-user-script
If the user-script is not set in customer_metadata "No metadata for user-script" is saved in /root/user-script and left there.
I've just added code to remove the file in that single case.