yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #67254
[Bug 1715217] Re: nova xenapi unit tests fail with os-xenapi 0.3.0
Reviewed: https://review.openstack.org/500968
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=81b99caae021593ba65f2fe6a2dbc0f9532d1c70
Submitter: Jenkins
Branch: master
commit 81b99caae021593ba65f2fe6a2dbc0f9532d1c70
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Tue Sep 5 16:06:31 2017 -0400
Make xen unit tests work with os-xenapi>=0.3.0
Change Ie1b49a206b57219083059871f326926cc4628142 in os-xenapi
0.3.0 requires that the URL passed into the XenAPISession is
an actual URL, which means we need to fix a bunch of unit tests.
Change-Id: Ida4b8c33e8b3bbd03548648f8e57d923b255f35c
Closes-Bug: #1715217
** 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/1715217
Title:
nova xenapi unit tests fail with os-xenapi 0.3.0
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Global Requirements:
Confirmed
Bug description:
Noticed here: https://review.openstack.org/#/c/500770/
Failures are here: http://logs.openstack.org/70/500770/3/check/gate-
cross-nova-python27-ubuntu-xenial/1305547/testr_results.html.gz
For example:
nova.tests.unit.compute.test_compute_xen.ComputeXenTestCase.test_sync_power_states_instance_not_found_StringException:
pythonlogging:'': {{{2017-09-05 17:33:49,276 INFO [nova.virt.driver]
Loading compute driver 'xenapi.XenAPIDriver'}}}
Traceback (most recent call last):
File "nova/tests/unit/compute/test_compute_xen.py", line 40, in setUp
self.compute = manager.ComputeManager()
File "nova/compute/manager.py", line 541, in __init__
self.driver = driver.load_compute_driver(self.virtapi, compute_driver)
File "nova/virt/driver.py", line 1609, in load_compute_driver
virtapi)
File "/home/jenkins/workspace/gate-cross-nova-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/importutils.py", line 44, in import_object
return import_class(import_str)(*args, **kwargs)
File "nova/virt/xenapi/driver.py", line 90, in __init__
originator="nova")
File "/home/jenkins/workspace/gate-cross-nova-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/os_xenapi/client/session.py", line 90, in __init__
self.ip = self._get_ip_from_url(url)
File "/home/jenkins/workspace/gate-cross-nova-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/os_xenapi/client/session.py", line 137, in _get_ip_from_url
return socket.gethostbyname(url_parts.netloc)
File "/home/jenkins/workspace/gate-cross-nova-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/eventlet/support/greendns.py", line 477, in gethostbyname
rrset = resolve(hostname)
File "/home/jenkins/workspace/gate-cross-nova-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/eventlet/support/greendns.py", line 364, in resolve
raise EAI_NODATA_ERROR
socket.gaierror: [Errno -5] No address associated with hostname
It looks like this is due to this change that went into os-xenapi
0.3.0:
https://review.openstack.org/#/c/485933/
I don't know if this is an issue in os-xenapi (regression) or if nova
needs to now start stubbing out the XenAPISession init code.
It looks like the unit tests within os-xenapi are mocking out the call
to the socket module:
https://github.com/openstack/os-
xenapi/blob/0.3.0/os_xenapi/tests/client/test_session.py#L32
It would be nice if there were a fixture class in the os-xenapi
library that nova's xenapi unit tests could load and that would
perform the proper stubs like this.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1715217/+subscriptions
References