From 193830ef0f478a69b06365c9060b3da08f11c127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nasiadka?= Date: Tue, 17 Nov 2020 14:23:05 +0100 Subject: [PATCH] cinder: check for coordination backend when HA Change-Id: I02817963c691784c126c79e330981e0cc771bc88 Related-Bug: #1904062 --- ansible/roles/cinder/tasks/precheck.yml | 10 ++++++++++ tests/templates/globals-default.j2 | 1 + 2 files changed, 11 insertions(+) diff --git a/ansible/roles/cinder/tasks/precheck.yml b/ansible/roles/cinder/tasks/precheck.yml index 0c42e37668..d722139de5 100644 --- a/ansible/roles/cinder/tasks/precheck.yml +++ b/ansible/roles/cinder/tasks/precheck.yml @@ -57,6 +57,16 @@ - enable_cinder_backend_lvm | bool - inventory_hostname in groups['cinder-volume'] +- name: Checking for coordination backend if Ceph backend is enabled + run_once: True + fail: + msg: "Please enable redis or etcd when using Cinder Ceph backend" + when: + - not skip_cinder_backend_check | bool + - cinder_backend_ceph | bool + - cinder_coordination_backend == '' + - groups['cinder-volume'] | length > 1 + - name: Check if S3 configurations are defined assert: that: diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index 068f27a939..9a8b3b709e 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -147,6 +147,7 @@ enable_mariabackup: "yes" # kolla-ansible vars enable_cinder: "yes" enable_neutron_agent_ha: "yes" +enable_redis: "yes" cinder_cluster_name: "kolla_ceph" # External Ceph glance_backend_ceph: "yes"