From 762a1bfd46ede4515fc207c90d05df54e1a7dbc7 Mon Sep 17 00:00:00 2001 From: katarimanoj Date: Mon, 12 Sep 2022 16:06:21 +0530 Subject: [PATCH] new tht for Cinder RBD backend Currently, Cinder RBD storage backend is configured as part of cinder-volume-container-puppet.yaml. This change will just relocate the existing cinder RBD parameters in their own template. There are no new parameters, and the existing parameters retain the same default values Change-Id: I73008a3ff38bafa987f5c2be6fb34d2d110bbaef --- ci/custom_ci_roles_data.yaml | 3 +- .../cinder/cinder-backend-rbd-puppet.yaml | 117 ++++++++++++++++++ .../cinder-volume-container-puppet.yaml | 80 ------------ overcloud-resource-registry-puppet.j2.yaml | 5 +- ...backend_new_template-b25b017fdd7c90c1.yaml | 9 ++ roles/Controller.yaml | 3 +- roles/ControllerNoCeph.yaml | 3 +- roles/ControllerNovaStandalone.yaml | 3 +- roles/ControllerSriov.yaml | 3 +- roles/ControllerStorageDashboard.yaml | 3 +- roles/ControllerStorageNfs.yaml | 3 +- roles/Standalone.yaml | 5 +- roles_data.yaml | 3 +- 13 files changed, 148 insertions(+), 92 deletions(-) create mode 100644 deployment/cinder/cinder-backend-rbd-puppet.yaml create mode 100644 releasenotes/notes/cinder_rbd_backend_new_template-b25b017fdd7c90c1.yaml diff --git a/ci/custom_ci_roles_data.yaml b/ci/custom_ci_roles_data.yaml index 7155bcf9d4..7aebb5faee 100644 --- a/ci/custom_ci_roles_data.yaml +++ b/ci/custom_ci_roles_data.yaml @@ -72,8 +72,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/deployment/cinder/cinder-backend-rbd-puppet.yaml b/deployment/cinder/cinder-backend-rbd-puppet.yaml new file mode 100644 index 0000000000..853367fd2b --- /dev/null +++ b/deployment/cinder/cinder-backend-rbd-puppet.yaml @@ -0,0 +1,117 @@ +heat_template_version: wallaby + +description: > + Openstack Cinder rbd backend + +parameters: + CephClientUserName: + default: openstack + type: string + CephClusterFSID: + type: string + description: The Ceph cluster FSID. Must be a UUID. + CephClusterName: + type: string + default: ceph + description: The Ceph cluster name. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + description: > + The Ceph cluster name must be at least 1 character and contain only + letters and numbers. + CinderEnableRbdBackend: + default: false + description: Whether to enable or not the Rbd backend for Cinder + type: boolean + CinderRbdBackendName: + type: comma_delimited_list + default: 'tripleo_ceph' + description: A list of Cinder RBD backend names. + CinderRbdAvailabilityZone: + default: '' + description: > + The availability zone of the RBD Cinder backend. + When set, it overrides the default CinderStorageAvailabilityZone. + type: string + CinderRbdPoolName: + default: volumes + type: string + CinderRbdExtraPools: + default: [] + description: > + List of extra Ceph pools for use with RBD backends for Cinder. An + extra Cinder RBD backend driver is created for each pool in the + list. This is in addition to the standard RBD backend driver + associated with the CinderRbdPoolName. + type: comma_delimited_list + CinderRbdFlattenVolumeFromSnapshot: + default: false + description: > + Whether RBD volumes created from a snapshot should be flattened + in order to remove a dependency on the snapshot. + type: boolean + CinderRbdMultiConfig: + type: json + default: {} + description: | + Dictionary of settings when configuring multiple RBD backends. The + hash key is the backend name, and the value is a dictionary of parameter + values unique to that backend. The following parameters are required, + and must match the corresponding value defined in CephExternalMultiConfig. + CephClusterName (must match the CephExternalMultiConfig entry's 'cluster') + CephClusterFSID (must match the CephExternalMultiConfig entry's 'fsid') + The following parameters are optional, and override the corresponding + parameter's default value. + CephClientUserName + CinderRbdPoolName + CinderRbdExtraPools + CinderRbdAvailabilityZone + CinderRbdFlattenVolumeFromSnapshot + ServiceData: + default: {} + description: Dictionary packing service data + type: json + ServiceNetMap: + default: {} + description: Mapping of service_name -> network name. Typically set + via parameter_defaults in the resource registry. Use + parameter_merge_strategies to merge it with the defaults. + type: json + RoleName: + default: '' + description: Role name on which the service is applied + type: string + RoleParameters: + default: {} + description: Parameters specific to the role + type: json + EndpointMap: + default: {} + type: json + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + +outputs: + role_data: + description: Role data for the Cinder rbd backend. + value: + service_name: cinder_backend_rbd + config_settings: + map_merge: + - tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend} + tripleo::profile::base::cinder::volume::rbd::backend_name: {get_param: CinderRbdBackendName} + tripleo::profile::base::cinder::volume::rbd::cinder_rbd_ceph_conf: + list_join: + - '' + - - '/etc/ceph/' + - {get_param: CephClusterName} + - '.conf' + tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName} + tripleo::profile::base::cinder::volume::rbd::cinder_rbd_extra_pools: {get_param: CinderRbdExtraPools} + tripleo::profile::base::cinder::volume::rbd::cinder_rbd_secret_uuid: {get_param: CephClusterFSID} + tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName} + tripleo::profile::base::cinder::volume::rbd::cinder_rbd_flatten_volume_from_snapshot: {get_param: CinderRbdFlattenVolumeFromSnapshot} + tripleo::profile::base::cinder::volume::rbd::multi_config: {get_param: CinderRbdMultiConfig} + - if: + - not: {equals : [{get_param: CinderRbdAvailabilityZone}, '']} + - tripleo::profile::base::cinder::volume::rbd::backend_availability_zone: {get_param: CinderRbdAvailabilityZone} diff --git a/deployment/cinder/cinder-volume-container-puppet.yaml b/deployment/cinder/cinder-volume-container-puppet.yaml index c6ef5980db..28189c6775 100644 --- a/deployment/cinder/cinder-volume-container-puppet.yaml +++ b/deployment/cinder/cinder-volume-container-puppet.yaml @@ -46,18 +46,6 @@ parameters: default: {} description: Parameters specific to the role type: json - CephClientUserName: - default: openstack - type: string - CephClusterName: - type: string - default: ceph - description: The Ceph cluster name. - constraints: - - allowed_pattern: "[a-zA-Z0-9]+" - description: > - The Ceph cluster name must be at least 1 character and contain only - letters and numbers. CinderVolumeCluster: default: '' description: > @@ -71,10 +59,6 @@ parameters: default: true description: Whether to enable or not the Iscsi backend for Cinder type: boolean - CinderEnableRbdBackend: - default: false - description: Whether to enable or not the Rbd backend for Cinder - type: boolean CinderISCSIAvailabilityZone: default: '' description: > @@ -89,53 +73,6 @@ parameters: default: iscsi description: Whether to use TCP ('iscsi') or iSER RDMA ('iser') for iSCSI type: string - CinderRbdBackendName: - type: comma_delimited_list - default: 'tripleo_ceph' - description: A list of Cinder RBD backend names. - CinderRbdAvailabilityZone: - default: '' - description: > - The availability zone of the RBD Cinder backend. - When set, it overrides the default CinderStorageAvailabilityZone. - type: string - CinderRbdPoolName: - default: volumes - type: string - CinderRbdExtraPools: - default: [] - description: > - List of extra Ceph pools for use with RBD backends for Cinder. An - extra Cinder RBD backend driver is created for each pool in the - list. This is in addition to the standard RBD backend driver - associated with the CinderRbdPoolName. - type: comma_delimited_list - CinderRbdFlattenVolumeFromSnapshot: - default: false - description: > - Whether RBD volumes created from a snapshot should be flattened - in order to remove a dependency on the snapshot. - type: boolean - CinderRbdMultiConfig: - type: json - default: {} - description: | - Dictionary of settings when configuring multiple RBD backends. The - hash key is the backend name, and the value is a dictionary of parameter - values unique to that backend. The following parameters are required, - and must match the corresponding value defined in CephExternalMultiConfig. - CephClusterName (must match the CephExternalMultiConfig entry's 'cluster') - CephClusterFSID (must match the CephExternalMultiConfig entry's 'fsid') - The following parameters are optional, and override the corresponding - parameter's default value. - CephClientUserName - CinderRbdPoolName - CinderRbdExtraPools - CinderRbdAvailabilityZone - CinderRbdFlattenVolumeFromSnapshot - CephClusterFSID: - type: string - description: The Ceph cluster FSID. Must be a UUID. MonitoringSubscriptionCinderVolume: default: 'overcloud-cinder-volume' type: string @@ -195,23 +132,9 @@ outputs: - get_attr: [CinderCommon, cinder_volume_config_settings] - tripleo::profile::base::lvm::enable_udev: false tripleo::profile::base::cinder::volume::cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend} - tripleo::profile::base::cinder::volume::cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend} tripleo::profile::base::cinder::volume::cinder_volume_cluster: {get_param: CinderVolumeCluster} tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_helper: {get_param: CinderISCSIHelper} tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_protocol: {get_param: CinderISCSIProtocol} - tripleo::profile::base::cinder::volume::rbd::backend_name: {get_param: CinderRbdBackendName} - tripleo::profile::base::cinder::volume::rbd::cinder_rbd_ceph_conf: - list_join: - - '' - - - '/etc/ceph/' - - {get_param: CephClusterName} - - '.conf' - tripleo::profile::base::cinder::volume::rbd::cinder_rbd_pool_name: {get_param: CinderRbdPoolName} - tripleo::profile::base::cinder::volume::rbd::cinder_rbd_extra_pools: {get_param: CinderRbdExtraPools} - tripleo::profile::base::cinder::volume::rbd::cinder_rbd_secret_uuid: {get_param: CephClusterFSID} - tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name: {get_param: CephClientUserName} - tripleo::profile::base::cinder::volume::rbd::cinder_rbd_flatten_volume_from_snapshot: {get_param: CinderRbdFlattenVolumeFromSnapshot} - tripleo::profile::base::cinder::volume::rbd::multi_config: {get_param: CinderRbdMultiConfig} cinder::backend::defaults::use_multipath_for_image_xfer: true # NOTE: bind IP is found in hiera replacing the network name with the local node IP # for the given network; replacement examples (eg. for internal_api): @@ -227,9 +150,6 @@ outputs: - if: - not: {equals : [{get_param: CinderISCSIAvailabilityZone}, '']} - tripleo::profile::base::cinder::volume::iscsi::backend_availability_zone: {get_param: CinderISCSIAvailabilityZone} - - if: - - not: {equals : [{get_param: CinderRbdAvailabilityZone}, '']} - - tripleo::profile::base::cinder::volume::rbd::backend_availability_zone: {get_param: CinderRbdAvailabilityZone} - if: - {get_param: CinderEtcdLocalConnect} - tripleo::profile::base::cinder::volume::etcd_host: diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index 92f1f29594..c2e88651ae 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -107,9 +107,10 @@ resource_registry: OS::TripleO::Services::CephIngress: OS::Heat::None OS::TripleO::Services::CinderApi: deployment/cinder/cinder-api-container-puppet.yaml OS::TripleO::Services::CinderBackup: OS::Heat::None - # NFS Backend is still optional unless it is explicitly enabled, this is just a separate template. + # NFS and RBD Backends are still optional unless they are explicitly enabled, this is just a separate template. # This is done in order to retain the legacy behavior, and avoid accidental problems when doing an update. OS::TripleO::Services::CinderBackendNfs: deployment/cinder/cinder-backend-nfs-puppet.yaml + OS::TripleO::Services::CinderBackendRbd: deployment/cinder/cinder-backend-rbd-puppet.yaml OS::TripleO::Services::CinderScheduler: deployment/cinder/cinder-scheduler-container-puppet.yaml OS::TripleO::Services::CinderVolume: deployment/cinder/cinder-volume-pacemaker-puppet.yaml # BlockStorageCinderVolume uses the non-pcmk cinder-volume template @@ -258,8 +259,8 @@ resource_registry: OS::TripleO::Services::CinderBackendDellEMCVNX: OS::Heat::None OS::TripleO::Services::CinderBackendDellEMCXtremio: OS::Heat::None OS::TripleO::Services::CinderBackendNetApp: OS::Heat::None - OS::TripleO::Services::CinderBackendPure: OS::Heat::None OS::TripleO::Services::CinderBackendNVMeOF: OS::Heat::None + OS::TripleO::Services::CinderBackendPure: OS::Heat::None OS::TripleO::Services::CinderVolumeEdge: OS::Heat::None OS::TripleO::Services::Etcd: OS::Heat::None OS::TripleO::Services::AuditD: OS::Heat::None diff --git a/releasenotes/notes/cinder_rbd_backend_new_template-b25b017fdd7c90c1.yaml b/releasenotes/notes/cinder_rbd_backend_new_template-b25b017fdd7c90c1.yaml new file mode 100644 index 0000000000..78ae9301da --- /dev/null +++ b/releasenotes/notes/cinder_rbd_backend_new_template-b25b017fdd7c90c1.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Relocate the existing cinder RBD parameters in their own template. + There are no new parameters, and the existing parameters retain the same default values. +upgrade: + - | + Although the cinder RBD parameters have been moved to their own file, there + is no impact on upgrades because the parameters themselves are unchanged. diff --git a/roles/Controller.yaml b/roles/Controller.yaml index af2f4cc926..a30b4ab130 100644 --- a/roles/Controller.yaml +++ b/roles/Controller.yaml @@ -71,8 +71,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/roles/ControllerNoCeph.yaml b/roles/ControllerNoCeph.yaml index b02c4ff3df..e224946232 100644 --- a/roles/ControllerNoCeph.yaml +++ b/roles/ControllerNoCeph.yaml @@ -59,8 +59,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/roles/ControllerNovaStandalone.yaml b/roles/ControllerNovaStandalone.yaml index 6651249fc7..7c53cbcc61 100644 --- a/roles/ControllerNovaStandalone.yaml +++ b/roles/ControllerNovaStandalone.yaml @@ -61,8 +61,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/roles/ControllerSriov.yaml b/roles/ControllerSriov.yaml index d6f413d779..d218488e88 100644 --- a/roles/ControllerSriov.yaml +++ b/roles/ControllerSriov.yaml @@ -68,8 +68,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/roles/ControllerStorageDashboard.yaml b/roles/ControllerStorageDashboard.yaml index b0c59acae0..0136221821 100644 --- a/roles/ControllerStorageDashboard.yaml +++ b/roles/ControllerStorageDashboard.yaml @@ -70,8 +70,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/roles/ControllerStorageNfs.yaml b/roles/ControllerStorageNfs.yaml index 6ccf63fd90..aa4d7aad3c 100644 --- a/roles/ControllerStorageNfs.yaml +++ b/roles/ControllerStorageNfs.yaml @@ -70,8 +70,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/roles/Standalone.yaml b/roles/Standalone.yaml index 450eeec7a3..e97cab1ce5 100644 --- a/roles/Standalone.yaml +++ b/roles/Standalone.yaml @@ -64,10 +64,11 @@ - OS::TripleO::Services::CinderBackendDellEMCVNX - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendDellSc - - OS::TripleO::Services::CinderBackendNVMeOF - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs + - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume diff --git a/roles_data.yaml b/roles_data.yaml index ed47fd4fba..75f91d098a 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -74,8 +74,9 @@ - OS::TripleO::Services::CinderBackendDellEMCXtremio - OS::TripleO::Services::CinderBackendNetApp - OS::TripleO::Services::CinderBackendNfs - - OS::TripleO::Services::CinderBackendPure - OS::TripleO::Services::CinderBackendNVMeOF + - OS::TripleO::Services::CinderBackendPure + - OS::TripleO::Services::CinderBackendRbd - OS::TripleO::Services::CinderBackup - OS::TripleO::Services::CinderScheduler - OS::TripleO::Services::CinderVolume