Allow cinder coordination backend to be configured

This is to allow operator to prevent enabling redis and/or
etcd from magically configuring cinder coordinator.

Note this change is backwards-compatible.

Change-Id: Ie10be55968e43e3b9cc347b1b58771c1f7b1b910
Related-Bug: #1840070
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
This commit is contained in:
Radosław Piliszek 2019-08-13 20:22:54 +02:00
parent 64d587b819
commit 03b4c706fa
4 changed files with 12 additions and 2 deletions

View File

@ -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"

View File

@ -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 %}

View File

@ -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"

View File

@ -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.