-
Notifications
You must be signed in to change notification settings - Fork 507
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
Register the alternative name for lxd #9468
Conversation
The following registers the alternative name for the localhost lxd provider. This way we can bootstrap juju just using the alternative name "lxd" rather than the perceived more popular one "localhost". The question of if this is correct or not is a bit of a concern. Why we don't reconcile both localhost and lxd names and normalise them to mean the same one when bootstrapping seems a mystery. Anyway, I'll supply a good deal of Cunningham's Law to this and see what the fallout to that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally RegisterCredentials would be told information about the cloud that is being used, and it would only register credentials for that cloud. It seems odd that
juju bootstrap lxd-otherhost
would end up trying to connect to my local lxd and generate 'localhost' credentials.
Also check if there is no lxd present locally, to allow bootstrapping. |
Disabling lxd (via a snap) and attempting to bootstrap to a local provider works the same as 2.4, which is to say that it outputs the following https://pastebin.canonical.com/p/7WnvnT92v8/ |
2a31d00
to
1c45fe9
Compare
Only register clouds that we're certain we actually need, so in this instance, if you're registering "lxd-test" (a remote server) then the idea is not to register "localhost" or "lxd" credentials.
1c45fe9
to
de3ef0d
Compare
The following commit changes the signature of RegisterCredentials. Now the method takes a cloud.Cloud, which should allow other providers to take advantage of possible things like auth types etc. This makes the method a lot more generic and less focused on just the lxd provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for the tweaks
|
Description of change
The following registers the alternative name for the localhost
lxd provider. This way we can bootstrap juju just using the
alternative name "lxd" rather than the perceived more popular one
"localhost".
The question of if this is correct or not is a bit of a concern.
Why we don't reconcile both localhost and lxd names and normalise
them to mean the same one when bootstrapping seems a mystery.
Anyway, I'll supply a good deal of Cunningham's Law to this and
see what the fallout to that is.
QA steps
Documentation changes
This is a regression from 2.4, where you could bootstrap using
"lxd" correctly.
Bug reference
N/A