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