← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1779170] Re: neutron.tests.functional.agent.linux.test_netlink_lib.NetlinkLibTestCase.test_delete_* fail with python 3

 

Reviewed:  https://review.openstack.org/578886
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=144d3abf7c8472753f7cb8156f07ee9f82ca2d3a
Submitter: Zuul
Branch:    master

commit 144d3abf7c8472753f7cb8156f07ee9f82ca2d3a
Author: Bernard Cafarelli <bcafarel@xxxxxxxxxx>
Date:   Thu Jun 28 18:43:04 2018 +0200

    python3: fix netlink_lib delete_entries
    
    libc and netfilter_conntrack calls, as C bindings, do not work with
    python3 strings
    This fixes netlink_lib by using bytes type for addresses manipulation
    
    Update corresponding unit test by removing str() conversions
    
    Change-Id: I0044d943de3dcde7c4337f396ae9d10cede381f3
    Closes-bug: #1779170


** 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/1779170

Title:
  neutron.tests.functional.agent.linux.test_netlink_lib.NetlinkLibTestCase.test_delete_*
  fail with python 3

Status in neutron:
  Fix Released

Bug description:
  Sample run: http://logs.openstack.org/83/577383/1/experimental
  /neutron-functional-python35/e2cbc92/logs/testr_results.html.gz

  ft1.2: neutron.tests.functional.agent.linux.test_netlink_lib.NetlinkLibTestCase.test_delete_tcp_entry_StringException: pythonlogging:'': {{{
  DEBUG [stevedore.extension] found extension EntryPoint.parse('kafka = oslo_messaging._drivers.impl_kafka:KafkaDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('zmq = oslo_messaging._drivers.impl_zmq:ZmqDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('fake = oslo_messaging._drivers.impl_fake:FakeDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('kombu = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('rabbit = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('amqp = oslo_messaging._drivers.impl_amqp1:ProtonDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('kafka = oslo_messaging._drivers.impl_kafka:KafkaDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('zmq = oslo_messaging._drivers.impl_zmq:ZmqDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('fake = oslo_messaging._drivers.impl_fake:FakeDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('kombu = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('rabbit = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('amqp = oslo_messaging._drivers.impl_amqp1:ProtonDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('kafka = oslo_messaging._drivers.impl_kafka:KafkaDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('zmq = oslo_messaging._drivers.impl_zmq:ZmqDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('fake = oslo_messaging._drivers.impl_fake:FakeDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('kombu = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('rabbit = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('amqp = oslo_messaging._drivers.impl_amqp1:ProtonDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('kafka = oslo_messaging._drivers.impl_kafka:KafkaDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('zmq = oslo_messaging._drivers.impl_zmq:ZmqDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('fake = oslo_messaging._drivers.impl_fake:FakeDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('kombu = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('rabbit = oslo_messaging._drivers.impl_rabbit:RabbitDriver')
     DEBUG [stevedore.extension] found extension EntryPoint.parse('amqp = oslo_messaging._drivers.impl_amqp1:ProtonDriver')
     DEBUG [oslo_policy._cache_handler] Reloading cached file /opt/stack/new/neutron/neutron/tests/etc/policy.json
     DEBUG [oslo_policy.policy] Reloaded policy file: /opt/stack/new/neutron/neutron/tests/etc/policy.json
  }}}

  Traceback (most recent call last):
    File "/opt/stack/new/neutron/neutron/tests/base.py", line 140, in func
      return f(self, *args, **kwargs)
    File "/opt/stack/new/neutron/neutron/tests/functional/agent/linux/test_netlink_lib.py", line 106, in test_delete_tcp_entry
      self._delete_entry(tcp_entry, remain_entries, _zone)
    File "/opt/stack/new/neutron/neutron/tests/functional/agent/linux/test_netlink_lib.py", line 58, in _delete_entry
      self.assertEqual(remain_entries, entries_list)
    File "/opt/stack/new/neutron/.tox/dsvm-functional-python35/lib/python3.5/site-packages/testtools/testcase.py", line 411, in assertEqual
      self.assertThat(observed, matcher, message)
    File "/opt/stack/new/neutron/.tox/dsvm-functional-python35/lib/python3.5/site-packages/testtools/testcase.py", line 498, in assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: !=:
  reference = ((4, 'icmp', 8, 0, '1.1.1.1', '2.2.2.2', 3333, 51),
   (4, 'udp', 4, 5, '1.1.1.1', '2.2.2.2', 51))
  actual    = ((4, 'icmp', 8, 0, '1.1.1.1', '2.2.2.2', 3333, 51),
   (4, 'tcp', 1, 2, '1.1.1.1', '2.2.2.2', 51),
   (4, 'udp', 4, 5, '1.1.1.1', '2.2.2.2', 51))

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


References