Public bug reported: It looks that connection to ovsdb is not mocked in test:
neutron.tests.unit.services.logapi.agent.test_log_extension.LoggingExtensionTestCase.test_handle_port_vm and that cause problem with UT when openvswitch is not installed on host: Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "neutron/tests/unit/services/logapi/agent/test_log_extension.py", line 68, in setUp super(LoggingExtensionTestCase, self).setUp() File "neutron/tests/unit/services/logapi/agent/test_log_extension.py", line 58, in setUp ovs_bridge.OVSAgentBridge('br-int'), File "neutron/plugins/ml2/drivers/openvswitch/agent/openflow/br_cookie.py", line 27, in __init__ super(OVSBridgeCookieMixin, self).__init__(*args, **kwargs) File "neutron/agent/common/ovs_lib.py", line 213, in __init__ super(OVSBridge, self).__init__() File "neutron/agent/common/ovs_lib.py", line 113, in __init__ self.ovsdb = ovsdb_api.from_config(self) File "neutron/agent/ovsdb/api.py", line 40, in from_config return iface.api_factory(context) File "neutron/agent/ovsdb/impl_idl.py", line 47, in api_factory idl=n_connection.idl_factory(), File "neutron/agent/ovsdb/native/connection.py", line 43, in idl_factory helper = do_get_schema_helper() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 214, in wrapped_f return self.call(f, *args, **kw) File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 295, in call start_time=start_time) File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 265, in iter raise RetryError(fut).reraise() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 344, in reraise raise self.last_attempt.result() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/concurrent/futures/_base.py", line 455, in result return self.__get_result() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 298, in call result = fn(*args, **kwargs) File "neutron/agent/ovsdb/native/connection.py", line 41, in do_get_schema_helper return idlutils.get_schema_helper(conn, schema_name) File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/ovsdbapp/backend/ovs_idl/idlutils.py", line 128, in get_schema_helper 'err': os.strerror(err)}) Exception: Could not retrieve schema from tcp:127.0.0.1:6640: Connection refused ** Affects: neutron Importance: Medium Status: Confirmed ** Tags: logging ovs unittest -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1742797 Title: Connection to ovsdb not mocked properly Status in neutron: Confirmed Bug description: It looks that connection to ovsdb is not mocked in test: neutron.tests.unit.services.logapi.agent.test_log_extension.LoggingExtensionTestCase.test_handle_port_vm and that cause problem with UT when openvswitch is not installed on host: Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "neutron/tests/unit/services/logapi/agent/test_log_extension.py", line 68, in setUp super(LoggingExtensionTestCase, self).setUp() File "neutron/tests/unit/services/logapi/agent/test_log_extension.py", line 58, in setUp ovs_bridge.OVSAgentBridge('br-int'), File "neutron/plugins/ml2/drivers/openvswitch/agent/openflow/br_cookie.py", line 27, in __init__ super(OVSBridgeCookieMixin, self).__init__(*args, **kwargs) File "neutron/agent/common/ovs_lib.py", line 213, in __init__ super(OVSBridge, self).__init__() File "neutron/agent/common/ovs_lib.py", line 113, in __init__ self.ovsdb = ovsdb_api.from_config(self) File "neutron/agent/ovsdb/api.py", line 40, in from_config return iface.api_factory(context) File "neutron/agent/ovsdb/impl_idl.py", line 47, in api_factory idl=n_connection.idl_factory(), File "neutron/agent/ovsdb/native/connection.py", line 43, in idl_factory helper = do_get_schema_helper() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 214, in wrapped_f return self.call(f, *args, **kw) File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 295, in call start_time=start_time) File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 265, in iter raise RetryError(fut).reraise() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 344, in reraise raise self.last_attempt.result() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/concurrent/futures/_base.py", line 455, in result return self.__get_result() File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/tenacity/__init__.py", line 298, in call result = fn(*args, **kwargs) File "neutron/agent/ovsdb/native/connection.py", line 41, in do_get_schema_helper return idlutils.get_schema_helper(conn, schema_name) File "/home/ubuntu/neutron/.tox/py27/local/lib/python2.7/site-packages/ovsdbapp/backend/ovs_idl/idlutils.py", line 128, in get_schema_helper 'err': os.strerror(err)}) Exception: Could not retrieve schema from tcp:127.0.0.1:6640: Connection refused To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1742797/+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