TypeError: _unshelve_server() takes no arguments

Bug #1741554 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
zhufl

Bug Description

Error seen in a Cinder devstack-plugin-ceph job which is trying to enable shelve tests:

https://review.openstack.org/#/c/474205/

http://logs.openstack.org/05/474205/4/check/legacy-tempest-dsvm-full-devstack-plugin-ceph/dc217c7/logs/tempest.txt.gz?#_2018-01-05_16_50_10_785

2018-01-05 16:50:10.785 7317 CRITICAL tempest [-] Unhandled error: TypeError: _unshelve_server() takes no arguments (1 given)
2018-01-05 16:50:10.785 7317 ERROR tempest Traceback (most recent call last):
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
2018-01-05 16:50:10.785 7317 ERROR tempest "__main__", fname, loader, pkg_name)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
2018-01-05 16:50:10.785 7317 ERROR tempest exec code in run_globals
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/subunit/run.py", line 149, in <module>
2018-01-05 16:50:10.785 7317 ERROR tempest main()
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/subunit/run.py", line 145, in main
2018-01-05 16:50:10.785 7317 ERROR tempest stdout=stdout, exit=False)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line 187, in __init__
2018-01-05 16:50:10.785 7317 ERROR tempest self.runTests()
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line 221, in runTests
2018-01-05 16:50:10.785 7317 ERROR tempest self.result = testRunner.run(self.test)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/subunit/run.py", line 70, in run
2018-01-05 16:50:10.785 7317 ERROR tempest test(result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
2018-01-05 16:50:10.785 7317 ERROR tempest return self.run(*args, **kwds)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
2018-01-05 16:50:10.785 7317 ERROR tempest test(result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/unittest2/suite.py", line 87, in __call__
2018-01-05 16:50:10.785 7317 ERROR tempest return self.run(*args, **kwds)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/unittest2/suite.py", line 126, in run
2018-01-05 16:50:10.785 7317 ERROR tempest test(result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
2018-01-05 16:50:10.785 7317 ERROR tempest return self.run(*args, **kwds)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
2018-01-05 16:50:10.785 7317 ERROR tempest test(result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/unittest2/suite.py", line 87, in __call__
2018-01-05 16:50:10.785 7317 ERROR tempest return self.run(*args, **kwds)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/unittest2/suite.py", line 126, in run
2018-01-05 16:50:10.785 7317 ERROR tempest test(result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/unittest2/suite.py", line 87, in __call__
2018-01-05 16:50:10.785 7317 ERROR tempest return self.run(*args, **kwds)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/unittest2/suite.py", line 126, in run
2018-01-05 16:50:10.785 7317 ERROR tempest test(result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/unittest2/case.py", line 673, in __call__
2018-01-05 16:50:10.785 7317 ERROR tempest return self.run(*args, **kwds)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 671, in run
2018-01-05 16:50:10.785 7317 ERROR tempest return run_test.run(result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/runtest.py", line 80, in run
2018-01-05 16:50:10.785 7317 ERROR tempest return self._run_one(actual_result)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/runtest.py", line 94, in _run_one
2018-01-05 16:50:10.785 7317 ERROR tempest return self._run_prepared_result(ExtendedToOriginalDecorator(result))
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/runtest.py", line 108, in _run_prepared_result
2018-01-05 16:50:10.785 7317 ERROR tempest self._run_core()
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/runtest.py", line 144, in _run_core
2018-01-05 16:50:10.785 7317 ERROR tempest self.case._run_test_method, self.result):
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/runtest.py", line 193, in _run_user
2018-01-05 16:50:10.785 7317 ERROR tempest return self._got_user_exception(sys.exc_info())
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/runtest.py", line 213, in _got_user_exception
2018-01-05 16:50:10.785 7317 ERROR tempest self.case.onException(exc_info, tb_label=tb_label)
2018-01-05 16:50:10.785 7317 ERROR tempest File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 622, in onException
2018-01-05 16:50:10.785 7317 ERROR tempest handler(exc_info)
2018-01-05 16:50:10.785 7317 ERROR tempest TypeError: _unshelve_server() takes no arguments (1 given)
2018-01-05 16:50:10.785 7317 ERROR tempest
2018-01-05 16:50:11.095 7313 INFO tempest.lib.common.rest_client [req-5acaf020-7635-44d6-a7e8-3c2b13343798 ] Request (RoutersTest:test_router_interface_port_update_with_fixed_ip): 201 POST http://10.0.1.134:9696/v2.0/subnets 1.296s
2018-01-05 16:50:11.096 7313 DEBUG tempest.lib.common.rest_client [req-5acaf020-7635-44d6-a7e8-3c2b13343798 ] Request - Headers: {'Content-Type': 'application/json', 'X-Auth-Token': '<omitted>', 'Accept': 'application/json'}
        Body: {"subnet": {"ip_version": 4, "gateway_ip": "10.1.0.1", "network_id": "b8539558-c915-4f04-a3ea-e8a3d1ba723a", "cidr": "10.1.0.0/28"}}
    Response - Headers: {u'content-length': '594', 'content-location': 'http://10.0.1.134:9696/v2.0/subnets', u'content-type': 'application/json', u'connection': 'close', u'date': 'Fri, 05 Jan 2018 16:50:11 GMT', u'x-openstack-request-id': 'req-5acaf020-7635-44d6-a7e8-3c2b13343798', 'status': '201'}
        Body: {"subnet":{"service_types":[],"description":"","enable_dhcp":true,"tags":[],"network_id":"b8539558-c915-4f04-a3ea-e8a3d1ba723a","tenant_id":"d18eaceb5063481787b6441a61db5947","created_at":"2018-01-05T16:50:10Z","dns_nameservers":[],"updated_at":"2018-01-05T16:50:10Z","gateway_ip":"10.1.0.1","ipv6_ra_mode":null,"allocation_pools":[{"start":"10.1.0.2","end":"10.1.0.14"}],"host_routes":[],"revision_number":0,"ip_version":4,"ipv6_address_mode":null,"cidr":"10.1.0.0/28","project_id":"d18eaceb5063481787b6441a61db5947","id":"c9ccfbd3-0628-4985-91c7-3cff0aa8cf51","subnetpool_id":null,"name":""}} _log_request_full tempest/lib/common/rest_client.py:434
2018-01-05 16:50:11.107 7317 ERROR tempest.test [-] tearDownClass does not call the super's tearDownClass in these classes:
set([<class 'tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON'>])

Revision history for this message
Andrea Frittoli (andrea-frittoli) wrote :

It is strange that tearDownClass does not invoke super, since it should looking into the code.
I will check this one and triage it accordingly.

Revision history for this message
Andrea Frittoli (andrea-frittoli) wrote :

The method that is passed to addOnException must accept exc_info, and it doesn't which is the issue.

Changed in tempest:
assignee: nobody → Andrea Frittoli (andrea-frittoli)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/558417

Changed in tempest:
assignee: Andrea Frittoli (andrea-frittoli) → zhufl (zhu-fanglei)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/558417
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=8c9d4367d95bd9595c91402461b132d4b0add1ff
Submitter: Zuul
Branch: master

commit 8c9d4367d95bd9595c91402461b132d4b0add1ff
Author: zhufl <email address hidden>
Date: Tue Apr 3 15:45:50 2018 +0800

    Fix TypeError in _unshelve_server

    addOnException must accept exc_info, otherwise it will raise
    "TypeError: _unshelve_server() takes no arguments (1 given)",
    and because there exists check for server status before doing
    unshelve_server in _unshelve_server, so we can safely use
    addCleanup here, instead of addOnException.

    Change-Id: I29759b4120dddd5e42b2ac431dc5884db4f694b5
    Closes-Bug: #1741554

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 19.0.0

This issue was fixed in the openstack/tempest 19.0.0 release.

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.