Juju 2.9 failing to deploy lxd containers with lxd latest/stable as lxd version 5.x is promoted to latest/stable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Unassigned | ||
lxd |
Fix Released
|
Unknown
|
Bug Description
As mentioned in https:/
Current deployments that haven't upgraded to 3.x will have issues deploying new containers as the default value for juju model-config lxd-snap-channel is "latest/stable"
Workaround to fix this is to change juju model-config lxd-snap-
Juju should be able to detect that it is running 2.9 and not 3.x and deploy the latest working lxd snap on the new machines, or at least warn (even better error out) if the user tries to deploy containers with lxd-snap-channel pointing to latest/stable that has 5.x promoted.
Changed in lxd: | |
status: | Unknown → Fix Released |
Changed in juju: | |
milestone: | 2.9.39 → 2.9.38 |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Another important point here is, if you set to 4.0/stable and add a container to a machine that already has containers running juju will try to downgrade lxd and break all existing containers:
t=2023- 01-09T11: 59:33+0000 lvl=eror msg="Failed to start the daemon" err="Error creating database: schema version '43' is more recent than expected '42'"
Error: Error creating database: schema version '43' is more recent than expected '42'
=> LXD failed to start
So the workaround for new machines would be to set to 4.0/stable, snap remove lxd, add new container so that juju can properly configure netplan and then rollback to latest/stable and during this time you should not add any containers to machines already hosting live containers.