It has been reported that after upgrading to 3.20, some access policies have not been properly migrated to the roles framework. This leads to some operations failing with errors like “Creation hook ‘add_for_object_creator’ was not registered for this view set.”.
While it is yet to be investigated how this situation can emerge, there is a rather simple workaround.
Note: Pulp will not attempt to update customized access policies at all. If you have some, you need to adjust them manually in any case.
- Use the pulp CLI to find all the access policies not being updated:
pulp access-policy list --limit 1000and search for
add_for_object_creatorin the creation hooks.
- Identify the
viewset_nameof the corresponding policies and reset them to their default:
pulp access-policy reset --viewset-name <VIEWSET_NAME>
- Restart all pulp services.
To reset all access policies in one go, you could use:
pulp access-policy list --limit 1000 | jq -r '..viewset_name' | xargs -n1 pulp access-policy reset --viewset-name
Other relevant data:
Related bugreport: https://github.com/pulp/pulpcore/issues/3080