Conversation
For both model and controller connections, accounts.yaml is required to have both username and password for connection to be established. This is not always true, for example, juju change-user-password actually removes the password from the accounts.yaml file.
Fixes juju#998 ControllerAPIInfoForModels call requires the uuid of the controller model, and if the user doesn't have at least read access, they won't be able to have that, and the update_endpoint call at the end of a regular connection fails.
Member
|
Thx, @cderici I have the following problem on the last QA step: PS: question - why do we need the |
Member
|
updated comment |
Contributor
Author
I have no idea how that attribute is lost in between my branches, thanks for actually running it so it's caught. Updating now 👍
Yeah we don't need it, I tried a bunch of different things in my local and copy/pasted these steps into the QA from my terminal, so that must've lingered in there by mistake. |
Member
|
Still have the problems on the last QA step: |
Member
|
ups, I forgot to checkout... Looks like everything now works fine: |
anvial
approved these changes
Jan 11, 2024
Contributor
Author
|
/merge |
jujubot
added a commit
that referenced
this pull request
Feb 8, 2024
#1022 #### Description This brings onto the 3.x track some of the latest fixes from to the 2.9 track. Here're the details: * Fix for #989 from #990 * Fix for #1001 from #1002 * Fix for #998 from #1003 #### QA Steps No QA needed for #990. For 1002 and 1003 please refer to their QA steps. Though they are very related so I'd expect the QA for both of them can be done in one fell swoop. * #1002 * #1003 All CI tests need to pass (there's still some known intermittent ones in there).
Merged
jujubot
added a commit
that referenced
this pull request
Feb 13, 2024
#1023 ## What's Changed * Drop use of walrus operator by @freyes in #993 * No controller model access needed for connection with a non-admin user by @cderici in #1003 * Password resolution in connector by @cderici in #1002 * Remove dependency to juju-cli for controller_name by @cderici in #1009 #### Notes & Discussion JUJU-5413
1 task
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.
Description
This is a follow up PR, includes changes from #1002. If you're reviewing this and #1002 hasn't landed yet, you might see some additional changes that'll land with #1002. We need those changes to be able to test this change.
ControllerAPIInfoForModelscall inupdate_endpointsafter a controller connection requires theuuidof the controller model, and if the user doesn't have at least read access, they won't be able to have that, so theupdate_endpointcall at the end of aregular connection fails.
Fixes #998
QA Steps
We'll need a 2.9 controller, so:
Now we have the admin user on this by default, but we don't wanna use that. Let's create a new user (that doesn't have superuser so it can't read the controller model):
Now let's make a password for this user.
Now let's spawn a pylibjuju repl to test this change with this user (that can't access the
controllermodel):Wihtout this change, you'd see the error in #998. With this change the connection should work just fine:
Notes & Discussion
JUJU-5268