Reviewed: https://review.openstack.org/355213 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=be729235674b0b476b588547cd94806c59ebf2a8 Submitter: Jenkins Branch: master
commit be729235674b0b476b588547cd94806c59ebf2a8 Author: Matt Riedemann <mrie...@us.ibm.com> Date: Sat Aug 13 17:51:40 2016 -0400 Fix neutron security group tests for 5.1.0 neutronclient python-neutronclient 5.1.0 has a different API call for find_resourceid_by_name_or_id now: 84c42160e9eac654e734a19032237fdf1a8cb058 That breaks the neutron security group driver unit tests which are relying on a mocked out version of the neutronclient which itself is a bad idea but not completely re-written here This blocks getting to use neutronclient 5.1.0 in upper-constraints so this change just fixes the immediate breakage. Also removes test_get_raises_no_unique_match_error which duplicates the coverage from test_associate_duplicate_names for the 409 scenario. Change-Id: Iee340361bc656a0bd3a246e02de41a8f4f89bebf Closes-Bug: #1612494 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1612494 Title: neutronv2 unit tests fail with python-neutronclient 5.1.0 Status in OpenStack Compute (nova): Fix Released Bug description: Caught here: https://review.openstack.org/#/c/353443/ http://logs.openstack.org/43/353443/2/check/gate-cross-nova-python27 -db-ubuntu-xenial/2b8780d/console.html#_2016-08-11_20_43_00_664121 2016-08-11 20:43:00.664195 | nova.tests.unit.api.openstack.compute.test_neutron_security_groups.TestNeutronSecurityGroupsV21.test_disassociate 2016-08-11 20:43:00.664238 | ----------------------------------------------------------------------------------------------------------------- 2016-08-11 20:43:00.664251 | 2016-08-11 20:43:00.664270 | Captured traceback: 2016-08-11 20:43:00.664288 | ~~~~~~~~~~~~~~~~~~~ 2016-08-11 20:43:00.664310 | Traceback (most recent call last): 2016-08-11 20:43:00.664351 | File "nova/tests/unit/api/openstack/compute/test_neutron_security_groups.py", line 333, in test_disassociate 2016-08-11 20:43:00.664380 | self.manager._removeSecurityGroup(req, UUID_SERVER, body) 2016-08-11 20:43:00.664409 | File "nova/api/openstack/extensions.py", line 370, in wrapped 2016-08-11 20:43:00.664438 | raise webob.exc.HTTPInternalServerError(explanation=msg) 2016-08-11 20:43:00.664490 | webob.exc.HTTPInternalServerError: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2016-08-11 20:43:00.664515 | <type 'exceptions.AttributeError'> 2016-08-11 20:43:00.664528 | 2016-08-11 20:43:00.664541 | 2016-08-11 20:43:00.664559 | Captured pythonlogging: 2016-08-11 20:43:00.664578 | ~~~~~~~~~~~~~~~~~~~~~~~ 2016-08-11 20:43:00.664616 | 2016-08-11 20:37:58,280 ERROR [nova.api.openstack.extensions] Unexpected exception in API method 2016-08-11 20:43:00.664638 | Traceback (most recent call last): 2016-08-11 20:43:00.664667 | File "nova/api/openstack/extensions.py", line 338, in wrapped 2016-08-11 20:43:00.664688 | return f(*args, **kwargs) 2016-08-11 20:43:00.664725 | File "nova/api/openstack/compute/security_groups.py", line 424, in _removeSecurityGroup 2016-08-11 20:43:00.664746 | context, id, group_name) 2016-08-11 20:43:00.664778 | File "nova/api/openstack/compute/security_groups.py", line 391, in _invoke 2016-08-11 20:43:00.664815 | method(context, instance, group_name) 2016-08-11 20:43:00.664852 | File "nova/network/security_group/neutron_driver.py", line 491, in remove_from_instance 2016-08-11 20:43:00.664872 | context.project_id) 2016-08-11 20:43:00.664937 | File "/home/jenkins/workspace/gate-cross-nova-python27-db-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 61, in find_resourceid_by_name_or_id 2016-08-11 20:43:00.664960 | parent_id, fields='id')['id'] 2016-08-11 20:43:00.665025 | File "/home/jenkins/workspace/gate-cross-nova-python27-db-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 52, in find_resource_by_name_or_id 2016-08-11 20:43:00.665055 | return client.find_resource(resource, name_or_id, project_id, 2016-08-11 20:43:00.665086 | AttributeError: 'MockClient' object has no attribute 'find_resource' These are the changes in 5.1.0: https://github.com/openstack/python- neutronclient/compare/5.0.0...5.1.0 Looks like this is the breaking change: https://review.openstack.org/#/c/348096/ Probably fails in nova unit tests because we use mox to mock the neutronclient To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1612494/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp