diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 23f3bc6e86..407d01bef5 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -820,6 +820,8 @@ cinder_backend_ceph: "{{ enable_ceph }}" cinder_backend_vmwarevc_vmdk: "no" cinder_volume_group: "cinder-volumes" cinder_target_helper: "tgtadm" +# Valid options are [ '', redis, etcd ] +cinder_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}" # Valid options are [ nfs, swift, ceph ] cinder_backup_driver: "ceph" diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 476dc44412..64796fc1dc 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -206,9 +206,9 @@ auth_endpoint = {{ keystone_internal_url }} {% endif %} [coordination] -{% if enable_redis | bool %} +{% if cinder_coordination_backend == 'redis' %} backend_url = {{ redis_connection_string }} -{% elif enable_etcd | bool %} +{% elif cinder_coordination_backend == 'etcd' %} # NOTE(jeffrey4l): python-etcd3 module do not support multi endpoint here. backend_url = etcd3://{{ hostvars[groups['etcd'][0]]['ansible_' + hostvars[groups['etcd'][0]]['api_interface']]['ipv4']['address'] }}:{{ etcd_client_port }} {% endif %} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 006c2adc2e..7604f1e7b8 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -420,6 +420,8 @@ #cinder_backend_ceph: "{{ enable_ceph }}" #cinder_backend_vmwarevc_vmdk: "no" #cinder_volume_group: "cinder-volumes" +# Valid options are [ '', redis, etcd ] +#cinder_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}" # Valid options are [ nfs, swift, ceph ] #cinder_backup_driver: "ceph" diff --git a/releasenotes/notes/new-variable-cinder-coordination-backend-3426a4e1bd22cbbb.yaml b/releasenotes/notes/new-variable-cinder-coordination-backend-3426a4e1bd22cbbb.yaml new file mode 100644 index 0000000000..b4053b48ea --- /dev/null +++ b/releasenotes/notes/new-variable-cinder-coordination-backend-3426a4e1bd22cbbb.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Cinder coordination backend can now be configured via + cinder_coordination_backend variable. + Coordination is optional and can now be set to either redis or etcd.