lxd icon indicating copy to clipboard operation
lxd copied to clipboard

Implement all-projects query parameter for storage volumes

Open markylaing opened this issue 3 years ago • 5 comments

In order to complete https://github.com/canonical/lxd-cloud/issues/136, upstream servers need to synchronise instance and storage volume records when the make a connection to a downstream.

To accomplish this, we can call /1.0/instances?all-projects=true for instances, but there is currently no equivalent for volumes. We could iterate over projects and make a separate call for each but this would result in lots of unnecessary requests.

markylaing avatar Aug 05 '22 09:08 markylaing

Is this all projects and all storage pools or just all projects for a single storage pool?

tomponline avatar Aug 05 '22 10:08 tomponline

Just all projects for a single storage pool.

markylaing avatar Aug 05 '22 10:08 markylaing

Will you iterate over each storage pool separately then?

tomponline avatar Aug 05 '22 10:08 tomponline

The remote and remote-fs pools will be handled entirely by the region so we just need to call GET /1.0/storage-pools/local/volumes?all-projects=true`.

https://github.com/canonical/lxd-cloud/issues/136#issuecomment-1177743822

markylaing avatar Aug 05 '22 10:08 markylaing

Right so there's only 1 local pool in this context?

tomponline avatar Aug 05 '22 10:08 tomponline