-
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
Running the example from README doesn't work #995
Comments
This is very surprising, are you sure the current controller was I'll try to reproduce this in a moment and note here what I see 👍 |
Yeah it seems to be working with the $ python examples/connect_current_model.py
There are 0 applications
Disconnecting from model
$ So I'll go ahead and close this. But please do try again (making sure using one of pylibjuju 2.9 track releases -- the latest 2.9.46 should work fine) and feel free to re-open if the issue persists 👍 |
I guess the problem might be related to the fact that the examples all have a hard requirement of having the full juju client on the right version installed. I also have issues with self signed certificates. There is also a bug/feature which also require a user to be admin, or a connect() to a controller will fail. It would be great if the examples worked under less tight circumstances. |
That requirement is for using pylibjuju in general, not specific to the examples. Currently you have to use pylibjuju 2.9 vs a juju 2.9 controller and similarly a 3.x pylibjuju for 3.x juju. I'm working on a side branch that'll merge these two tracks, but until then the right track is needed for running pylibjuju, including the code in the examples.
Yeah I bumped into that one this morning, reported in #1001
I believe you're talking about #998, I also commented there as well, fix coming for that soon 👍
Same as above, that's a requirement on pylibjuju, not fundamental to the examples. (i.e. the same example working with 2.9 pylibjuju against a 2.9 juju controller should also work the same with a 3.x pylibjuju against a 3.x juju controller). |
I have managed to use the lib without the client installed. The only thing I did was to make a controllers.yaml file and populated it with information about the endpoints. I think this would be alot better than having to install the client which at least makes the lib independent from the client which makes absolutely no sense if we are to be able to use this lib with automation tools. Why not just make the call to the connect client dependent on some auth parameters which is in the credentials.yaml ? |
I believe the lib currently reads ~/.local/share/controllers.yaml if you
don't specify information about what controller to connect to, but you can
(or at least *should*) be able to use the library without `juju` installed
as long as you specify all the information that we would have otherwise
pulled in.
I've been encouraging to make that more clearly separated (eg Model must
always take the full description of how it should be instantiated, but
there is a clear helper function that can read ~/.local/share if you want
to use it.)
John
=:->
…On Mon, Jan 8, 2024 at 6:21 PM Erik Lönroth ***@***.***> wrote:
I guess the problem might be related to the fact that the examples all
have a hard requirement of having the full juju client on the right version
installed.
That requirement is for using pylibjuju in general, not specific to the
examples. Currently you have to use pylibjuju 2.9 vs a juju 2.9 controller
and similarly a 3.x pylibjuju for 3.x juju. I'm working on a side branch
that'll merge these two tracks, but until then the right track is needed
for running pylibjuju, including the code in the examples.
I have managed to use the lib *without* the client installed. The only
thing I did was to make a controllers.yaml file and populated it with
information about the endpoints.
I think this would be alot better than having to install the client which
at least makes the lib independent from the client which makes absolutely
no sense if we are to be able to use this lib with automation tools. Having
to install the juju client just to get access to the controllers.yaml
doesn't make any sense.
—
Reply to this email directly, view it on GitHub
<#995 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRQ7MDK33CVJ4YABEBGADYNR5N5AVCNFSM6AAAAABAXZXSXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBRHE3TIMJXGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Yes the files that come with the juju client are used to make things convenient (e.g. allows you to just call |
That is good to know. I will raise bugs whenever I find it. A simple search for the "*.yaml" in the source-tree might find more. Thanx for responding. |
I'd like to note again, the extra information that come with the juju cli (e.g., the yaml files, env variables) are continued to be used within the library's normal operation (because they make things convenient for the -client- part of the library, if they exist), so it is plausible that you'd see some static references to those resources within the code. However, as you rightfully mentioned before as well, no operation should depend on their (nor the juju cli's) existence. |
Description
I was trying to run the example when it blew up.
Urgency
Annoying bug in our test suite
Python-libjuju version
2.9.46.0
Juju version
2.9.46
Reproduce / Test
The text was updated successfully, but these errors were encountered: