After auto refresh to lxd 3.17 automatically while creating container getting following error:
$ lxc launch ubuntu:18.04 test1
Creating test1
Error: Failed container creation: Create container:
Create LXC container: UNIQUE constraint failed:
storage_volumes.storage_pool_id, storage_volumes.node_id,
storage_volumes.project_id, storage_volumes.name,
storage_volumes.type
After removing this entry from cluster:
$ lxd sql global "delete from storage_volumes where name='test1';"
Running again the lxc container launch fails with an error.
$lxc launch ubuntu:18.04 test1
Creating test1
Error: Failed container creation: Create container:
Create LXC container:
Failed to add device 'eth0': No such object
I have create an issue #6512 on github under lxd project. I believe many people might be facing the same problem. Also based on my experience this is the 3rd time cluster has broken due to snap auto refresh of lxd. My suggestion will be to disable it by default instead of enable it. Also suggest in the document not to enable it for production environments.