yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #67217
[Bug 1715217] [NEW] nova xenapi unit tests fail with os-xenapi 0.3.0
Public bug reported:
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.
** Affects: nova
Importance: Undecided
Status: Confirmed
** Affects: openstack-requirements
Importance: Undecided
Status: Confirmed
** Tags: testing xenserver
** Changed in: nova
Status: New => Confirmed
** Tags added: test xenserver
--
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):
Confirmed
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
Follow ups