-
Notifications
You must be signed in to change notification settings - Fork 50
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
doc: Add documentation note for when LXD 5.0 is already installed #437
base: main
Are you sure you want to change the base?
doc: Add documentation note for when LXD 5.0 is already installed #437
Conversation
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.
Looks good to me!!
|
||
```{note} | ||
Depending on you machine OS and state, the LXD snap might already be installed (e.g, you have a version of Ubuntu on the machine having LXD 5.0 already installed). | ||
In this case instead of doing `sudo snap install lxd --channel=5.21/stable --cohort="+"`, just do `sudo snap remove lxd --purge && sudo snap install lxd --channel=5.21/stable --cohort="+"` |
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.
You don't have to uninstall the snap as you can just refresh it:
In this case instead of doing `sudo snap install lxd --channel=5.21/stable --cohort="+"`, just do `sudo snap remove lxd --purge && sudo snap install lxd --channel=5.21/stable --cohort="+"` | |
In this case instead of running `sudo snap install lxd --channel=5.21/stable --cohort="+"`, refresh the snap with `sudo snap refresh lxd --channel=5.21/stable --cohort="+"` |
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.
This does not work. I specifically mentioned issues if refreshing (my second bullet in original post). Something is left behind during the upgrade process. This may be a separate bug, but for now it is what happens.
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.
Somehow you get "Invalid project configuration key "features.networks.zones"" if you refresh, but you don't get this error if you purge and install again.
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.
I remember this issue. Looking at LXD, features.networks.zones
does have support in 5.21
, but is not supported in 5.0
, which suggest the rejecting system was still on 5.0
, but being supplied data created on 5.21
since the config field is set. Since the setup got so far as updating tables on the joiner, what's odd to me is that such a combination passed API/database version checking in LXD in the first place.
I do remember from the initial Mattermost thread that the snaps were listed as 5.21
.
Worth a bit more investigation I think. @token47 are you able to reproduce this with any consistency?
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.
I just gave this a try by running microcloud init
on a system with lxd 5.21 installed, and lxd 5.0 installed on a joiner. Indeed this is the error I see:
Error: Failed to join cluster: Failed to initialize member: Failed to initialize storage pools and networks: Failed to update local member project "default": Invalid project configuration key "features.networks.zones"
So it seems we eagerly try to update the projects table before doing any API/database version checking in 5.0
, thus getting back a misleading/non-descriptive error. The real error is the daemon versions are incompatible.
Still not sure why snap info
listed 5.21
, but maybe I just failed to catch a 5.0
in there.
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.
Interestingly, I'm not being able to reproduce this anymore. Maybe something changed on LXD snap in the last days?
This is a test without upgrading lxd snap from 5.0 to 5.21 -> https://pastebin.canonical.com/p/mjpSWMhKmp/
This is a test with the refresh (not purge+install) -> https://pastebin.canonical.com/p/q75c9c25tc/
As you can see, second test was giving me error before but now seems to have worked.
NOTE: just to be clear, this happened on first node already during init, not on a node join later.
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.
@token47 IIRC the error in the first link seems to be caused by not having at least LXD 5.21.x.
If this still isn't reproducible anymore please let us know so we can close the PR and the related issue. LXD 5.21/stable channel was updated recently so maybe it contained a fix for this.
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.
Sorry but have been unable to test this since. You seem to have hit the same issue, so maybe you could try one more time to make sure it was not a fluke for me? Maybe something actually changed that indirectly fixed this.
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
b9f9b35
to
9d8b5d4
Compare
Question: Does the same apply for all snaps, not just lxd? That is, could a machine intended for a MicroCloud cluster already have microceph or microovn installed previously, and thus also need to those to be refreshed instead of installed? If so, the wording of the addition should be changed. If not, disregard. |
@minaelee valid point. You can potentially already have LXD, MicroCloud, MicroCeph and MicroOVN installed from either the right or different channel. |
fixes #410