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 <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi 2020-06-19 10:57:51 -07:00
parent 03cb8a39ef
commit 2d7c464453
7 changed files with 23 additions and 17 deletions

View File

@ -221,7 +221,6 @@ Create a section like this to define a CephFS native backend:
cephfs_protocol_helper_type = CEPHFS cephfs_protocol_helper_type = CEPHFS
cephfs_auth_id = manila cephfs_auth_id = manila
cephfs_cluster_name = ceph cephfs_cluster_name = ceph
cephfs_enable_snapshots = True
Set ``driver-handles-share-servers`` to ``False`` as the driver does not Set ``driver-handles-share-servers`` to ``False`` as the driver does not
manage the lifecycle of ``share-servers``. For the driver backend to expose 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_conf_path = /etc/ceph/ceph.conf
cephfs_auth_id = manila cephfs_auth_id = manila
cephfs_cluster_name = ceph cephfs_cluster_name = ceph
cephfs_enable_snapshots = True
cephfs_ganesha_server_is_remote= False cephfs_ganesha_server_is_remote= False
cephfs_ganesha_server_ip = 172.24.4.3 cephfs_ganesha_server_ip = 172.24.4.3
ganesha_rados_store_enable = True 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 evicting other CephFS clients using the same Ceph auth ID to connect to the
backend. 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 - Snapshots are read-only. A user can read a snapshot's contents from the
``.snap/{manila-snapshot-id}_{unknown-id}`` folder within the mounted ``.snap/{manila-snapshot-id}_{unknown-id}`` folder within the mounted
share. share.

View File

@ -159,10 +159,8 @@ Configure CephFS back end in ``manila.conf``
cephfs_conf_path = /etc/ceph/ceph.conf cephfs_conf_path = /etc/ceph/ceph.conf
cephfs_auth_id = manila cephfs_auth_id = manila
cephfs_cluster_name = ceph cephfs_cluster_name = ceph
cephfs_enable_snapshots = False
To let the driver perform snapshot related operations, set Also set the
cephfs_enable_snapshots to True . Also set the
``driver-handles-share-servers`` to ``False`` as the driver does not manage ``driver-handles-share-servers`` to ``False`` as the driver does not manage
the lifecycle of ``share-servers``. 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 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 - Snapshots are read-only. A user can read a snapshot's contents from the
``.snap/{manila-snapshot-id}_{unknown-id}`` folder within the mounted ``.snap/{manila-snapshot-id}_{unknown-id}`` folder within the mounted
share. share.

View File

@ -24,5 +24,3 @@
- (String) The name of the cluster in use, if it is not the default ('ceph'). - (String) The name of the cluster in use, if it is not the default ('ceph').
* - ``cephfs_conf_path`` = * - ``cephfs_conf_path`` =
- (String) Fully qualified path to the ceph.conf file. - (String) Fully qualified path to the ceph.conf file.
* - ``cephfs_enable_snapshots`` = ``False``
- (Boolean) Whether to enable snapshots in this driver.

View File

@ -68,7 +68,11 @@ cephfs_opts = [
help="The prefix of the cephfs volume path." help="The prefix of the cephfs volume path."
), ),
cfg.BoolOpt('cephfs_enable_snapshots', 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." help="Whether to enable snapshots in this driver."
), ),
cfg.StrOpt('cephfs_protocol_helper_type', cfg.StrOpt('cephfs_protocol_helper_type',

View File

@ -74,6 +74,8 @@
export MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=False export MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=False
export DEVSTACK_GATE_USE_PYTHON3=True export DEVSTACK_GATE_USE_PYTHON3=True
export RUN_MANILA_SNAPSHOT_TESTS=True
function pre_test_hook { function pre_test_hook {
# Configure Manila with a CephFS Native or NFS driver backend. # Configure Manila with a CephFS Native or NFS driver backend.
# Refer to job-template pre_test_hook for more details on the # Refer to job-template pre_test_hook for more details on the

View File

@ -69,6 +69,7 @@
export MANILA_SETUP_IPV6=True export MANILA_SETUP_IPV6=True
export RUN_MANILA_IPV6_TESTS=True export RUN_MANILA_IPV6_TESTS=True
export RUN_MANILA_SNAPSHOT_TESTS=True
# Basic services needed for minimal job # Basic services needed for minimal job
OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest

View File

@ -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.