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.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/801882 /opendev. org/openstack/ neutron/ commit/ 13275402cee2862 f8db2f9179680dd 34ca719a51
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit 13275402cee2862 f8db2f9179680dd 34ca719a51
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 CLONE_NEWNET) " from the main
destructive routine "libc.unshare(
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/ 81db2c98a1dda1c 575ae087519cb08 aa6ffdb39e
Conflicts:
neutron/ privileged/ agent/linux/ ip_lib. py
Change-Id: I0294586335a71d 0757803843f6751 24bfb450967 adac1b7d205bef5 c86284eace)
(cherry picked from commit eb567478516897f