Wednesday, 2023-05-03

ozzzo_workI'm running kolla-ansible Train. If I go into my designate-central container and run "oslopolicy-sample-generator --namespace designate" I get a sample config output that shows the default policies12:39
ozzzo_workSo I created a file in under kolla-ansible in etc/kolla/config/designate/policy.yaml that looks like this: https://paste.openstack.org/show/bnfAsJqapRgajT93pexx/12:40
ozzzo_workAfter deploying, my designate containers restart, and I see those contents in the designate-central container, in /etc/designate/policy.yaml12:41
ozzzo_workbut when I run the sample generator, it still outputs the default config. What am I missing?12:42
ozzzo_workI also tried naming it policy.json but that didn't make a difference12:42
johnsomozzo_work Can you check that you told oslo.policy about the file? https://docs.openstack.org/oslo.policy/latest/configuration/index.html#oslo_policy.policy_file14:14
ozzzo_workI can't find Train in github so I'm looking at Wallaby. It looks like it's set here: https://github.com/openstack/kolla-ansible/blob/stable/wallaby/ansible/roles/designate/tasks/config.yml#L1516:06
ozzzo_workWe have node_custom_config: "./etc/kolla/config" so I think it should be seeing etc/kolla/config/designate/policy.yaml16:07
johnsomYou can check that the line is in the designate.conf16:10
ozzzo_workyes, under [oslo_policy] I have "policy_file = policy.yaml"16:12
eanderssonYou can use the tag to get the train version https://github.com/openstack/kolla-ansible/blob/train-eol/ansible/roles/designate/tasks/config.yml16:14
ozzzo_workIf I introduce errors into policy.yaml, for example by removing a comma,, then I get errors in designate-central.log: https://paste.openstack.org/show/bFJ2BSSF3hhdcUjMPQ53/16:17
ozzzo_workbut if there are no errors in policy.yaml then it seems to be ignored16:18
johnsomOk, if you are getting that error, it's picking up the file16:23
ozzzo_workIs "designate" the right namespace to check with the sample generator?16:24
johnsomYeah, so remember "sample generation" just dumps the defaults. You want to use oslopolicy-policy-generator to get the "merged" results16:25
johnsomHere are the docs I wrote up for Octavia: https://docs.openstack.org/octavia/latest/configuration/policy.html#merged-file-generation16:26
ozzzo_workaha that must be it; trying that16:28
ozzzo_workI tried "oslopolicy-policy-generator --namespace designate" but I get: KeyError: 'Namespace "designate" not found.'16:32
ozzzo_workdo I need to give it a --config-file?16:33
johnsomYeah, I think the config file is mandatory 16:33
johnsomHere is an example: https://github.com/openstack/octavia/blob/master/etc/policy/octavia-policy-generator.conf16:33
ozzzo_workI tried this: https://paste.openstack.org/show/bNv8nRSYtPO8DRfxXrvR/ but I still get: KeyError: 'Namespace "designate" not found.'16:39
ozzzo_workIs the designate-central container the right place to run it?16:39
johnsomIt should be fine16:40
ozzzo_workit finds the "designate" namespace when i run the sample generator but not when I run policy generator16:40
johnsomHmm, it should be able to find it: https://github.com/openstack/designate/blob/master/setup.cfg#L4316:42
ozzzo_workI tried a couple of other designate containers and I get the same result; I can find the "designate" namespace with oslopolicy-sample-generator but not with oslopolicy-policy-generator16:50
ozzzo_workDoes the policy generator work differently in Train?16:51
johnsomMaybe? It's been years since I have really messed with the oslo policy generation tools.16:54
ozzzo_workWhere would be a good place to ask more questions about oslo.policy?16:57
johnsomIn #openstack-oslo. I can try this out and debug a bit later today though16:57
ozzzo_workok ty! I'll try over there for now17:01
johnsomozzzo_work Hmmm, so I loaded up devstack with designate installed. The oslopolicy-policy-generator runs just fine (tons of warnings about deprecated policies due to the SRBAC changes).19:17
johnsomYou are back on train, I'm going to see if I can load that up and try it. Maybe I fixed something in the SRBAC work19:17
johnsomYeah, ok, so I get the same result on Train19:22
johnsomozzzo_work https://review.opendev.org/c/openstack/designate/+/87234519:31
johnsomSo that was added to Designate in Antelope19:33
johnsomhttps://bugs.launchpad.net/designate/+bug/200442119:34
ozzzo_workok ty, I'll try cherry-picking this into our lab 19:45

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!