Reviewed: https://review.openstack.org/314742 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=dc7e2b10e88a2b04c18a8907456063eee89f0f71 Submitter: Jenkins Branch: master
commit dc7e2b10e88a2b04c18a8907456063eee89f0f71 Author: Inessa Vasilevskaya <[email protected]> Date: Tue May 10 20:44:42 2016 +0300 unit: fix ValueError on TransactionQueue init with py34 With native ovsdb_interface several py34 tests fail with ValueError during ovs_lib.OVSBridge creation because of unbuffered text I/O in TransactionQueue initialization. This patch fixes the issue by switching to binary mode in os.fdopen Change-Id: I4158cc24f6b28a290a4a4d4bec6c2383c6bf12aa Closes-Bug: #1580270 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1580270 Title: ValueError during TransactionQueue initialization with python3 and native ovsdb_interface Status in neutron: Fix Released Bug description: Steps to reproduce: 1) set ovsdb_interface = 'native' in config 2) run py34 tests (http://logs.openstack.org/55/299655/5/check/gate-neutron-python34/67766bb/testr_results.html.gz) 2 tests in neutron.tests.unit.agent.linux.test_interface.TestOVSInterfaceDriverWithVeth (test_plug_alt_bridge and test_plug_mtu) will fail with the following output: ft66.2: neutron.tests.unit.agent.linux.test_interface.TestOVSInterfaceDriverWithVeth.test_plug_alt_bridge_StringException: Empty attachments: pythonlogging:'' stderr stdout Traceback (most recent call last): File "/home/jenkins/workspace/gate-neutron-python34/neutron/tests/unit/agent/linux/test_interface.py", line 367, in test_plug_alt_bridge self._test_plug(bridge='br-foo') File "/home/jenkins/workspace/gate-neutron-python34/neutron/tests/unit/agent/linux/test_interface.py", line 502, in _test_plug prefix=prefix) File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/linux/interface.py", line 251, in plug bridge, namespace, prefix, mtu) File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/linux/interface.py", line 342, in plug_new internal=internal) File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/linux/interface.py", line 317, in _ovs_add_port ovs = ovs_lib.OVSBridge(bridge) File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/common/ovs_lib.py", line 180, in __init__ super(OVSBridge, self).__init__() File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/common/ovs_lib.py", line 116, in __init__ self.ovsdb = ovsdb.API.get(self) File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/ovsdb/api.py", line 88, in get interface_map[iface_name or cfg.CONF.OVS.ovsdb_interface]) File "/home/jenkins/workspace/gate-neutron-python34/.tox/py34/lib/python3.4/site-packages/oslo_utils/importutils.py", line 30, in import_class __import__(mod_str) File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/ovsdb/impl_idl.py", line 110, in <module> class OvsdbIdl(api.API): File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/ovsdb/impl_idl.py", line 114, in OvsdbIdl 'Open_vSwitch') File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/ovsdb/native/connection.py", line 58, in __init__ self.txns = TransactionQueue(1) File "/home/jenkins/workspace/gate-neutron-python34/neutron/agent/ovsdb/native/connection.py", line 32, in __init__ self.alertin = os.fdopen(alertpipe[0], 'r', 0) File "/home/jenkins/workspace/gate-neutron-python34/.tox/py34/lib/python3.4/site-packages/eventlet/green/os.py", line 28, in fdopen return greenio.GreenPipe(fd, *args, **kw) File "/home/jenkins/workspace/gate-neutron-python34/.tox/py34/lib/python3.4/site-packages/eventlet/greenio/py3.py", line 211, in GreenPipe return _open(name, mode, buffering, encoding, errors, newline, closefd, opener) File "/usr/lib/python3.4/_pyio.py", line 223, in open raise ValueError("can't have unbuffered text I/O") ValueError: can't have unbuffered text I/O To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1580270/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

