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 <dmitriy.rabotyagov@cleura.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user