]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: set, get, list and remove custom metadata for subvolume
authorNikhilkumar Shelke <nshelke@redhat.com>
Thu, 17 Mar 2022 19:23:55 +0000 (00:53 +0530)
committerNikhilkumar Shelke <nshelke@redhat.com>
Fri, 22 Apr 2022 03:06:28 +0000 (08:36 +0530)
commit4856a3d990348a69b03cf33a16b2d729e5edffc4
treef03f12b0770c232b4c6f6d83c0f3fc74544f2199
parent0b17a6e461cd4e6e0435150fb09e84860feb6289
mgr/volumes: set, get, list and remove custom metadata for subvolume

If CephFS in ODF configured in external mode, user like to use
volume / subvolume metadata to store some Openshift specific
information, as the PVC / PV / namespace the volumes / subvolumes
are coming from. For RBD volumes, it's possible to add metadata
information to the images using the 'rbd image-meta' command.
However, this feature is not available for CephFS volumes.
We'd like to request this capability.

Adding following commands:
    ceph fs subvolume metadata set <vol_name> <sub_name> <key_name> <value> [<group_name>]
    ceph fs subvolume metadata get <vol_name> <sub_name> <key_name> [<group_name>]
    ceph fs subvolume metadata ls <vol_name> <sub_name> [<group_name>]
    ceph fs subvolume metadata rm <vol_name> <sub_name> <key_name> [<group_name>] [--force]

Fixes: https://tracker.ceph.com/issues/54472
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit fb8865194a0f3a74b1ca9ade9be7f401eb55e7d6)
src/pybind/mgr/volumes/fs/operations/template.py
src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py
src/pybind/mgr/volumes/fs/volume.py
src/pybind/mgr/volumes/module.py