Deprecated rule logic does not work if the rule was deleted in policy directory.

Bug #1977549 reported by Mitya Eremeev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.policy
Fix Released
Undecided
Mitya Eremeev

Bug Description

The main policy file does not exist.
The policy directory is not empty.

1. define deprecated rule in policy directory
2. start a service
3. enforce policy
4. remove deprecated rule in policy directory
5. enforce policy

Actual result:
new default is applied to deprecated rule.

Expected result:
old and new defaults are applied to deprecated rule (OR logic)

Mitya Eremeev (mitos)
Changed in oslo.policy:
assignee: nobody → Mitya Eremeev (mitos)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.policy (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.policy (master)

Reviewed: https://review.opendev.org/c/openstack/oslo.policy/+/844611
Committed: https://opendev.org/openstack/oslo.policy/commit/d80573c61254a2f8f371746bc678bd3b60f8a6a4
Submitter: "Zuul (22348)"
Branch: master

commit d80573c61254a2f8f371746bc678bd3b60f8a6a4
Author: Mitya_Eremeev <email address hidden>
Date: Mon Jun 6 13:17:51 2022 +0300

    Fix deprecated rule logic if the rule was deleted in policy directory.

    The bug scenario:
    - define deprecated rule in policy folder
    - start a service
    - enforce policies
    - remove the rule in policy folder
    - enforce policies

    New default is applied to the rule,
    but new and old defaults should be applied
    (OR logic)
    The patch fixes it.

    Closes-Bug: 1977549
    Change-Id: If11fe2da1163d6d3f16d133aeb207a055cf30de4

Changed in oslo.policy:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.policy 4.2.0

This issue was fixed in the openstack/oslo.policy 4.2.0 release.

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.