<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 5, 2021 at 11:43 PM Ghanshyam Mann <<a href="mailto:gmann@ghanshyammann.com">gmann@ghanshyammann.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Everyone,<br>
<br>
While implementing the new secure RBAC (scope and new defaults), you might have noticed<br>
the lot of warnings in the log and sometime failing jobs also due to size of logs. Then you had<br>
to disable those via "suppress_default_change_warnings" variable on policy enforcer.<br>
<br>
The oslo policy log the warnings if the default value of policy rule (if not overridden) is changed, so<br>
there are warnings for every policy rule on every API request, everytime policy is initialized which<br>
end up a lot of warnings (thousands) in log. It might be happening in production also.<br>
<br>
Many projects have disabled it via hardcoded "suppress_default_change_warnings". But there is no<br>
way for the operator to disable/enable these warnings (enable in case they would like to check the<br>
new policy RBAC).<br>
<br>
To handle it on oslo policy side and generically for all the projects I am planning to:<br>
<br>
1. Disable it by default in oslo policy side itself. <br>
<br>
2. Make it configurable so that operator can enable it on need basis.<br>
<br>
NOTE: This proposal is about warnings for default value change, not for the policy name change.<br>
<br>
I have submitted this proposal in gerrit too - <a href="https://review.opendev.org/c/openstack/oslo.policy/+/799539" rel="noreferrer" target="_blank">https://review.opendev.org/c/openstack/oslo.policy/+/799539</a><br>
<br>
Please let me know your opinon on this?<br>
<br>
-gmann<br>
<br></blockquote><div><br></div><div>Thanks Ganshyam!</div><div><br></div><div>I left the same comments in the review itself but TL;DR:</div><div><br></div><div>IMO we should have the warnings on by default. If the operator actually happens to read release notes it's an easy switch to flip it off, if not they would get notified of the change in the logs. What's the point of deprecations if we don't tell anyone about them?</div><div>How big of a change would it be to emit the warnings only when the policy engine loads the rules at service start rather than spamming about them on every API request?</div><div><br></div><div>Obviously we should turn them off on gate/tests. Thanks for tackling the spammyness of our logs.</div><div><br></div><div>- jokke<br></div></div></div>