Failed to start the daemon: failed to open cluster database: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1" -LXD Single host turned into the cluster by error, now sqlite hinders LXD Start

Hey,
Im runing lxd 3.0.3-0ubuntu1~16.04.1, not as a snap package.

I launched Lxd init to turn a host that already has a huge list of running vms into a master node,
but this was a bad idea obviously. I guess I have should been using

lxc cluster enable mycluster

instead.

Now lxd wont start.

Failed to start the daemon: failed to open cluster database: failed to start the daemon: failed to open cluster database: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1"
“Dqlite: aborting (fd=22 state=header msg=(null))”
Error: failed to open cluster database: failed to ensure schema: failed to update node version info: updated 0 rabase: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1

I tryed to patch the database and took a backup of the original one beforehand, but it didnt work:

t=2021-02-10T00:43:04+0100 lvl=eror msg=“Failed to start the daemon: failed to open cluster database: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1”
Feb 10 00:43:04 productivityhost lxd[5080]: t=2021-02-10T00:43:04+0100 lvl=eror msg=“Dqlite: aborting (fd=26 state=header msg=(null))”
Feb 10 00:43:04 productivityhost lxd[5080]: Error: failed to open cluster database: failed to ensure schema: failed to update node version info: updated 0 rows instead of 1

lxc list
Error: Get http://unix.socket/1.0: EOF

journalctl -u lxd -n 300 drops the same messages as the ones mentioned above

Best regards
Max

This got sorted out offline by forcing a DB downgrade to its last snapshot, hopefully not losing much state in the process.

At this point, we wouldn’t really recommend new cluster deployments on LXD 3.0.
LXD 4.0 is the current LTS release and actively receives bugfix updates unlike LXD 3.0 which is in a security-only stage of maintenance.