If someone try to create a ceph storage which has the same name as an exist one, the exist pool may be deleted
here checks whether ceph pool is exist
check pool
the osdPoolExists() checks pool exist by cmd return
osdPoolExists
This means if there’s a temp error (network jitter or any other reason) about ceph while osdPoolExists() querying, lxd will try to create pool.
And if the error fix at a short time, lxd will create fail beacuse of the name of pool is exist, and delete the exist pool by revert?
I try the following steps:
- create a pool named ‘remote3’: lxc storage create remote3 ceph --verbose
- change my ceph key to a wrong value
- create a pool named ‘remote3’ again: lxc storage create remote3 ceph --verbose
- set correct ceph key immediately, and ‘remote3’ will be delete by lxd.
Deleting will also happen even if I set ctrl+C to stop lxd commend after step 3. If I do this, there’s even no error log on my terminal