-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: controller.controller_name() return "None" when connecting with endpoints #771
Comments
This issue is marked as incomplete because it has been open 30 days with no activity. Please remove incomplete label or comment or this will be closed in 5 days. |
This issue still exists in libjuju version 2.9.44.0 |
I'd like to address this issue. I think it should be handled in the connector layer, specifically in the |
This issue is marked as incomplete because it has been open 30 days with no activity. Please remove incomplete label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
I tested the sample code with libjuju 2.9.44.1 and confirmed the issue still exists. Can we reopen this issue? |
For sure, looks like it's not very complicated, I'll take a closer look soon 👍 |
#964 #### Description This allows all kinds of connections to set the `controller_name` by default by looking up the `endpoints` in the `jujudata`. Fixes #771 #### QA Steps Manual QA should follow the steps described in #771. Find the details of a controller you bootstrapped (any controller would do): ```sh $ juju show-controller --show-password ``` Grab the details there and plug them into either a script or in the repl (repl is awkward to use with the certificate): ```python c = Controller() await c.connect(endpoint="<ip>:17070", username="admin", password="admin_pass", cacert="ca_cert") # explicit connection with credential values # check the name print(c.controller_name) ``` All CI tests need to pass. #### Notes & Discussion JUJU-4781
#964 closes this. |
#966 #### Description This is a forward port for the fix #964 for the issue #771 that was on 2.9, bringing it into 3.x. #### QA Steps Manual QA should follow the steps described in #771. Find the details of a controller you bootstrapped (any controller would do): ```sh $ juju show-controller --show-password ``` Grab the details there and plug them into either a script or in the repl (repl is awkward to use with the certificate): ```python c = Controller() await c.connect(endpoint="<ip>:17070", username="admin", password="admin_pass", cacert="ca_cert") # explicit connection with credential values # check the name print(c.controller_name) ``` All CI tests need to pass. #### Notes & Discussion JUJU-4781
Description
When connecting to a controller implicitly or with its name, running
controller.controller_name
will provide us with the name of the current controller, which is the expected behavior.However, when connecting the controller with its endpoint and credentials,
controller.controller_name
returns "None".Urgency
Annoying bug in our test suite
Python-libjuju version
2.9.11, 3.0.4
Juju version
2.9.37
Reproduce / Test
The text was updated successfully, but these errors were encountered: