From ca9720e14f1fb52d53e3e12b7febbe9ed5f5d413 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 5 Jul 2024 12:43:52 +0100 Subject: [PATCH] Add precheck for Horizon config file renames in Caracal This is a common custom configuration and is likely to catch people out on upgrade. See I17a16ce746faa8898a457cadbb6f996f964a5b6f for the original change. Change-Id: I46d18c246703373abdb27aec0061aff161d842a7 --- ansible/roles/horizon/tasks/precheck.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ansible/roles/horizon/tasks/precheck.yml b/ansible/roles/horizon/tasks/precheck.yml index 97b8b7ddf3..43c7158b1b 100644 --- a/ansible/roles/horizon/tasks/precheck.yml +++ b/ansible/roles/horizon/tasks/precheck.yml @@ -25,3 +25,25 @@ when: - container_facts['horizon'] is not defined - inventory_hostname in groups[horizon.group] + +# TODO(mgoddard): Remove in the 2025.1 E release. +- name: Check for old local_settings file + assert: + that: + - "'{{ node_custom_config }}/horizon/{{ inventory_hostname }}/local_settings' is not exists" + - "'{{ node_custom_config }}/horizon/local_settings' is not exists" + fail_msg: >- + Horizon configuration must now be provided using + /etc/kolla/config/horizon/_9998-kolla-settings.py rather than + /etc/kolla/config/horizon/local_settings. + +# TODO(mgoddard): Remove in the 2025.1 E release. +- name: Check for old custom_local_settings file + assert: + that: + - "'{{ node_custom_config }}/horizon/{{ inventory_hostname }}/custom_local_settings' is not exists" + - "'{{ node_custom_config }}/horizon/custom_local_settings' is not exists" + fail_msg: >- + Custom horizon configuration must now be provided using + /etc/kolla/config/horizon/_9999-custom-settings.py rather than + /etc/kolla/config/horizon/custom_local_settings.