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 :
Changed in manila:
milestone: caracal-1 → caracal-2
Changed in manila:
milestone: caracal-2 → caracal-rc1
Revision history for this message
Saravanan Manickam (msaravan) wrote :
Download full text (28.1 KiB)

Al the 3 tests are failing most of the time with permission error:

1. test_restore_share_with_wrong_id[api,id-87345725-f187-4d7d-86b1-62284e8c75ae,negative] :

ft1.12: manila_tempest_tests.tests.api.test_shares_actions_negative.SharesActionsNegativeTest.test_restore_share_with_wrong_id[api,id-87345725-f187-4d7d-86b1-62284e8c75ae,negative]testtools.testresult.real._StringException: pythonlogging:'': {{{
2024-03-08 08:22:12,996 91591 INFO [tempest.lib.common.rest_client] Request (SharesActionsNegativeTest:test_restore_share_with_wrong_id): 403 POST https://***.***.***.***/share/v2/2807aa1ed1134e818c1137d3ab48d590/shares/wrong_share_id/action 0.027s
2024-03-08 08:22:12,996 91591 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'x-openstack-manila-api-version': '2.81', 'X-Auth-Token': '<omitted>'}
        Body: {"restore": null}
    Response - Headers: {'date': 'Fri, 08 Mar 2024 08:22:12 GMT', 'server': 'Apache/2.4.52 (Ubuntu)', 'x-openstack-manila-api-version': '2.81', 'vary': 'X-OpenStack-Manila-API-Version', 'content-length': '78', 'content-type': 'application/json', 'x-compute-request-id': 'req-3e94a28c-8e21-4b1d-ac08-6f30d26e147d', 'connection': 'close', 'status': '403', 'content-location': 'https://***.***.***.***/share/v2/2807aa1ed1134e818c1137d3ab48d590/shares/wrong_share_id/action'}
        Body: b'{"forbidden": {"code": 403, "message": "Access was denied to this resource."}}'
}}}

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 362, in test_restore_share_with_wrong_id
    self.assertRaises(lib_exc.NotFound,
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/testcase.py", line 469, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/testcase.py", line 480, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/testcase.py", line 532, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/matchers/_exception.py", line 104, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/testcase.py", line 459, in match
    reraise(*matchee)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/compat.py", line 26, in reraise
    raise exc_obj.with_traceback(exc_tb)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/matchers/_exception.py", line 97, in match
    result = matchee()
  File "/opt/stack/tempest/.tox/tempest/lib/python3.10/site-packages/testtools/testcase.py", line 1041, in __call__
    return self._callable_object(*self._args, **self...

Revision history for this message
Saravanan Manickam (msaravan) wrote :

Need to include this bug also, in case if it is continuoulsy failing. Expecting, it'll not, Just adding
it to not to miss the tracking.

test_manage_share_server_1_True

Changed in manila:
milestone: caracal-rc1 → dalmation-1
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.