Swift client forbids ceilometer user to access swift objects
~~~
2022-08-22 09:20:30.676 14 INFO ceilometer.polling.manager [-] Polling pollster storage.objects.size in the context of some_pollsters
2022-08-22 09:20:30.681 14 INFO swiftclient [-] REQ: curl -i None -I -H "X-Auth-Token: gAAAAABjA0pe6TRM..."
2022-08-22 09:20:30.681 14 INFO swiftclient [-] RESP STATUS: 403 Forbidden
2022-08-22 09:20:30.681 14 INFO swiftclient [-] RESP HEADERS: {'content-type': 'text/html; charset=UTF-8', 'content-length': '0', 'x-trans-id': 'txd21a836454fd4370afb50-0063034a5e', 'x-openstack-request-id': 'txd21a836454fd4370afb50-0063034a5e', 'date': 'Mon, 22 Aug 2022 09:20:30 GMT'}
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager [-] Continue after error from storage.objects.size: Account HEAD failed: http://10.0.78.28:8080/v1/AUTH_e0cb95b1bd6e45c68dc237b61ac741f5 403 Forbidden (txn: txd21a836454fd4370afb50-0063034a5e): swiftclient.exceptions.ClientException: Account HEAD failed: http://10.0.78.28:8080/v1/AUTH_e0cb95b1bd6e45c68dc237b61ac741f5 403 Forbidden (txn: txd21a836454fd4370afb50-0063034a5e)
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager Traceback (most recent call last):
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager File "/usr/lib/python3.9/site-packages/ceilometer/polling/manager.py", line 194, in poll_and_notify
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager for sample in samples:
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager File "/usr/lib/python3.9/site-packages/ceilometer/objectstore/swift.py", line 132, in get_samples
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager for tenant, account in self._iter_accounts(manager.keystone,
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager File "/usr/lib/python3.9/site-packages/ceilometer/objectstore/swift.py", line 77, in _iter_accounts
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager cache[self.CACHE_KEY_METHOD] = list(self._get_account_info(
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager File "/usr/lib/python3.9/site-packages/ceilometer/objectstore/swift.py", line 101, in _get_account_info
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager raise e
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager File "/usr/lib/python3.9/site-packages/ceilometer/objectstore/swift.py", line 93, in _get_account_info
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager yield (t.id, swift_api_method(
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager File "/usr/lib/python3.9/site-packages/swiftclient/client.py", line 878, in head_account
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager raise ClientException.from_response(resp, 'Account HEAD failed', body)
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager swiftclient.exceptions.ClientException: Account HEAD failed: http://10.0.78.28:8080/v1/AUTH_e0cb95b1bd6e45c68dc237b61ac741f5 403 Forbidden (txn: txd21a836454fd4370afb50-0063034a5e)
2022-08-22 09:20:30.682 14 ERROR ceilometer.polling.manager
~~~
Assigning "ResellerAdmin" role to ceilometer user fixes it
~~~
openstack role add --user ceilometer --project service ResellerAdmin
~~~
The issue is not related to the core ceilometer but the deployment tooling which does not assign the required roles, so I've moved this to tripleo.