Bug 1573786 - tearDownClass manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest Failed
Summary: tearDownClass manila_tempest_tests.tests.api.test_share_networks_negative.Sha...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-manila
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Tom Barron
QA Contact: Jason Grosso
mmurray
URL:
Whiteboard:
Depends On:
Blocks: 1335596 1356451
TreeView+ depends on / blocked
 
Reported: 2018-05-02 09:33 UTC by Zhimou Peng
Modified: 2022-08-09 10:52 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-21 16:19:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
tempest log (5.30 MB, text/plain)
2018-05-02 09:33 UTC, Zhimou Peng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1762900 0 None None None 2018-05-03 15:27:28 UTC
Red Hat Issue Tracker OSP-8985 0 None None None 2022-08-09 10:52:38 UTC

Description Zhimou Peng 2018-05-02 09:33:11 UTC
Created attachment 1429805 [details]
tempest log

Description of problem:
OS:RHOSP10

Tempest:
[root@osp10unityctl0 log]# rpm -qa|grep tempest
python-sahara-tests-tempest-0.4.1-1.el7ost.noarch
puppet-tempest-9.5.0-3.el7ost.noarch
python-tempest-13.0.0-16.bafe630git.el7ost.noarch
python-tempest-tests-13.0.0-16.bafe630git.el7ost.noarch
openstack-tempest-13.0.0-16.bafe630git.el7ost.noarch

Manila:
[root@osp10unityctl0 log]# rpm -qa|grep manila
openstack-manila-ui-2.5.1-10.el7ost.noarch
openstack-manila-share-3.0.0-11.el7ost.noarch
python-manilaclient-1.11.0-1.el7ost.noarch
python-manila-3.0.0-11.el7ost.noarch
openstack-manila-3.0.0-11.el7ost.noarch
python-manila-tests-3.0.0-11.el7ost.noarch
puppet-manila-9.5.0-3.el7ost.noarch

cases:
[root@osp10unityctl0 test]# cat cases
manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest

[root@osp10unityctl0 test]# tempest run --whitelist-file cases
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
${PYTHON:-python} -m subunit.run discover -t /usr/lib/python2.7/site-packages/tempest /usr/lib/python2.7/site-packages/tempest/test_discover --list
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
${PYTHON:-python} -m subunit.run discover -t /usr/lib/python2.7/site-packages/tempest /usr/lib/python2.7/site-packages/tempest/test_discover --load-list /tmp/tmpttL6rp
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_delete_share_network_with_existing_shares [406.621599s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_delete_share_network_with_wrong_type [0.036365s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_delete_share_network_without_id [0.006177s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_get_deleted_share_network [0.230780s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_get_share_network_with_wrong_id [0.035742s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_get_share_network_without_id [0.006946s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_list_share_networks_all_tenants [0.009817s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_list_share_networks_project_id [0.009481s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_list_share_networks_wrong_created_before_value [0.031036s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_list_share_networks_wrong_created_since_value [0.032978s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_update_invalid_keys_sh_server_exists [116.259089s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_update_nonexistant_share_network [0.038059s] ... ok
{0} manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest.test_try_update_share_network_with_empty_id [0.006377s] ... ok
{0} tearDownClass (manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest) [0.000000s] ... FAILED

==============================
Failed 1 tests - output below:
==============================

tearDownClass (manila_tempest_tests.tests.api.test_share_networks_negative.ShareNetworksNegativeTest)
-----------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/tempest/test.py", line 286, in tearDownClass
        six.reraise(etype, value, trace)
      File "/usr/lib/python2.7/site-packages/tempest/test.py", line 269, in tearDownClass
        teardown()
      File "/usr/lib/python2.7/site-packages/tempest/test.py", line 521, in clear_credentials
        cls._creds_provider.clear_creds()
      File "/usr/lib/python2.7/site-packages/tempest/common/dynamic_creds.py", line 409, in clear_creds
        self._cleanup_default_secgroup(creds.tenant_id)
      File "/usr/lib/python2.7/site-packages/tempest/common/dynamic_creds.py", line 356, in _cleanup_default_secgroup
        nsg_client.delete_security_group(secgroup['id'])
      File "/usr/lib/python2.7/site-packages/tempest/lib/services/network/security_groups_client.py", line 58, in delete_security_group
        return self.delete_resource(uri)
      File "/usr/lib/python2.7/site-packages/tempest/lib/services/network/base.py", line 41, in delete_resource
        resp, body = self.delete(req_uri)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 307, in delete
        return self.request('DELETE', url, extra_headers, headers, body)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 664, in request
        self._error_checker(resp, resp_body)
      File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 776, in _error_checker
        raise exceptions.Conflict(resp_body, resp=resp)
    tempest.lib.exceptions.Conflict: An object with that identifier already exists
    Details: {u'message': u'Security Group 22da942e-90e7-4ad5-aab2-34b269bf2b8a in use.', u'type': u'SecurityGroupInUse', u'detail': u''}

the Security Group 22da942e-90e7-4ad5-aab2-34b269bf2b8a in use.
But I can delete the port which using the Security Group, then delete Security Group.
So my guess is the teardown part is not handle this correctly.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 wes hayutin 2018-06-07 15:31:38 UTC
Removing RDODFG --> move to manilla

Comment 5 Goutham Pacha Ravi 2018-06-15 19:43:30 UTC
Reiterating comments on the public Launchpad bug (https://bugs.launchpad.net/bugs/1762900): 

We have been able to reproduce this error on master, by using the test options that the reporter has used, specifically, tempest.auth.use_dynamic_credentials=True. However, there's a workaround that seems to be employed by most drivers that allow creating and managing share servers (driver_handles_share_servers=True) in their 3rd party CI jobs on openstack/manila. The workaround is to use pre-provisioned credentials to run tempest tests [1]


[1] https://docs.openstack.org/tempest/latest/configuration.html#pre-provisioned-credentials

I used the following steps to achieve this, in the undercloud:

$ sudo yum install -y openstack-tempest python2-manila-tests-tempest python2-tempestconf
$ source ~/overcloudrc
$ tempest init testing_dir
$ cd testing_dir
$ discover-tempest-config --deployer-input ~/tempest-deployer-input.conf \
--debug --create identity.uri $OS_AUTH_URL identity.admin_password \
$OS_PASSWORD
$ tempest account-generator etc/accounts.yaml -r 8 -c etc/tempest.conf
$ tempest run --regex manila_tempest_tests.tests.api


Does this approach solve your problem?

Comment 7 Rajini Karthik 2018-11-30 15:43:44 UTC
The workaround provide by Goutham Pacha Ravi works.
So we are not dependent on the bug for now.

Comment 8 Rajini Karthik 2019-02-21 16:19:11 UTC
This bug can be closed


Note You need to log in before you can comment on or make changes to this bug.