neutron-fwaas-dsvm-functional tests failing with oslo.privsep 1.31

Bug #1811506 reported by Akihiro Motoki on 2019-01-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Critical
Akihiro Motoki

Bug Description

It looks like a neutron-fwaas version of bug 1810518.

http://logs.openstack.org/82/527282/8/check/legacy-neutron-fwaas-dsvm-functional/e6d294b/

ft2.1: neutron_fwaas.tests.functional.privileged.test_netlink_lib.NetlinkLibTestCaseIPv6.test_flush_entries_StringException: Traceback (most recent call last):
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/neutron/tests/base.py", line 150, in func
    return f(self, *args, **kwargs)
  File "neutron_fwaas/tests/functional/privileged/test_netlink_lib.py", line 185, in test_flush_entries
    nl_lib.flush_entries(namespace)
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_privsep/priv_context.py", line 214, in _wrap
    return self.channel.remote_call(name, args, kwargs)
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_privsep/daemon.py", line 194, in remote_call
    result = self.send_recv((Message.CALL.value, name, args, kwargs))
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_privsep/comm.py", line 163, in send_recv
    self.writer.send((myid, msg))
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_privsep/comm.py", line 55, in send
    self.writesock.sendall(buf)
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/eventlet/greenio/base.py", line 401, in sendall
    tail = self.send(data, flags)
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/eventlet/greenio/base.py", line 395, in send
    return self._send_loop(self.fd.send, data, flags)
  File "/opt/stack/new/neutron-fwaas/.tox/dsvm-functional/local/lib/python2.7/site-packages/eventlet/greenio/base.py", line 382, in _send_loop
    return send_method(data, *args)
socket.error: [Errno 32] Broken pipe

I also see segfault in syslog.

kernel: privsep-helper[1477]: segfault at 740f9ac0 ip 00007f8e71f69a32 sp 00007f8e7af2d428 error 6 in libnetfilter_conntrack.so.3.5.0[7f8e71f62000+1a000]

Changed in neutron:
assignee: nobody → Akihiro Motoki (amotoki)
status: New → In Progress

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

Changed in neutron:
assignee: Akihiro Motoki (amotoki) → Ben Nemec (bnemec)

Change abandoned by Ben Nemec (<email address hidden>) on branch: master
Review: https://review.openstack.org/630691
Reason: duplicate of https://review.openstack.org/#/c/630451/

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

Changed in neutron:
assignee: Ben Nemec (bnemec) → Akihiro Motoki (amotoki)

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

commit f1d40107e86c9febbf439d6ac7195d64d207b081
Author: Akihiro Motoki <email address hidden>
Date: Sat Jan 12 20:10:03 2019 +0900

    Define types for C calls in netlink_lib

    Borrowed from neutron fix related to oslo.privsep 1.31
    https://review.openstack.org/#/c/629335/
    -----
    Previously this was not done, which meant all arguments were
    assumed to be ints. As long as we didn't get any large pointer
    addresses this worked fine, but for some reason the addition of
    threading to oslo.privsep triggered larger addresses that were then
    truncated. This caused segfaults in the underlying C library because
    we were passing it invalid pointers.

    This change sets argument and return types for all of the calls
    that are used in the module.
    -----

    Note: The root cause of the failure of
    neutron_fwaas.tests.functional.privileged.InNamespaceTest.test_in_namespace
    is different and it will be covered by the next patch
    (See Ie5b238f1df707ea3ce50b5711ff791bac2681a2f),
    so it is skipped temporarily.

    Partial-Bug: #1811506
    Change-Id: I3ea8c71a96d4c38988a38947c0ebcaf602a57842

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

commit 55874d06b1ce80b44356310c930f80e834d83a8a
Author: Akihiro Motoki <email address hidden>
Date: Fri Jan 18 06:29:33 2019 +0900

    Change netns tests with oslo.privsep to check netns links

    It turns out that pyroute2.netns.setns() changes a network
    namespace of a thread instead of that of a process when it is
    called in a thread [1].

    What we actually would like to check in test_in_namespace test
    is whether operations against a network namespace work with
    oslo.privsep expectedly. There is no need to check namespace inode.

    This commit changes test_in_namespace test to check a list of
    network devices in a namespace to check netns operation works
    correctly. What the new test does are:
    - create a network namespace for testing
    - create a veth pair and move one of them to the network namespace
    - call oslo.privsep entrypoint function to retrieve a list of
      network devices inside the netns

    [1] http://lists.openstack.org/pipermail/openstack-discuss/2019-January/001761.html

    Closes-Bug: #1811506
    Change-Id: Ie5b238f1df707ea3ce50b5711ff791bac2681a2f

Changed in neutron:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers