[FT] "IpNetnsCommand.add" command fails frequently

Bug #1917487 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Critical
Rodolfo Alonso
tags: added: functional-tests gate-failure
Changed in neutron:
importance: Undecided → Critical
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/wallaby)

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/801880

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/victoria)

Related fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/neutron/+/801881

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/ussuri)

Related fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/neutron/+/801882

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/neutron/+/801988

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/801881
Committed: https://opendev.org/openstack/neutron/commit/54d73df935a2513fc49465869597785f3f2f1090
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 54d73df935a2513fc49465869597785f3f2f1090
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 4 15:40:08 2021 +0000

    Implement namespace creation method

    Since [1], Pyroute forks the namespace creation to avoid calling
    destructive routine "libc.unshare(CLONE_NEWNET)" from the main
    process. This implementation uses sockets between both processes
    to return any error feedback sent from the child process.

    This patch implements the same fork without any communication. If
    the child process raises an exception other than "OSError(EEXIST)",
    the child process returns 1 that is read by the the main process,
    that raises a "RuntimeError" exception.

    Related-Bug: #1917487

    [1]https://github.com/svinota/pyroute2/commit/81db2c98a1dda1c575ae087519cb08aa6ffdb39e

    Change-Id: I0294586335a71d0757803843f675124bfb450967
    (cherry picked from commit eb567478516897fadac1b7d205bef5c86284eace)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/801880
Committed: https://opendev.org/openstack/neutron/commit/0f02f97f25fc0cdf47e5e6b294c6acdcaaca615c
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 0f02f97f25fc0cdf47e5e6b294c6acdcaaca615c
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 4 15:40:08 2021 +0000

    Implement namespace creation method

    Since [1], Pyroute forks the namespace creation to avoid calling
    destructive routine "libc.unshare(CLONE_NEWNET)" from the main
    process. This implementation uses sockets between both processes
    to return any error feedback sent from the child process.

    This patch implements the same fork without any communication. If
    the child process raises an exception other than "OSError(EEXIST)",
    the child process returns 1 that is read by the the main process,
    that raises a "RuntimeError" exception.

    Related-Bug: #1917487

    [1]https://github.com/svinota/pyroute2/commit/81db2c98a1dda1c575ae087519cb08aa6ffdb39e

    Change-Id: I0294586335a71d0757803843f675124bfb450967
    (cherry picked from commit eb567478516897fadac1b7d205bef5c86284eace)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/801882
Committed: https://opendev.org/openstack/neutron/commit/13275402cee2862f8db2f9179680dd34ca719a51
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 13275402cee2862f8db2f9179680dd34ca719a51
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 4 15:40:08 2021 +0000

    Implement namespace creation method

    Since [1], Pyroute forks the namespace creation to avoid calling
    destructive routine "libc.unshare(CLONE_NEWNET)" from the main
    process. This implementation uses sockets between both processes
    to return any error feedback sent from the child process.

    This patch implements the same fork without any communication. If
    the child process raises an exception other than "OSError(EEXIST)",
    the child process returns 1 that is read by the the main process,
    that raises a "RuntimeError" exception.

    Related-Bug: #1917487

    [1]https://github.com/svinota/pyroute2/commit/81db2c98a1dda1c575ae087519cb08aa6ffdb39e

    Conflicts:
        neutron/privileged/agent/linux/ip_lib.py

    Change-Id: I0294586335a71d0757803843f675124bfb450967
    (cherry picked from commit eb567478516897fadac1b7d205bef5c86284eace)

tags: added: in-stable-ussuri
tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/801988
Committed: https://opendev.org/openstack/neutron/commit/85f591ed60b0a267bea8b7fbd45788a9363d5720
Submitter: "Zuul (22348)"
Branch: stable/train

commit 85f591ed60b0a267bea8b7fbd45788a9363d5720
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 4 15:40:08 2021 +0000

    Implement namespace creation method

    Since [1], Pyroute forks the namespace creation to avoid calling
    destructive routine "libc.unshare(CLONE_NEWNET)" from the main
    process. This implementation uses sockets between both processes
    to return any error feedback sent from the child process.

    This patch implements the same fork without any communication. If
    the child process raises an exception other than "OSError(EEXIST)",
    the child process returns 1 that is read by the the main process,
    that raises a "RuntimeError" exception.

    Related-Bug: #1917487

    [1]https://github.com/svinota/pyroute2/commit/81db2c98a1dda1c575ae087519cb08aa6ffdb39e

    Conflicts:
        neutron/privileged/agent/linux/ip_lib.py

    Change-Id: I0294586335a71d0757803843f675124bfb450967
    (cherry picked from commit eb567478516897fadac1b7d205bef5c86284eace)

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

I think we can mark that bug as fixed by https://review.opendev.org/c/openstack/neutron/+/778735 and backports

Changed in neutron:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/ussuri)

Related fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/neutron/+/823962

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/neutron/+/823963

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/823962
Committed: https://opendev.org/openstack/neutron/commit/abe24c27056020f47f14d2bb40ea0f27bede90cc
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit abe24c27056020f47f14d2bb40ea0f27bede90cc
Author: Slawek Kaplonski <email address hidden>
Date: Mon Jan 10 11:56:58 2022 +0100

    Fix privileged create_netns function

    In the patch [1] create_netns function from the Neutron's
    privileged ip_lib module was changed in the way that it was
    implemented in the same way like original pyroute2's create_netns
    function.
    Unfortunately during backporing that patch to stable/ussuri and
    stable/train branches, we probably made mistake and instead of
    calling pyroute2's private function _netns() we still called
    public function netns() (which we tried to "reimplement" really).

    So this patch updates it and changes to use private _netns() function
    from pyroute2, in the same way like it is done in the branches newer
    than stable/ussuri.

    [1] https://review.opendev.org/c/openstack/neutron/+/778735

    Related-Bug: #1917487
    Change-Id: Id25ca8a67b52393a1c24c9d659189adc9c16a011

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/823963
Committed: https://opendev.org/openstack/neutron/commit/dc18fb1888a959e3befae1df266cef4a26954030
Submitter: "Zuul (22348)"
Branch: stable/train

commit dc18fb1888a959e3befae1df266cef4a26954030
Author: Slawek Kaplonski <email address hidden>
Date: Mon Jan 10 11:56:58 2022 +0100

    Fix privileged create_netns function

    In the patch [1] create_netns function from the Neutron's
    privileged ip_lib module was changed in the way that it was
    implemented in the same way like original pyroute2's create_netns
    function.
    Unfortunately during backporing that patch to stable/ussuri and
    stable/train branches, we probably made mistake and instead of
    calling pyroute2's private function _netns() we still called
    public function netns() (which we tried to "reimplement" really).

    So this patch updates it and changes to use private _netns() function
    from pyroute2, in the same way like it is done in the branches newer
    than stable/ussuri.

    [1] https://review.opendev.org/c/openstack/neutron/+/778735

    Related-Bug: #1917487
    Change-Id: Id25ca8a67b52393a1c24c9d659189adc9c16a011
    (cherry picked from commit abe24c27056020f47f14d2bb40ea0f27bede90cc)

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

Other bug subscribers

Remote bug watches

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