diff --git a/doc/source/admin/cephfs_driver.rst b/doc/source/admin/cephfs_driver.rst index 6b5b438729..273285b754 100644 --- a/doc/source/admin/cephfs_driver.rst +++ b/doc/source/admin/cephfs_driver.rst @@ -41,7 +41,7 @@ Supported Operations The following operations are supported with CephFS backend: -- Create/delete share +- Create, delete, update and list share - Allow/deny access to share * Only ``cephx`` access type is supported for CephFS native protocol. @@ -49,10 +49,12 @@ The following operations are supported with CephFS backend: * ``read-only`` and ``read-write`` access levels are supported. - Extend/shrink share -- Create/delete snapshot -- Create/delete share groups -- Create/delete share group snapshots +- Create, delete, update and list snapshot +- Create, delete, update and list share groups +- Delete and list share group snapshots +.. important:: Share group snapshot creation is no longer supported in mainline + CephFS. This feature has been removed from manila W release. Prerequisites ~~~~~~~~~~~~~ diff --git a/manila/share/drivers/cephfs/driver.py b/manila/share/drivers/cephfs/driver.py index d4504e4c53..4cc9a651c8 100644 --- a/manila/share/drivers/cephfs/driver.py +++ b/manila/share/drivers/cephfs/driver.py @@ -601,7 +601,7 @@ class CephFSDriver(driver.ExecuteMixin, driver.GaneshaMixin, rados_command(self.rados_client, "fs subvolumegroup create", argdict) def delete_share_group(self, context, sg_dict, share_server=None): - # create a FS group + # delete a FS group LOG.debug("[%(be)s]: delete_share_group: share_group=%(id)s.", {"be": self.backend_name, "id": sg_dict['id']}) @@ -641,16 +641,10 @@ class CephFSDriver(driver.ExecuteMixin, driver.GaneshaMixin, {"be": self.backend_name, "id": snap_dict['share_group_id'], "sn": snap_dict["id"]}) - argdict = { - "vol_name": self.volname, - "group_name": snap_dict["share_group_id"], - "snap_name": snap_dict["id"] - } - - rados_command( - self.rados_client, "fs subvolumegroup snapshot create", argdict) - - return None, [] + msg = _("Share group snapshot feature is no longer supported in " + "mainline CephFS (existing group snapshots can still be " + "listed and deleted).") + raise exception.ShareBackendException(msg=msg) def _get_clone_status(self, share): """Check the status of a newly cloned share.""" diff --git a/manila/tests/share/drivers/cephfs/test_driver.py b/manila/tests/share/drivers/cephfs/test_driver.py index d0bc855d26..905d9db81b 100644 --- a/manila/tests/share/drivers/cephfs/test_driver.py +++ b/manila/tests/share/drivers/cephfs/test_driver.py @@ -409,22 +409,15 @@ class CephFSDriverTestCase(test.TestCase): group_delete_prefix, group_delete_dict) def test_create_share_group_snapshot(self): - group_snapshot_create_prefix = "fs subvolumegroup snapshot create" + msg = ("Share group snapshot feature is no longer supported in " + "mainline CephFS (existing group snapshots can still be " + "listed and deleted).") + driver.rados_command.side_effect = exception.ShareBackendException(msg) - group_snapshot_create_dict = { - "vol_name": self._driver.volname, - "group_name": "sgid", - "snap_name": "snapid", - } - - self._driver.create_share_group_snapshot(self._context, { - 'share_group_id': 'sgid', - 'id': 'snapid', - }) - - driver.rados_command.assert_called_once_with( - self._driver.rados_client, - group_snapshot_create_prefix, group_snapshot_create_dict) + self.assertRaises(exception.ShareBackendException, + self._driver.create_share_group_snapshot, + self._context, {'share_group_id': 'sgid', + 'id': 'snapid'}) def test_delete_share_group_snapshot(self): group_snapshot_delete_prefix = "fs subvolumegroup snapshot rm" diff --git a/releasenotes/notes/bug-1871252-cephfs-doesnt-support-subvolume-group-snapshots-344efbb9ba74e05c.yaml b/releasenotes/notes/bug-1871252-cephfs-doesnt-support-subvolume-group-snapshots-344efbb9ba74e05c.yaml new file mode 100644 index 0000000000..9e82451475 --- /dev/null +++ b/releasenotes/notes/bug-1871252-cephfs-doesnt-support-subvolume-group-snapshots-344efbb9ba74e05c.yaml @@ -0,0 +1,8 @@ +--- +deprecations: + - | + Create share group snapshot feature is no longer supported + in manila CephFS drivers (both Native and NFS Ganesha) since + the subvolume group snapshot feature is no longer supported + in mainline CephFS (existing group snapshots can still + be listed and deleted).