netlink test_list_entries failing with mismatch

Bug #1708030 reported by Kevin Benton on 2017-08-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
High
Cuong Nguyen

Bug Description

Spotted in check job that has no relationship to netlink.

Traceback (most recent call last):
  File "neutron/tests/base.py", line 118, in func
    return f(self, *args, **kwargs)
  File "neutron/tests/functional/agent/linux/test_netlink_lib.py", line 69, in test_list_entries
    self.assertEqual(expected, entries_list)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/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, 10),
 (4, 'tcp', 1, 2, '1.1.1.1', '2.2.2.2', 10),
 (4, 'udp', 4, 5, '1.1.1.1', '2.2.2.2', 10))
actual = ((4, 'icmp', 8, 0, '1.1.1.1', '2.2.2.2', 3333, 10),
 (4, 'tcp', 1, 2, '1.1.1.1', '2.2.2.2', 10),
 (4, 'udp', 4, 5, '1.1.1.1', '2.2.2.2', 10),
 (4, 'tcp', 40364, 12345, '192.168.0.1', '192.168.0.2', 10),
 (4, 'tcp', 59330, 12346, '192.168.0.1', '192.168.0.2', 10))

http://logs.openstack.org/29/489429/2/check/gate-neutron-dsvm-functional-ubuntu-xenial/3f2b494/testr_results.html.gz

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
tags: added: gate-failure
Changed in neutron:
assignee: nobody → Cuong Nguyen (cuongnv)
Cuong Nguyen (cuongnv) wrote :

The possible problem here is zone_id created by netlink-lib during functional tests duplicated with zone_id created by something else. In this test case, netlink-lib lists all conntrack entries in OS with zone_id is '10', but some other entries with zone '10' already existed hence the test didn't work properly.

Problem is in the test case, netlink-lib doesn't create these two conntrack entries
(4, 'tcp', 40364, 12345, '192.168.0.1', '192.168.0.2', 10), (4, 'tcp', 59330, 12346, '192.168.0.1', '192.168.0.2', 10) so I'm in doubt that these conntrack entries somehow already existed before tests running.

Cao Xuan Hoang (hoangcx) wrote :

I think the solution to isolate: We need to make sure there is no conntrack entry in a zone_id before executing the test case.

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

Changed in neutron:
status: Confirmed → In Progress
tags: added: functional-tests
Changed in neutron:
milestone: none → pike-rc1

Reviewed: https://review.openstack.org/489831
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b19fb20336b5aa2bc2bb2471574a490a9a37c1f8
Submitter: Jenkins
Branch: master

commit b19fb20336b5aa2bc2bb2471574a490a9a37c1f8
Author: Cuong Nguyen <email address hidden>
Date: Wed Aug 2 09:31:33 2017 +0700

    Fixes input for netlink-lib functional tests

    Netlink-lib creates some conntrack entries to verify list_entries()
    method. Each entry contains a zone_id, which might be duplicated with
    some already existed entries in OS.

    This patch proposes a simple verification to make sure entries created by
    netlink-lib do not contain existed zone_id.

    Change-Id: I4bce5041f82782cf9e51d99c605593afb2cf4fc8
    Closes-Bug: #1708030

Changed in neutron:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/496347
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=64351d1856e67e5dd613246faf96afacf47e3eca
Submitter: Jenkins
Branch: stable/pike

commit 64351d1856e67e5dd613246faf96afacf47e3eca
Author: Cuong Nguyen <email address hidden>
Date: Wed Aug 2 09:31:33 2017 +0700

    Fixes input for netlink-lib functional tests

    Netlink-lib creates some conntrack entries to verify list_entries()
    method. Each entry contains a zone_id, which might be duplicated with
    some already existed entries in OS.

    This patch proposes a simple verification to make sure entries created by
    netlink-lib do not contain existed zone_id.

    Change-Id: I4bce5041f82782cf9e51d99c605593afb2cf4fc8
    Closes-Bug: #1708030
    (cherry picked from commit b19fb20336b5aa2bc2bb2471574a490a9a37c1f8)

tags: added: in-stable-pike

This issue was fixed in the openstack/neutron 11.0.0.0rc2 release candidate.

tags: added: neutron-proactive-backport-potential

This issue was fixed in the openstack/neutron 12.0.0.0b1 development milestone.

tags: removed: neutron-proactive-backport-potential
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers