From 24901e456fd0cf140ad20529a47c46563ee5e49c Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 2 Jul 2021 08:11:23 -0700 Subject: [PATCH] Add reno and reset legacy policy deprecation expectation Added a reno to support https://review.opendev.org/c/openstack/ironic/+/799120 and ultimately removed the "anticipated to be removed in the Xena development cycle" warnings on legacy policy support as the effort is taking longer than the cross-team effort anticipated. Notes added to the code highlight that we need to update the warnings at that time to ensure we appropriately set expectations as to when the legacy policies will be removed. Change-Id: Ie23788abaa61742cdea208fb0cf026bdecaab525 --- ironic/common/policy.py | 11 ++++++++++- ...nce-rbac-deprecation-for-now-779898e720a7bf4e.yaml | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/silence-rbac-deprecation-for-now-779898e720a7bf4e.yaml diff --git a/ironic/common/policy.py b/ironic/common/policy.py index 2e493e9af0..6a2dfdc2b9 100644 --- a/ironic/common/policy.py +++ b/ironic/common/policy.py @@ -345,10 +345,16 @@ deprecated_bios_disable_cleaning = policy.DeprecatedRule( name='baremetal:node:disable_cleaning', check_str='rule:baremetal:node:update', ) +# TODO(TheJulia): Since the OpenStack community appears to be +# coalescing around taking a very long term deprecation path, +# and is actually seeking to suppress the warnings being generated +# for the time being, I've changed the warning below to remove +# reference to the Xena cycle. This should be changed once we +# determine when the old policies will be fully removed. deprecated_node_reason = """ The baremetal node API is now aware of system scope and default roles. Capability to fallback to legacy admin project policy configuration -will be removed in the Xena release of Ironic. +will be removed in a future release of Ironic. """ @@ -1803,6 +1809,9 @@ def init_enforcer(policy_file=None, rules=None, # each policy started filling the logs limit for various tool. # Once we move to new defaults only world then we can enable these # warning again. + # TODO(TheJulia): *When* we go to enable warnings to be indicated + # we need to update the notice in the logs to indicate *when* the + # support for older policies will be removed. _ENFORCER.suppress_default_change_warnings = True _ENFORCER.register_defaults(list_policies()) diff --git a/releasenotes/notes/silence-rbac-deprecation-for-now-779898e720a7bf4e.yaml b/releasenotes/notes/silence-rbac-deprecation-for-now-779898e720a7bf4e.yaml new file mode 100644 index 0000000000..bebeddb10b --- /dev/null +++ b/releasenotes/notes/silence-rbac-deprecation-for-now-779898e720a7bf4e.yaml @@ -0,0 +1,10 @@ +--- +other: + - | + Deprecation warnings for the legacy RBAC policies are now suppressed, + as the OpenStack community is coalescing around what appears will be a + longer deprecation cycle and process than would typcially be undertaken + due to the nature and impact of policy changes. The community as a whole + is expecting to make RBAC policy work changes a community goal during the + Y* release development cycle, which means the earliest legacy policy + support may be removed is likely now the Z* development cycle.