-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to pass the libc when opening a namespace context #702
Comments
When a NetNS context is created, the method "netns.setns" is called to set the namespace to be used. This method can use a shared library explicitly defined in the input arguments; e.g.: ctypes.PyDLL instead of ctypes.CDLL. This will help if eventlet is used. PyDLL for example [1], behaves like CDLL except that the Python GIL is not released during the function call. [1]https://docs.python.org/3.6/library/ctypes.html#ctypes.PyDLL Bug-Url: svinota#702
Reasonable, fixed. Do you need a release to be tagged asap, or it can wait? |
Hi Peter: No, there is no rush. We'll wait for a new release and then we'll bump the min version required in Neutron. Regards! |
Sorry but in [1] you should pass the libc variable to setns. This should be: |
Ough, my bad. Thanks a lot. |
Thanks a lot! |
This version contains a patch needed in Neutron: - svinota/pyroute2#702 Change-Id: I2f3f5a613d63058a9f940099ec2c3ea8d74dfb10
* Update requirements from branch 'master' - Merge "Bump pyroute2 upper version to 0.5.13" - Bump pyroute2 upper version to 0.5.13 This version contains a patch needed in Neutron: - svinota/pyroute2#702 Change-Id: I2f3f5a613d63058a9f940099ec2c3ea8d74dfb10
https://build.opensuse.org/request/show/824351 by user dirkmueller + dimstar_suse - update to 0.5.13: * netns: allow to pass custom libc reference <svinota/pyroute2#702> * generic: att L2TP support <svinota/pyroute2#709> * iproute: link_lookup() optimization <svinota/pyroute2#712> * ndb: basic cluster support
* Update neutron from branch 'master' - Merge "Specify C shared library in Pyroute2 namespace context" - Specify C shared library in Pyroute2 namespace context Since [1], it's possible to specify the shared library to be used when creating a Pyroute2 namespace context. As commented in [2], "privsep" library makes use of eventlet to implement multitasking. If the method executed returns the GIL, nothing guarantees that the "eventlet" executor will return it again to this task. This could lead to timeouts during the execution of those methods. From https://docs.python.org/3.6/library/ctypes.html#ctypes.PyDLL: "Instances of this class behave like CDLL instances, except that the Python GIL is not released during the function call, and after the function execution the Python error flag is checked." [1]svinota/pyroute2#702 [2]https://review.opendev.org/#/c/717017/ Change-Id: I6c9f9adba8b4433cc96704bb69dd4e0d4b154ebd Related-Bug: #1870352
Since [1], it's possible to specify the shared library to be used when creating a Pyroute2 namespace context. As commented in [2], "privsep" library makes use of eventlet to implement multitasking. If the method executed returns the GIL, nothing guarantees that the "eventlet" executor will return it again to this task. This could lead to timeouts during the execution of those methods. From https://docs.python.org/3.6/library/ctypes.html#ctypes.PyDLL: "Instances of this class behave like CDLL instances, except that the Python GIL is not released during the function call, and after the function execution the Python error flag is checked." [1]svinota/pyroute2#702 [2]https://review.opendev.org/#/c/717017/ Change-Id: I6c9f9adba8b4433cc96704bb69dd4e0d4b154ebd Related-Bug: #1870352
"netns.nslink.NetNS" calls "netns.setns". "setns" method allows to set explicitly the libc to be used. For example, instead of using CDLL, PyDLL could be used. This could help, when using eventlet, to make calls without releasing the GIL.
References:
The text was updated successfully, but these errors were encountered: