From 2d7c46445396b0db780ba456ffb9284b177a6ae4 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Fri, 19 Jun 2020 10:57:51 -0700 Subject: [PATCH] Enable cephfs snapshots The CephFS driver optionally advertised snapshot support to manila, based on a configuration option "cephfs_enable_snapshots". Manila does not provide snapshots by default to users, unless an administrator chooses to set the "snapshot_support" extra-spec in the share type they're using. So this configuration option is really an unnecessary safeguard at this point. Moreover, CephFS snapshots are fully supported from Ceph Nautilus, and with Id847b1b5e6623172f2600afd69e51182067444cb, manila added a support statement for the Victoria release that indicates that Nautilus is the minimum version of ceph supported. So let's default this option to True, and deprecate this option at the same time to eliminate this duplicate safeguard. Partially-implements: bp update-cephfs-drivers Depends-On: I885ff78586540d01590f98cca2a00d55161dbe04 Change-Id: I1ef42b414f8af0b8f9a912655757ec200a75c309 Signed-off-by: Goutham Pacha Ravi --- doc/source/admin/cephfs_driver.rst | 7 ------- .../drivers/cephfs-native-driver.rst | 8 +------- doc/source/configuration/tables/manila-cephfs.inc | 2 -- manila/share/drivers/cephfs/driver.py | 6 +++++- .../run.yaml | 2 ++ .../run.yaml | 1 + .../cephfs-snapshots-enabled-4886147664270c32.yaml | 14 ++++++++++++++ 7 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/cephfs-snapshots-enabled-4886147664270c32.yaml diff --git a/doc/source/admin/cephfs_driver.rst b/doc/source/admin/cephfs_driver.rst index 326ba668f6..07650be21e 100644 --- a/doc/source/admin/cephfs_driver.rst +++ b/doc/source/admin/cephfs_driver.rst @@ -221,7 +221,6 @@ Create a section like this to define a CephFS native backend: cephfs_protocol_helper_type = CEPHFS cephfs_auth_id = manila cephfs_cluster_name = ceph - cephfs_enable_snapshots = True Set ``driver-handles-share-servers`` to ``False`` as the driver does not manage the lifecycle of ``share-servers``. For the driver backend to expose @@ -267,7 +266,6 @@ Create a section to define a CephFS NFS share backend: cephfs_conf_path = /etc/ceph/ceph.conf cephfs_auth_id = manila cephfs_cluster_name = ceph - cephfs_enable_snapshots = True cephfs_ganesha_server_is_remote= False cephfs_ganesha_server_ip = 172.24.4.3 ganesha_rados_store_enable = True @@ -487,11 +485,6 @@ Known restrictions evicting other CephFS clients using the same Ceph auth ID to connect to the backend. -- The snapshot support of the driver is disabled by default. The - ``cephfs_enable_snapshots`` configuration option needs to be set to ``True`` - to allow snapshot operations. Snapshot support will also need to be enabled - on the backend CephFS storage. - - Snapshots are read-only. A user can read a snapshot's contents from the ``.snap/{manila-snapshot-id}_{unknown-id}`` folder within the mounted share. diff --git a/doc/source/configuration/shared-file-systems/drivers/cephfs-native-driver.rst b/doc/source/configuration/shared-file-systems/drivers/cephfs-native-driver.rst index 60e96fdcb9..808c726ef8 100644 --- a/doc/source/configuration/shared-file-systems/drivers/cephfs-native-driver.rst +++ b/doc/source/configuration/shared-file-systems/drivers/cephfs-native-driver.rst @@ -159,10 +159,8 @@ Configure CephFS back end in ``manila.conf`` cephfs_conf_path = /etc/ceph/ceph.conf cephfs_auth_id = manila cephfs_cluster_name = ceph - cephfs_enable_snapshots = False - To let the driver perform snapshot related operations, set - cephfs_enable_snapshots to True . Also set the + Also set the ``driver-handles-share-servers`` to ``False`` as the driver does not manage the lifecycle of ``share-servers``. @@ -262,10 +260,6 @@ in the future. However, it can be used in private cloud deployments. - The guests have direct access to Ceph's public network. -- The snapshot support of the driver is disabled by default. - ``cephfs_enable_snapshots`` configuration option needs to be set to ``True`` - to allow snapshot operations. - - Snapshots are read-only. A user can read a snapshot's contents from the ``.snap/{manila-snapshot-id}_{unknown-id}`` folder within the mounted share. diff --git a/doc/source/configuration/tables/manila-cephfs.inc b/doc/source/configuration/tables/manila-cephfs.inc index 76d0a62a6a..3088b65d49 100644 --- a/doc/source/configuration/tables/manila-cephfs.inc +++ b/doc/source/configuration/tables/manila-cephfs.inc @@ -24,5 +24,3 @@ - (String) The name of the cluster in use, if it is not the default ('ceph'). * - ``cephfs_conf_path`` = - (String) Fully qualified path to the ceph.conf file. - * - ``cephfs_enable_snapshots`` = ``False`` - - (Boolean) Whether to enable snapshots in this driver. diff --git a/manila/share/drivers/cephfs/driver.py b/manila/share/drivers/cephfs/driver.py index 17880e8e3f..2b821bd41c 100644 --- a/manila/share/drivers/cephfs/driver.py +++ b/manila/share/drivers/cephfs/driver.py @@ -68,7 +68,11 @@ cephfs_opts = [ help="The prefix of the cephfs volume path." ), cfg.BoolOpt('cephfs_enable_snapshots', - default=False, + deprecated_for_removal=True, + deprecated_since='Victoria', + deprecated_reason='CephFS snapshots are fully supported ' + 'since the Nautilus release of Ceph.', + default=True, help="Whether to enable snapshots in this driver." ), cfg.StrOpt('cephfs_protocol_helper_type', diff --git a/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-native/run.yaml b/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-native/run.yaml index 70c002c034..38ea8949d0 100644 --- a/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-native/run.yaml +++ b/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-native/run.yaml @@ -74,6 +74,8 @@ export MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=False export DEVSTACK_GATE_USE_PYTHON3=True + export RUN_MANILA_SNAPSHOT_TESTS=True + function pre_test_hook { # Configure Manila with a CephFS Native or NFS driver backend. # Refer to job-template pre_test_hook for more details on the diff --git a/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-nfs/run.yaml b/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-nfs/run.yaml index 1428c75971..6ef11e3373 100644 --- a/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-nfs/run.yaml +++ b/playbooks/legacy/manila-tempest-minimal-dsvm-cephfs-nfs/run.yaml @@ -69,6 +69,7 @@ export MANILA_SETUP_IPV6=True export RUN_MANILA_IPV6_TESTS=True + export RUN_MANILA_SNAPSHOT_TESTS=True # Basic services needed for minimal job OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest diff --git a/releasenotes/notes/cephfs-snapshots-enabled-4886147664270c32.yaml b/releasenotes/notes/cephfs-snapshots-enabled-4886147664270c32.yaml new file mode 100644 index 0000000000..8906194a64 --- /dev/null +++ b/releasenotes/notes/cephfs-snapshots-enabled-4886147664270c32.yaml @@ -0,0 +1,14 @@ +--- +upgrade: + - | + The default value for the CephFS driver configuration option + ``cephfs_enable_snapshots`` has changed to True. This option has also + been deprecated, and will be removed in a future release. If snapshots + are not desired with this back end, set the share type extra spec + ``snapshot_support`` to False. +deprecations: + - | + The CephFS driver configuration option ``cephfs_enable_snapshots`` has + been deprecated, and will be removed in a future release. Use + the share type extra-spec ``snapshot_support`` to enable or disable + snapshots.