Files
placement/releasenotes/notes/deprecate-placement-policy-file-1777dc2e92d8363c.yaml
Matt Riedemann 9ece3d35ab Deprecate [placement]/policy_file config option
The [placement]/policy_file option was necessary when placement
was in nova since nova uses the standard [oslo_policy]/policy_file
option for defining custom policy rules. Now that placement is
extracted (+1 release) we can deprecate the placement-specific
option and use the standard [oslo_policy]/policy_file option as well.

The tricky thing with this is both options define a default value
but those values are different, and neither need to exist or can
exist but be empty and we'll use policy defaults from code. So some
logic is necessary for detecting which option we should pass to the
oslo.policy Enforcer object. We prefer to use [oslo_policy]/policy_file
if it exists but will fallback to use [placement]/policy_file for
backward compatibility. We also check for a couple of edge cases to
try and detect misconfiguration and usage of the deprecated option.

The config generation docs are updated to include the [oslo_policy]
options as well as registering the options from that library for
runtime code.

Change-Id: Ifb14d2c14b17fc5bcdf7d124744ac2e1b58fd063
Story: #2005171
Task: #29913
2019-09-12 18:18:49 -04:00

12 lines
537 B
YAML

---
deprecations:
- |
The ``[placement]/policy_file`` configuration option is deprecated and its
usage is being replaced with the more standard
``[oslo_policy]/policy_file`` option. If you do not override policy with
custom rules you will have nothing to do. If you do override the placement
default policy then you will need to update your configuration to use the
``[oslo_policy]/policy_file`` option. By default, the
``[oslo_policy]/policy_file`` option will be used if the file it points at
exists.