This bug records a test failure that's sporadically occurring in the container driver job:
The tempest test:
manila_tempest_tests.tests.api.test_shares_actions_negative.SharesActionsNegativeTest.
test_soft_delete_share_has_been_soft_deleted[api_with_backend,id-36cbe23b-08d2-49d9-bb42-f9eb2a804cb1,negative]
fails with:
Traceback (most recent call last):
File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/manila_tempest_tests/tests/api/test_shares_actions_negative.py", line 307, in test_soft_delete_share_has_been_soft_deleted
self.shares_v2_client.soft_delete_share(share['id'])
File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/manila_tempest_tests/services/share/v2/json/shares_client.py", line 362, in soft_delete_share
resp, body = self.post(
File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/manila_tempest_tests/services/share/v2/json/shares_client.py", line 68, in post
resp, body = super(SharesV2Client, self).post(url, body,
File "/opt/stack/tempest/tempest/lib/common/rest_client.py", line 300, in post
return self.request('POST', url, extra_headers, headers, body, chunked)
File "/opt/stack/tempest/tempest/lib/common/rest_client.py", line 742, in request
self._error_checker(resp, resp_body)
File "/opt/stack/tempest/tempest/lib/common/rest_client.py", line 847, in _error_checker
raise exceptions.Forbidden(resp_body, resp=resp)
tempest.lib.exceptions.Forbidden: Forbidden
Details: {'code': 403, 'message': "Policy doesn't allow share:soft_delete to be performed."}
---
the test in question creates the share with "shares_v2_client" and attempts to perform "soft-delete" with seemingly the same client: https://github.com/openstack/manila-tempest-plugin/blob/d6a4d27f49cc1d94df5ff5f4b240c1b0143f5328/manila_tempest_tests/tests/api/test_shares_actions_negative.py#L302-L307 but receives a "HTTP 403/Forbidden" response.
In the manila-api service, here's the failure:
Sep 13 22:37:15.350031 np0035244306 <email address hidden>[79815]: INFO manila.api.openstack.wsgi [None req-ceb646b4-2a36-43ef-97f7-668f71d5b106 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] POST https://10.209.129.77/share/v2/7b25c1fbcc474492ba6a7205102312ba/shares/c20a0c4b-b7ac-43d5-a035-a45790d587ca/action
Sep 13 22:37:15.350629 np0035244306 <email address hidden>[79815]: DEBUG manila.api.openstack.wsgi [None req-ceb646b4-2a36-43ef-97f7-668f71d5b106 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] Action body: b'{"soft_delete": null}' {{(pid=79815) get_method /opt/stack/manila/manila/api/openstack/wsgi.py:912}}
Sep 13 22:37:15.350935 np0035244306 <email address hidden>[79815]: DEBUG manila.api.openstack.wsgi [None req-ceb646b4-2a36-43ef-97f7-668f71d5b106 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] Action: 'action', calling method: ShareController.share_soft_delete, body: {"soft_delete": null} {{(pid=79815) _process_stack /opt/stack/manila/manila/api/openstack/wsgi.py:796}}
Sep 13 22:37:15.351406 np0035244306 <email address hidden>[79815]: DEBUG manila.api.v2.shares [None req-ceb646b4-2a36-43ef-97f7-668f71d5b106 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] Soft delete share with id: c20a0c4b-b7ac-43d5-a035-a45790d587ca {{(pid=79815) share_soft_delete /opt/stack/manila/manila/api/v2/shares.py:273}}
Sep 13 22:37:15.374811 np0035244306 <email address hidden>[79815]: DEBUG manila.policy [None req-ceb646b4-2a36-43ef-97f7-668f71d5b106 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] Policy check for share:soft_delete failed with credentials {'is_admin': False, 'user_id': 'f3253d33ef4347269f209c8a917b53af', 'user_domain_id': 'default', 'system_scope': None, 'domain_id': None, 'project_id': '7b25c1fbcc474492ba6a7205102312ba', 'project_domain_id': 'default', 'roles': ['reader'], 'is_admin_project': True, 'service_user_id': None, 'service_user_domain_id': None, 'service_project_id': None, 'service_project_domain_id': None, 'service_roles': []} {{(pid=79815) authorize /opt/stack/manila/manila/policy.py:208}}
Sep 13 22:37:15.375298 np0035244306 <email address hidden>[79815]: INFO manila.api.openstack.wsgi [None req-ceb646b4-2a36-43ef-97f7-668f71d5b106 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] https://10.209.129.77/share/v2/7b25c1fbcc474492ba6a7205102312ba/shares/c20a0c4b-b7ac-43d5-a035-a45790d587ca/action returned with HTTP 403
Log from the share creation request:
Sep 13 22:37:06.166428 np0035244306 <email address hidden>[79816]: INFO manila.api.openstack.wsgi [None req-1c491903-e4a5-4eec-a3e9-7b6d23e89165 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] GET https://10.209.129.77/share/v2/7b25c1fbcc474492ba6a7205102312ba/shares/c20a0c4b-b7ac-43d5-a035-a45790d587ca
Sep 13 22:37:06.166843 np0035244306 <email address hidden>[79816]: DEBUG manila.api.openstack.wsgi [None req-1c491903-e4a5-4eec-a3e9-7b6d23e89165 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] Empty body provided in request {{(pid=79816) get_body /opt/stack/manila/manila/api/openstack/wsgi.py:652}}
Sep 13 22:37:06.167390 np0035244306 <email address hidden>[79816]: DEBUG manila.api.openstack.wsgi [None req-1c491903-e4a5-4eec-a3e9-7b6d23e89165 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] Calling method 'ShareMixin.show' {{(pid=79816) _process_stack /opt/stack/manila/manila/api/openstack/wsgi.py:798}}
Sep 13 22:37:06.193392 np0035244306 <email address hidden>[79816]: INFO manila.api.openstack.wsgi [None req-1c491903-e4a5-4eec-a3e9-7b6d23e89165 tempest-test_creds-1192596402 tempest-test_creds-1192596402-project-reader] https://10.209.129.77/share/v2/7b25c1fbcc474492ba6a7205102312ba/shares/c20a0c4b-b7ac-43d5-a035-a45790d587ca returned with HTTP 200
Tha failure has also been observed in the NetApp CI: https:/ /netappopenstac klogserver. s3.us-west- 1.amazonaws. com/index. html#logs/ 68/894168/ 4/upstream- check/manila- tempest- plugin- ontap-dhss/ 5eff904/ controller/ logs/