From 818b0da7a8ac1ba8343b7794512dec329a84efb3 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 12 Oct 2024 14:16:57 +0900 Subject: [PATCH] libvirt: Deprecate volume driver for unsupported volume backends The following volume drivers were marked unsupported in cinder, and subject for removal in future releases. - Quobyte: 2c1a77056672b35d51ef15242d59a2d81d8a7696 - Windows SMB: c690fe7cbd0d307d92689f4fae03423aa7a91157 - Virtuozzo: cf01d7eaf370485fe3fb834a3bcad13b0773b6e1 Deprecate the libvirt volume drivers specifically used for these backends, so that we can remove the corresponding volume driver code from nova when cinder removes these drivers. Change-Id: Ib5b2fbc3fbf1c076ab1eec611b471f16a5b71c06 --- nova/conf/libvirt.py | 40 +++++++++++++++++++ nova/virt/libvirt/volume/quobyte.py | 6 +++ nova/virt/libvirt/volume/smbfs.py | 6 +++ nova/virt/libvirt/volume/vzstorage.py | 4 ++ ...orted-volume-drivers-269265578de1c1e3.yaml | 10 +++++ 5 files changed, 66 insertions(+) create mode 100644 releasenotes/notes/deprecate-volume-driver-for-unsupported-volume-drivers-269265578de1c1e3.yaml diff --git a/nova/conf/libvirt.py b/nova/conf/libvirt.py index abcefee777..a380cc1103 100644 --- a/nova/conf/libvirt.py +++ b/nova/conf/libvirt.py @@ -1243,6 +1243,12 @@ Possible values: libvirt_volume_quobyte_opts = [ cfg.StrOpt('quobyte_mount_point_base', default=paths.state_path_def('mnt'), + deprecated_for_removal=True, + deprecated_since="31.0.0", + deprecated_reason=""" +Quobyte volume driver in cinder was marked unsupported. Quobyte volume support +will be removed from nova when the volume driver is removed from cinder. +""", help=""" Directory where the Quobyte volume is mounted on the compute node. @@ -1255,17 +1261,37 @@ Possible values: * A string representing absolute path of mount point. """), cfg.StrOpt('quobyte_client_cfg', + deprecated_for_removal=True, + deprecated_since="31.0.0", + deprecated_reason=""" +Quobyte volume driver in cinder was marked unsupported. Quobyte volume support +will be removed from nova when the volume driver is removed from cinder. +""", help='Path to a Quobyte Client configuration file.'), ] libvirt_volume_smbfs_opts = [ cfg.StrOpt('smbfs_mount_point_base', default=paths.state_path_def('mnt'), + deprecated_for_removal=True, + deprecated_since="31.0.0", + deprecated_reason=""" +Windows SMB volume driver in cinder was marked unsupported. SMBFS volume +support will be removed from nova when the volume driver is removed from +cinder. +""", help=""" Directory where the SMBFS shares are mounted on the compute node. """), cfg.StrOpt('smbfs_mount_options', default='', + deprecated_for_removal=True, + deprecated_since="31.0.0", + deprecated_reason=""" +Windows SMB volume driver in cinder was marked unsupported. SMBFS volume +support will be removed from nova when the volume driver is removed from +cinder. +""", help=""" Mount options passed to the SMBFS client. @@ -1295,6 +1321,13 @@ compute nodes, other method must be used for: libvirt_volume_vzstorage_opts = [ cfg.StrOpt('vzstorage_mount_point_base', default=paths.state_path_def('mnt'), + deprecated_for_removal=True, + deprecated_since="31.0.0", + deprecated_reason=""" +Virtuozzo Storage volume driver in cinder was marked unsupported. Virtuozzo +Storage volume support will be removed from nova when the volume driver is +removed from cinder. +""", help=""" Directory where the Virtuozzo Storage clusters are mounted on the compute node. @@ -1308,6 +1341,13 @@ Related options: ), cfg.StrOpt('vzstorage_mount_user', default='stack', + deprecated_for_removal=True, + deprecated_since="31.0.0", + deprecated_reason=""" +Virtuozzo Storage volume driver in cinder was marked unsupported. Virtuozzo +Storage volume support will be removed from nova when the volume driver is +removed from cinder. +""", help=""" Mount owner user name. diff --git a/nova/virt/libvirt/volume/quobyte.py b/nova/virt/libvirt/volume/quobyte.py index 2eb4bcfb42..38f7ce01f2 100644 --- a/nova/virt/libvirt/volume/quobyte.py +++ b/nova/virt/libvirt/volume/quobyte.py @@ -14,6 +14,7 @@ # under the License. import os +import warnings from oslo_concurrency import processutils from oslo_log import log as logging @@ -137,6 +138,11 @@ def validate_volume(mount_path): class LibvirtQuobyteVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver): """Class implements libvirt part of volume driver for Quobyte.""" + def __init__(self, host): + super(LibvirtQuobyteVolumeDriver, self).__init__(host) + warnings.warn('Quobyte volume support is deprecated', + category=DeprecationWarning, stacklevel=2) + def _get_mount_point_base(self): return CONF.libvirt.quobyte_mount_point_base diff --git a/nova/virt/libvirt/volume/smbfs.py b/nova/virt/libvirt/volume/smbfs.py index 9de1ce23cd..c0be722490 100644 --- a/nova/virt/libvirt/volume/smbfs.py +++ b/nova/virt/libvirt/volume/smbfs.py @@ -11,6 +11,7 @@ # under the License. import re +import warnings import nova.conf from nova.virt.libvirt import utils as libvirt_utils @@ -25,6 +26,11 @@ USERNAME_REGEX = re.compile(r"(user(?:name)?)=(?:[^ ,]+\\)?([^ ,]+)") class LibvirtSMBFSVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver): """Class implements libvirt part of volume driver for SMBFS.""" + def __init__(self, host): + super(LibvirtSMBFSVolumeDriver, self).__init__(host) + warnings.warn('SMBFS volume support is deprecated', + category=DeprecationWarning, stacklevel=2) + def _get_mount_point_base(self): return CONF.libvirt.smbfs_mount_point_base diff --git a/nova/virt/libvirt/volume/vzstorage.py b/nova/virt/libvirt/volume/vzstorage.py index babfdef55c..d3ac5354d7 100644 --- a/nova/virt/libvirt/volume/vzstorage.py +++ b/nova/virt/libvirt/volume/vzstorage.py @@ -12,6 +12,7 @@ import collections import re +import warnings from os_brick import initiator from os_brick.initiator import connector @@ -39,6 +40,9 @@ class LibvirtVZStorageVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver): def __init__(self, connection): super(LibvirtVZStorageVolumeDriver, self).__init__(connection) + warnings.warn('VZStorage volume support is deprecated', + category=DeprecationWarning, stacklevel=2) + # Check for duplicate options: # -c - cluster name # -l - log file, includes %(cluster_name)s, so it's handled as a diff --git a/releasenotes/notes/deprecate-volume-driver-for-unsupported-volume-drivers-269265578de1c1e3.yaml b/releasenotes/notes/deprecate-volume-driver-for-unsupported-volume-drivers-269265578de1c1e3.yaml new file mode 100644 index 0000000000..a5b6557ecb --- /dev/null +++ b/releasenotes/notes/deprecate-volume-driver-for-unsupported-volume-drivers-269265578de1c1e3.yaml @@ -0,0 +1,10 @@ +--- +deprecations: + - | + The following volume drivers of the libvirt virt driver have been + deprecated and will be removed in a future release. The corresponding + volume drivers in cinder were all marked unsupported and will be removed. + + - Quobyte + - SMBFS + - Virtuozzo Storage