DataSourceAzure: update password for the default user if the user exists#671
Merged
Merged
Conversation
blackboxsw
approved these changes
Nov 19, 2020
Collaborator
blackboxsw
left a comment
There was a problem hiding this comment.
Thanks @anhvoms.
No backwards incompatible changes here. Only adds a top-level password value to the base config, which could be overridden if users provided a "password" themselves in #cloud-config as well.
I reproduced failure case as mentioned by "capturing" a VM under test with password provided and launching new vms from that image. When applying your changeset I confirmed new password was honored and old was no longer valid.
3dbb9ff to
9ee401f
Compare
9ee401f to
0c77e3f
Compare
TheRealFalcon
added a commit
to TheRealFalcon/cloud-init
that referenced
this pull request
Dec 10, 2020
Verify that on Azure that if a default user and password are specified through the Azure API that a change in the default password overwrites the old password
3 tasks
TheRealFalcon
added a commit
to TheRealFalcon/cloud-init
that referenced
this pull request
Dec 11, 2020
Verify that on Azure that if a default user and password are specified through the Azure API that a change in the default password overwrites the old password
TheRealFalcon
added a commit
that referenced
this pull request
Dec 11, 2020
This was referenced May 12, 2023
Closed
Closed
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.
Proposed Commit Message
DataSourceAzure: update password for the default user if the user exists
cc_set_password will only update the password for the default user if
cfg['password'] is set. The existing code of datasource Azure will fail
to update the default user's password because it does not set that
metadata. If the default user doesn't exist in the image, the current
code works fine because the password is set during user create and
not in cc_set_password
Additional Context
Test Steps
previous password continued to work)
that new password is set.
Checklist: