Open roosterfish opened 2 months ago
Maybe the cache update can be moved a few levels up in the API handler storagePoolsPost
.
Maybe the cache update can be moved a few levels up in the API handler
storagePoolsPost
.
Maybe, but this is only going to update the local member's cache.
We may need to do this, and incorporate a cluster notification to update the cache.
@hamistao want to look at this one as its non-trivial?
Sure, I will assign to myself.
When MicroCloud bootstraps a new LXD cluster and you invoke any
lxc *
command on any of the cluster members for the first time you get the following message:If this is your first time running LXD on this machine, you should also run: lxd init
This might be misleading as MicroCloud has already setup storage, networking and the cluster between the nodes.
When querying the
/1.0
endpoint thestorage_version
value doesn't show any storage pool even though MicroCloud has already active storage pools.It's because when you create a storage pool on a single node LXD, the
storagePoolCreateGlobal
func is callingdbStoragePoolCreateAndUpdateCache
down the line which runsstoragePoolDriversCacheUpdate
and updates the global varstoragePoolUsedDriversCacheVal
.But the same isn't happening when creating a storage pool within a LXD cluster using
storagePoolsPostCluster
. This causes the cache not being updated.