-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapshots missing in used_by
for custom volumes and storage pools on latest/edge
LXD build
#14291
Comments
@hamistao please can you look into this issue next. |
This also applies to instance snapshots. Instance snapshots are missing in the used by section in the |
used_by
for custom volumes on latest/edge
LXD buildused_by
for custom volumes and storage pools on latest/edge
LXD build
Yes, I've updated the issue title.
Sure @tomponline I will get a reproducer using |
Are you sure about that, I dont see it on latest/stable either. |
Nor does it show on |
Nor does it show on |
Marking this as incomplete until we get more info on whether this is a regression or a feature improvement request (will prioritize accordingly). For including volume and instance snapshots in a pool's used by list, what is the use case for this? Thanks |
I actually didn't test this myself, David helped with the testing there. @edlerd just to confirm, the channel you tested on is |
In the UI, we can inspect a pool's used by list also allowing them to link to those resources. Instance/volume snapshots being one of them. The feature was there in the UI before I joined I believe, so I may not have the full context here. |
@edlerd thanks, what about storage volumes? |
Volume snapshots show up as well for 5.21/stable and 5.21/candidate. Reproducer:
|
Please can we have reproducers without needing the UI, so |
Both instance and volume snapshots also show up in 5.0/stable. Though, volume snapshots cannot be created from the ui in 5.0/stable. But after creating them in the cli they show up in the ui and in the api. |
I've tried that reproducer though, but using |
That is the misunderstanding, the snapshots are missing in the response to
request. They should appear in the |
It's also missing in response to
@tomponline, for step 4 I was using |
The snapshots never showed up for The bug is |
Right got you, thanks for clarification. |
@markylaing its this line that is incorrectly filtering out snapshots https://github.com/canonical/lxd/blob/main/lxd/storage_pools.go#L673 Please can you take a look |
Oh interesting, I am authenticated with TLS if that helps, I'd expect to see all used by resources in this case. |
Its happening with unix socket too. |
Of course, thanks for clarifying 👍 |
@markylaing the error is coming from lxd/lxd/project/permissions.go Lines 67 to 69 in c74a664
Should we be ignoring all errors from |
@markylaing tracked the issue to lxd/lxd/auth/entitlements_generated.go Lines 579 to 589 in c74a664
There seems to be a missing section for entity type |
@markylaing should we add a section for entity.TypeStorageVolumeSnapshot to that map, or instead should |
Required information
Issue description
On
latest/edge
LXD build, when I create a custom volume snapshot, it no longer shows up in theused_by
metadata field when making a request toGET /1.0/storage-pools/<pool_name>/volumes/custom/<volume_name>?recursion=1
. However, this is fine on thelatest/stable
LXD build and the snapshot does show up in the response.Reproducer
lxc storage volume create default test-vol
lxc storage volume snapshot default test-vol
lxc storage volume show default test-vol
. See below results:It is expected that
used_by
should have the snapshot resource url.4. Check detail for the storage pool
lxc storage show default
. See below results:It is expected that
used_by
should have the snapshot resource url associated to the new custom volume created above.The text was updated successfully, but these errors were encountered: