"target=cannot format data, exception: Expected a Mapping, got <class 'watcher.objects.action_plan.ActionPlan'> instead." errors in api logs during policy check

Bug #1837548 reported by Matt Riedemann on 2019-07-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Undecided
Unassigned

Bug Description

Seen here:

http://logs.openstack.org/98/668598/10/check/watcher-tempest-basic_optim/e10d3f9/controller/logs/screen-watcher-api.txt.gz#_Jul_22_10_31_49_684009

Jul 22 10:31:49.684009 ubuntu-bionic-ovh-bhs1-0009171642 <email address hidden>[1883]: DEBUG oslo_policy.policy [None req-6f194d6a-2186-4f11-b93c-d344f6d0ae0d None None] enforce: rule="action_plan:get" creds={"auth_token": "***", "auth_token_info": {"token": {"audit_ids": ["7vhN5VIdQuK7IRjfrPNo8w"], "auth_token": "***", "catalog": [{"endpoints": [{"id": "58fdf15446e94d99a81df13acd15936d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/image"}], "id": "0788a71230bc4fee9b61c7d8365ebfb9", "name": "glance", "type": "image"}, {"endpoints": [{"id": "517c1bf90e8d454697e945bcc1717cd0", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/volume/v2/c309b2021a5c44adb3b1581b43e4a3ae"}], "id": "0a7dd3ce443a4bb1a6ebed47fc5b2a95", "name": "cinderv2", "type": "volumev2"}, {"endpoints": [{"id": "12b87baccf5141bb80169361cc697430", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/infra-optim"}, {"id": "6973e079d25042cca6ab47d0226c4e95", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/infra-optim"}, {"id": "e10a3d32974b46ffbad6fd9ce11e9dcc", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/infra-optim"}], "id": "10b6f8aa05ba4668a6bc24b7767ae46a", "name": "watcher", "type": "infra-optim"}, {"endpoints": [{"id": "c05a101eaf8c4066aee235a9d48aedbe", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/volume/v3/c309b2021a5c44adb3b1581b43e4a3ae"}], "id": "394d7f28b30b4850a3086bf895620030", "name": "cinderv3", "type": "volumev3"}, {"endpoints": [{"id": "343a245482a74efe9a0d4df48e3cdd54", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95:9696/"}], "id": "4f8f40e6ede84080be465204c15506f4", "name": "neutron", "type": "network"}, {"endpoints": [{"id": "c34fd4258a364c00aa962dd95e0fc21c", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/compute/v2/c309b2021a5c44adb3b1581b43e4a3ae"}], "id": "69c7f8f23fc8467893f2c1bbef50d663", "name": "nova_legacy", "type": "compute_legacy"}, {"endpoints": [{"id": "7b5df71cca494a6a9d80e92d13f52672", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/compute/v2.1"}], "id": "b7e62537798a4c279a7ce1c660d3e41b", "name": "nova", "type": "compute"}, {"endpoints": [{"id": "405964fccd3943e6adb80e90eee0a618", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/volume/v3/c309b2021a5c44adb3b1581b43e4a3ae"}], "id": "d198122637e7439e873678573a11700b", "name": "cinder", "type": "block-storage"}, {"endpoints": [{"id": "bdd43fec091b4f21b6c2e70f7c6016f5", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/placement"}], "id": "d28de79fe5bb475393ce4889a8bd8511", "name": "placement", "type": "placement"}, {"endpoints": [{"id": "9757123230be4bb784c0e79ee3f31634", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/metric"}, {"id": "adeacdc8cbf24e119aef13a7b5778fcb", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/metric"}, {"id": "b0c26959049a408996d7165110667d07", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/metric"}], "id": "f70f6a9f44634fd7aa83b41623758cf7", "name": "gnocchi", "type": "metric"}, {"endpoints": [{"id": "165b15e00a874c84844238cf036ba619", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/identity"}, {"id": "e3dfd0aab2b543d5bb8c853a524569a6", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "http://158.69.69.95/identity"}], "id": "f9aedd3d01d344bbb7197af6c55a999b", "name": "keystone", "type": "identity"}], "expires_at": "2019-07-22T11:31:10.000000Z", "is_domain": false, "issued_at": "2019-07-22T10:31:10.000000Z", "methods": ["password"], "project": {"domain": {"id": "default", "name": "Default"}, "id": "c309b2021a5c44adb3b1581b43e4a3ae", "name": "admin"}, "roles": [{"id": "b9fe7c2524ae44149164ed4ee82d9302", "name": "member"}, {"id": "f06abd8a1362465db91537bb1edf0f28", "name": "admin"}, {"id": "b96c545b26b34523a1ea73e95966266b", "name": "reader"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "99862ef0537744b6bed8d70d326dc923", "name": "admin", "password_expires_at": "***"}, "version": "v3"}}, "domain": "default", "domain_id": "default", "domain_name": "Default", "global_request_id": null, "is_admin": null, "is_admin_project": true, "project": "c309b2021a5c44adb3b1581b43e4a3ae", "project_domain": null, "project_id": "c309b2021a5c44adb3b1581b43e4a3ae", "project_name": null, "read_only": false, "request_id": "req-6f194d6a-2186-4f11-b93c-d344f6d0ae0d", "resource_uuid": null, "roles": ["member", "admin", "reader"], "show_deleted": null, "system_scope": null, "tenant": "c309b2021a5c44adb3b1581b43e4a3ae", "timestamp": "2019-07-22T10:31:49.670286", "user": "99862ef0537744b6bed8d70d326dc923", "user_domain": null, "user_id": "99862ef0537744b6bed8d70d326dc923", "user_identity": "99862ef0537744b6bed8d70d326dc923 c309b2021a5c44adb3b1581b43e4a3ae default - -", "user_name": null} target=cannot format data, exception: Expected a Mapping, got <class 'watcher.objects.action_plan.ActionPlan'> instead. {{(pid=1884) enforce /usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py:902}}

I've seen this before and it generally means the wrong type of object is being passed to the target kwarg in the policy enforce check, in this case an ActionPlan object is being passed when a dict should be passed instead.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers