LXD losing Storage pool

Hey all!

I’m setting up an LXD cluster on a fresh install of Ubuntu 20.04 I run LXD init and after some time of playing with the REST APi creating instances etc… the lxd instance just loses the storage pool IE when i call /1.0/cluster

I see

"metadata": {
"server_name": "lxd-experiment",
"enabled": true,
"member_config": [
  {
    "entity": "storage-pool",
    "name": "local",
    "key": "source",
    "value": "",
    "description": "\"source\" property for storage pool \"local\""
  },
  {
    "entity": "storage-pool",
    "name": "local",
    "key": "zfs.pool_name",
    "value": "",
    "description": "\"zfs.pool_name\" property for storage pool \"local\""
  },
  {
    "entity": "storage-pool",
    "name": "local",
    "key": "size",
    "value": "",
    "description": "\"size\" property for storage pool \"local\""
  }
]

}

However after a while of playing the member_config returns: [] and i can’t see any containers i created.

{
  "type": "sync",
  "status": "Success",
  "status_code": 200,
  "operation": "",
  "error_code": 0,
  "error": "",
  "metadata": {
    "server_name": "",
    "enabled": false,
    "member_config": []
  }
}

Which node are you querying using the API? Is it the leader?

Any thoughts @freeekanayaka?

Hi yes it is the leader, there is only one node in the cluster, after further experimentation I think I know what happened.

When i call the PUT /1.0/cluster with parameters

{"enabled": false, "server_name": ""}

It may have re-initiated the cluster dropping existing cluster config.

I’m not sure if this is intentional, but it is destructive.