Feature #44277
closedpybind/mgr/volumes: add command to return metadata regarding a subvolume
0%
Description
In Ceph CSI, there are cases where an existing subvolume needs to be inspected for a match to an incoming request. There are also possible future cases where we may need to list all CSI subvolumes and return its metadata to form the CSI context. A couple of examples are given below,
- An interrupted CreateVolume call in CSI can result in needing to inspect the already created subvolume to see if its size matchs the request
- An interrupted Createvolume call in CSI can result in needing to determine the already created subvolumes data pool extended attribute, to address topology response on a subsequent request for the same
Filing this issue to request a "subvolume info" extension to the CLI, possibly along the lines below,
ceph fs subvolume info <vol_name> <subvol_name> [--group_name <subvol_group_name> <--format [json|???]>]
The returned metadata needs to contain,
- Size (or quota set)
- Data pool (if set, or default etc.)
- CreatedAt timestamp
- Any other attributes, to be future safe
Also, a similar request info request is required for snapshots, to fetch information along the same lines as above. Hence, consider this request to add the info extension to "ceph fs subvolume snapshot" series of commands as well.
Further, would also like to understand how far back, in terms of Ceph versions, this can be backported once addressed, to determine both upstream and downstream version support for the same.