← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1479159] Re: Fail in TypeError while run neutron with python 3

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

** Changed in: neutron
    Milestone: None => liberty-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1479159

Title:
  Fail in TypeError while run neutron with python 3

Status in neutron:
  Fix Released

Bug description:
  I run neutron with python 3 on my host using devstack[1].
  I got the following error while I run stack.sh.

  This is because Popen.communicate() returns oputput data as bytes type
  in python 3.

  [1] https://review.openstack.org/#/c/181165/

  2015-07-28 06:24:25.710 | + neutron-ovs-cleanup
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 CRITICAL neutron [-] TypeError: expected bytes, bytearray or buffer compatible object
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron Traceback (most recent call last):
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron   File "/usr/local/bin/neutron-ovs-cleanup", line 10, in <module>
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron     sys.exit(main())
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron   File "/opt/stack/new/neutron/neutron/cmd/ovs_cleanup.py", line 89, in main
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron     ovs_bridges = set(ovs.get_bridges())
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron   File "/opt/stack/new/neutron/neutron/agent/common/ovs_lib.py", line 126, in get_bridges
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron     return self.ovsdb.list_br().execute(check_error=True)
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron   File "/opt/stack/new/neutron/neutron/agent/ovsdb/impl_vsctl.py", line 83, in execute
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron     txn.add(self)
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron   File "/opt/stack/new/neutron/neutron/agent/ovsdb/api.py", line 70, in __exit__
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron     self.result = self.commit()
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron   File "/opt/stack/new/neutron/neutron/agent/ovsdb/impl_vsctl.py", line 53, in commit
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron     res = res.replace(r'\\', '\\').splitlines()
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron TypeError: expected bytes, bytearray or buffer compatible object
  2015-07-28 06:24:26.278 | 2015-07-28 06:24:26.276 4722 ERROR neutron 
  2015-07-28 06:24:26.351 | + exit_trap
  2015-07-28 06:24:26.351 | + local r=1
  2015-07-28 06:24:26.351 | ++ jobs -p

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1479159/+subscriptions


References