]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Use snapshot root directory attrs when creating clone root
authorShyamsundar Ranganathan <srangana@redhat.com>
Tue, 23 Jun 2020 23:57:52 +0000 (19:57 -0400)
committerShyamsundar Ranganathan <srangana@redhat.com>
Thu, 27 Aug 2020 19:42:58 +0000 (15:42 -0400)
commita4d4057b6b61239d281674cec17e3ed5e088ac25
tree8b201bc6d8bd795f680cffdf3f19ce83ddd1297b
parent383e4d70d71d68483c1b594867e8096a53d260aa
mgr/volumes: Use snapshot root directory attrs when creating clone root

If a subvolumes mode or uid/gid values are changed post a snapshot,
and a clone of a snapshot prior to the change is initiated, the clone
inherits the current source subvolumes attributes, rather than the
snapshots attributes.

Fixing this by using the snapshots subvolume root attributes to create
the clone subvolumes root.

Following attributes are picked from the source subvolume snapshot:
- uid, gid, mode, data pool, pool namespace, quota

Fixes: https://tracker.ceph.com/issues/46163
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit 0eaf9b0bd2786762160b83edc52d979f5aad233c)
qa/tasks/cephfs/test_volumes.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/operations/versions/subvolume_v2.py
src/pybind/mgr/volumes/fs/volume.py