Skip to content
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

Improve jujudata to find controller name by endpoint #964

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

cderici
Copy link
Contributor

@cderici cderici commented Oct 13, 2023

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):

  $ 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):

  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

@cderici cderici added hint/2.9 going on 2.9 branch area/forward-port to be forward ported - remove label after port labels Oct 13, 2023
@cderici cderici requested review from jack-w-shaw and anvial October 13, 2023 20:49
Copy link
Member

@jack-w-shaw jack-w-shaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cderici
Copy link
Contributor Author

cderici commented Oct 17, 2023

/merge

@jujubot jujubot merged commit 3927969 into juju:2.9 Oct 17, 2023
9 checks passed
@cderici cderici removed the area/forward-port to be forward ported - remove label after port label Oct 19, 2023
jujubot added a commit that referenced this pull request Oct 20, 2023
#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
@cderici cderici mentioned this pull request Oct 26, 2023
jujubot added a commit that referenced this pull request Oct 26, 2023
#979

## What's Changed
* Deploy by revision on 2.9 by @cderici in #957
* Application refresh with resources by @cderici in #960
* Improve jujudata to find controller name by endpoint by @cderici in #964
* Allow switch kwarg in refresh to switch to local charms by @jack-w-shaw in #968
* Parse charm URLs consistantly for local charms by @jack-w-shaw in #969
* Fix juju config directory location pointed by XDG_DATA_HOME by @cderici in #975
* [JUJU-4779] Switch to local properly by @jack-w-shaw in #977

#### Notes & Discussion

JUJU-4850

[JUJU-4779]: https://warthogs.atlassian.net/browse/JUJU-4779?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hint/2.9 going on 2.9 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants