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

Bug #1779170 reported by Bernard Cafarelli
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Bernard Cafarelli

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))

Tags: py34
Changed in neutron:
assignee: nobody → Bernard Cafarelli (bcafarel)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/578886

Revision history for this message
Jakub Libosvar (libosvar) wrote :

I reported this some time ago: https://bugs.launchpad.net/neutron/+bug/1771412 - I supposed I'll mark it as a duplicate

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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 <email address hidden>
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-fwaas (master)

Reviewed: https://review.openstack.org/581602
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=a3be36cd6ef8a00279358e9ad41dc160ece8eab3
Submitter: Zuul
Branch: master

commit a3be36cd6ef8a00279358e9ad41dc160ece8eab3
Author: Van Hung Pham <email address hidden>
Date: Wed Jul 11 14:05:07 2018 +0700

    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.

    Closes-bug: #1779170
    Change-Id: Id1ddc6cdf6b6c094eaac8284193606d765de4295

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-fwaas 13.0.0.0b3

This issue was fixed in the openstack/neutron-fwaas 13.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.0.0b3

This issue was fixed in the openstack/neutron 13.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.