]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: set, get, list and remove custom metadata for snapshot
authorNikhilkumar Shelke <nshelke@redhat.com>
Wed, 27 Apr 2022 16:20:33 +0000 (21:50 +0530)
committerNikhilkumar Shelke <nshelke@redhat.com>
Thu, 16 Jun 2022 11:32:56 +0000 (17:02 +0530)
commit7b6b456a628a10f8dd73c3afaf7d79f97e7f1514
tree8ab5db1bb3903aa671deb138f14a300a38685ab3
parent40a0ab7288352eba9acf713cbe8be6613d2915af
mgr/volumes: set, get, list and remove custom metadata for snapshot

If CephFS in ODF configured in external mode, user like to use
subvolume snapshot metadata to store some Openshift specific
information, as the PVC/PV/namespace the subvolumes/snapshot
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 snapshot metadata set <vol_name> <sub_name> <snap_name> <key_name> <value> [<group_name>]
    ceph fs subvolume snapshot metadata get <vol_name> <sub_name> <snap_name> <key_name> [<group_name>]
    ceph fs subvolume snapshot metadata ls <vol_name> <sub_name> <snap_name> [<group_name>]
    ceph fs subvolume snapshot metadata rm <vol_name> <sub_name> <snap_name> <key_name> [<group_name>] [--force]

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