Bug 1869958

Summary: Test "test_default_share_group_type_applied" is failed with code 404
Product: Red Hat OpenStack Reporter: lkuchlan <lkuchlan>
Component: python-manila-tests-tempestAssignee: lkuchlan <lkuchlan>
Status: CLOSED ERRATA QA Contact: vhariria
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: gfidente, gouthamr, lmarsh, vhariria, vimartin
Target Milestone: AlphaKeywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-manila-tests-tempest-1.2.0-2.20210121124924.9ff6b34.el8ost.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-15 07:09:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lkuchlan 2020-08-19 06:23:51 UTC
Description of problem:
Test "test_default_share_group_type_applied" is failed with code 404 that because 
there is a wrong skip condition. The test runs when "default_share_type_name" 
configuration option is defined but that does not mean that group share type also 
exists.
So in case there is a default share type but not a group share type the api call 
for default share group types fails because resource could not be found.

Version-Release number of selected component (if applicable):
puppet-manila-15.4.1-0.20200403160104.e41b1b6.el8ost.noarch
python3-manilaclient-1.29.0-0.20200310223441.1b2cafb.el8ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP16.1.1
2. Run "test_default_share_group_type_applied" test

Actual results:
Test fails with code 404 because default group type is not found

Expected results:
We should skip the test in case there is not a default group type

Traceback (most recent call last):
  File "/home/stack/tempest-auto/.venv/lib/python3.6/site-packages/ddt.py", line 182, in wrapper
    return func(self, *args, **kwargs)
  File "/home/stack/tempest-auto/manila-tempest-plugin/manila_tempest_tests/tests/api/admin/test_share_groups.py", line 141, in test_default_share_group_type_applied
    version=version
  File "/home/stack/tempest-auto/manila-tempest-plugin/manila_tempest_tests/services/share/v2/json/shares_client.py", line 1254, in get_default_share_group_type
    extra_headers=extra_headers, version=version)
  File "/home/stack/tempest-auto/manila-tempest-plugin/manila_tempest_tests/services/share/v2/json/shares_client.py", line 78, in get
    resp, body = super(SharesV2Client, self).get(url, headers=headers)
  File "/home/stack/tempest-auto/tempest/tempest/lib/common/rest_client.py", line 313, in get
    return self.request('GET', url, extra_headers, headers)
  File "/home/stack/tempest-auto/tempest/tempest/lib/common/rest_client.py", line 702, in request
    self._error_checker(resp, resp_body)
  File "/home/stack/tempest-auto/tempest/tempest/lib/common/rest_client.py", line 808, in _error_checker
    raise exceptions.NotFound(resp_body, resp=resp)
tempest.lib.exceptions.NotFound: Object not found
Details: {'code': 404, 'message': 'Default share group type not found.'}

Comment 1 lkuchlan 2020-08-19 06:51:00 UTC
Proposed fix https://review.opendev.org/#/c/746839/

Comment 7 lkuchlan 2021-06-16 14:02:47 UTC
Verified using:
python3-manila-tests-tempest-1.4.0-2.20210527221752.f083c71.el8ost.1.noarch

Comment 9 errata-xmlrpc 2021-09-15 07:09:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483