From 7a9dd4bd04ec065fafd8eee6848e5e92eb4737b3 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 14 Nov 2025 11:56:57 +0100 Subject: [PATCH] Do not remove policy.yaml file oslo.policy can not handle policy file removal. As a result, if policy overrides were defined at some point, but then removed, causes service outage. While we could add a handler trigger to restart the service on policy removal, it's better to simplify the logic and always place an empty policy.yaml even if no overrides are defined. Change-Id: I2369cc870a6e60a702a54bb3fc6862fa07efb7ac Signed-off-by: Dmitriy Rabotyagov --- tasks/masakari_post_install.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tasks/masakari_post_install.yml b/tasks/masakari_post_install.yml index b9030b9..e304163 100644 --- a/tasks/masakari_post_install.yml +++ b/tasks/masakari_post_install.yml @@ -56,17 +56,6 @@ mode: "0640" config_type: yaml when: - - masakari_policy_overrides | length > 0 - - masakari_services['masakari-api']['group'] in group_names or masakari_services['masakari-engine']['group'] in group_names - tags: - - masakari-policy-override - -- name: Remove legacy policy.yaml file - ansible.builtin.file: - path: "{{ masakari_etc_dir }}/policy.yaml" - state: absent - when: - - masakari_policy_overrides | length == 0 - masakari_services['masakari-api']['group'] in group_names or masakari_services['masakari-engine']['group'] in group_names tags: - masakari-policy-override