tomp
December 16, 2024, 10:59am
11
Thanks!
I’ve got this PR in the works that should fix it.
canonical:main
← tomponline:tp-volatile-last-state-ip-patch
opened 10:55AM - 16 Dec 24 UTC
In https://github.com/canonical/lxd/pull/13900 we introduced the concept of long… -lived OVN NIC ports and removed the need for the `volatile.%.last_state.ip_addresses` keys.
That PR added the `patchInstanceRemoveVolatileLastStateIPAddresses` patch to remove them.
However that patch loaded all instances and snapshots, then matched the specific keys to remove and removed each one by a separate query.
Although this allowed better debug logging, it was causing problems with users who have a lot of instances or snapshors from starting LXD as the patch was taking over 10s to apply and the single transaction was timing out.
See https://discourse.ubuntu.com/t/lxd-cant-restart-probably-a-dqlite-database-problem-maybe-related-to-snapshots/51162
This PR fixes the issue by pushing the matching logic down into the query and removing the relevant rows in a single query per table.
Once its merged I’ll apply it to the 6/candidate
branch and then you can try refreshing to that and see if it works. Then you can switch to 6/stable
going forward if you would like (this is preferable to latest/stable
, see LXD 6.2 has been released ).
Thanks