From c6b9f011b777aa0513e99a35fba7d976a4c9d4c1 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 17 Jun 2020 18:43:14 +0300 Subject: [PATCH] Explicitly enable/disable active/active As deployers may have usecases with several different backends being served with the same cinder volume, we should provide an option to easily override default behaviour Change-Id: Idc9a71d722b7443cf1437c2d95f75c615b6035a4 --- defaults/main.yml | 4 ++++ .../cinder_active_active_cluster-62674205a3259902.yaml | 6 ++++++ templates/cinder.conf.j2 | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/cinder_active_active_cluster-62674205a3259902.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 421b8dea..e9a98840 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -273,6 +273,10 @@ cinder_backend_lvm_inuse: '{{ (cinder_backends|default("")|to_json).find("lvm") # cinder_backend_rbd_inuse: True if the current host has an rbd backend cinder_backend_rbd_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.rbd.RBDDriver") != -1 }}' +# Set to false if you want to explicitly disable active/active cluster +cinder_active_active_cluster: "{{ cinder_backend_rbd_inuse }}" +cinder_active_active_cluster_name: ceph + ## Policy vars # Provide a list of access controls to merge with the default # access controls in the service code. diff --git a/releasenotes/notes/cinder_active_active_cluster-62674205a3259902.yaml b/releasenotes/notes/cinder_active_active_cluster-62674205a3259902.yaml new file mode 100644 index 00000000..80aa7397 --- /dev/null +++ b/releasenotes/notes/cinder_active_active_cluster-62674205a3259902.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Added variables `cinder_active_active_cluster` and + `cinder_active_active_cluster_name` that allow to explicitly enable or + disable active/active feature, and set cluster name. diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index 5b2f0c13..76e35125 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -14,8 +14,8 @@ rootwrap_config = /etc/cinder/rootwrap.conf api_paste_config = /etc/cinder/api-paste.ini auth_strategy = {{ cinder_auth_strategy }} -{% if cinder_backend_rbd_inuse | bool %} -cluster = ceph +{% if cinder_active_active_cluster | bool %} +cluster = {{ cinder_active_active_cluster_name }} {% endif %} ## Cinder Scheduler