tempest test test_soft_delete_share_has_been_soft_deleted fails

Bug #2035562 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Triaged
Low
Saravanan Manickam

Bug Description

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

Tags: tempest
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote (last edit ):
Vida Haririan (vhariria)
tags: added: tempest
Vida Haririan (vhariria)
Changed in manila:
status: New → Triaged
Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Low
milestone: none → caracal-2
milestone: caracal-2 → caracal-1
Changed in manila:
assignee: nobody → Saravanan Manickam (msaravan)
Revision history for this message
Vida Haririan (vhariria) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.