gnocchixyz / gnocchi

Timeseries database
Apache License 2.0
299 stars 85 forks source link

Remove example policy files #1370

Closed kajinamit closed 8 months ago

kajinamit commented 8 months ago

The default policy file has been changed to policy.yaml in 4.5, so we can remove this file assuming it may no longer be used.

Also, the policy.yaml file is empty, thus is ineffective. Let's drop the file and then oslo.policy skips loading the default policy file (and use the rules implemented in code).

tobias-urdin commented 8 months ago

I wonder if this is used by any packging, probably not, and it's also a mess since we including data files in a python module. I'm fine just deleting this on master and hopefully nothing will break, thought?

kajinamit commented 8 months ago

It seems packages in distributions(such as RDO or Canonical) installs policy.json but we can drop it because the file is not loaded by gnocchi by default. We can remove these files from packages when distributions bump gnocchi version they ship. (I'll take care of updates needed in RDO)

I just noticed we may not need even poliy.yaml, because it's just an empty file and oslo.policy skips loading the file in case the file does not exist. I've added another commit to remove the file as well.

kajinamit commented 8 months ago

We merged https://review.rdoproject.org/r/c/openstack/gnocchi-distgit/+/51386 for RDO which stops copying policy files into /etc/gnocchi. Gnocchi still loads the files in /usr/share/python3.9/site-packages/gnocchi but once this change is merged that part will be also skipped.