[openstack-dev] [neutron] monkey patching strategy
Kevin Benton
blak111 at gmail.com
Fri Feb 13 01:33:03 UTC 2015
Why did the services fail with the stdlib patched? Are they incompatible
with eventlet?
On Thu, Feb 12, 2015 at 11:25 AM, Ihar Hrachyshka <ihrachys at redhat.com>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> there were some moves recently to make monkey patching strategy sane
> in neutron.
>
> This was triggered by some bugs found when interacting with external
> oslo libraries [1], and a cross project spec to make eventlet usage
> sane throughout the project [2].
>
> Specifically, instead of monkey patching stdlib in each of services
> and agents (and forgetting to do so for some of them [3]), we should
> monkey patch it as part of a common import (ideally, it would be any
> neutron.* import).
>
> Initially, we've tried to patch it inside neutron/__init__.py [4], but
> it didn't place nice with some advanced services importing from
> neutron while not expecting stdlib to be patched, and so was reverted.
>
> So an alternative that I currently look into is "the Nova way".
> Specifically, moving all main() functions for all agents and services
> into neutron/cmd/... and monkey patching stdlib thru
> neutron/cmd/__init__.py.
>
> I've sent a series of patches to do just that [5]. It was rightfully
> blocked by Mark to seek for broader agreement.
>
> I encourage community to say your word on the direction.
>
> [1]: https://bugs.launchpad.net/oslo.concurrency/+bug/1418541
> [2]: https://review.openstack.org/154642
> [3]:
>
> http://git.openstack.org/cgit/openstack/neutron/tree/neutron/plugins/mlnx/agent/eswitch_neutron_agent.py
> [4]: https://review.openstack.org/153699
> [5]:
>
> https://review.openstack.org/#/q/status:open+project:openstack/neutron+branch:master+topic:bug/1418541,n,z
>
> Cheers,
> /Ihar
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQEcBAEBAgAGBQJU3P4QAAoJEC5aWaUY1u57A/cH/AuKbkewZy5Z0Hus2m4bClGp
> 4DJ37ygcY9HwGmJTLpvUyfRcDWnaO9S+6sj28Ebv49MN1w9qJ4MuQmaYA1xsFERb
> aR6uKgnkiIT0FS8CVjbClEC7gN5elHCe2dcB8cakrk7uUsTJ2LP5A6rdNQqly/uN
> 2hkdfa1WBcAYMX6raFWD8DJ49R1MhbPr09YXXU9ApoflMY6ZywvNBzwIZEw5gqPO
> Vpjb9DwevaFZ9kqzjHTrXk47CqOSYS7ZXQjS1bOGUOJFOBqNRLzl2qPX7wkBiA2N
> 12U4Qe3/3MvWwBig0O+mY2RwN2OtnxhK8X5tP6kbrybyOKLGUe4ZgIlvfQHI33Q=
> =8pX5
> -----END PGP SIGNATURE-----
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
--
Kevin Benton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150212/62e973cd/attachment.html>
More information about the OpenStack-dev
mailing list