Services require restart if a policy file is removed

Bug #1970226 reported by Andrew Bonney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
New
Undecided
Unassigned

Bug Description

When all overridden policy statements are removed for a service, the OSA behaviour is to remove the empty YAML policy file from the host. As policy file changes do not require service restarts, this is not currently performed.

Having tested this on an OSA 24.0.0rc1 deployment using 'neutron-server' as an example, if a policy.yaml is removed after previously containing some policy lines, the API begins to produce 500 errors whenever policy is evaluated during an API request.

A workaround for this is to restart the service after making policy changes, but I haven't yet identified:
1) Is this expected behaviour, or something which ought to be better handled in oslo.policy
2) Has this already been fixed in a more recent release of oslo.policy or similar

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

I can totally recall bringing that up one day an IIRC the outcome of discussion with gmann was that oslo.policy needs to be fixed to handle that...

But I fail to recall where conversation was and if any bug report was made back then...

Revision history for this message
Andrew Bonney (andrewbonney) wrote :

I came across https://review.opendev.org/c/openstack/oslo.policy/+/808957 but I wasn't totally sure if that's the same issue. If that is the case then I think upper constraints for Xena would need adjusting to bring in the new version.

Revision history for this message
Andrew Bonney (andrewbonney) wrote :

I've tested v3.11.0 which is the upper constraint for Yoga and contains the fix mentioned above. Unfortunately this does not fix the file removal issue.

One workaround which appears to work for Xena is to leave the file in place, but make it empty when policy is being removed. This avoids the 500 errors from APIs without a process restart.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.