[openstack-dev] [all] propose to upgrade python kubernetes (the k8s python client) to 4.0.0 which breaks oslo.service

Eyal Leshem ey.leshem at gmail.com
Sun Jan 7 13:47:46 UTC 2018


Hi Lingxian,

I uploaded a patch for kuryr-kubernetes  that monkey-patch the ThreadPool
with
GreenPool (
https://review.openstack.org/#/c/530655/4/kuryr_kubernetes/thread_pool_patch.py
).

It's support only apply_async - but that should be enough for k8s.

That can be dangers - if you use ThreadPool in other places in your code,
but in such case you can't run with eventlet anyway.

hope that helps,
leyal




On 4 January 2018 at 23:45, Lingxian Kong <anlin.kong at gmail.com> wrote:

> On Tue, Jan 2, 2018 at 1:56 AM, Eyal Leshem <ey.leshem at gmail.com> wrote:
>
>> Hi ,
>>
>> According to https://github.com/eventlet/eventlet/issues/147 - it's
>> looks that eventlet
>> has issue with "multiprocessing.pool".
>>
>> The ThreadPool used in code that auto-generated by swagger.
>>
>> Possible workaround for that is to monky-patch the client library ,
>> and replace the pool with greenpool.
>>
>
> Hi, leyal, I'm not very familar with eventlet, but how can I monkey patch
> kubernetes python lib?
> The only way I can see now is to replace oslo.service with something else,
> e.g. cotyledon, avoid to use eventlet, that's a signaficant change though.
> I also found this bug https://bugs.launchpad.net/taskflow/+bug/1225275 in
> taskflow, they chose to not use multiprocessing module.
>
> Any other suggestions are welcomed!
>
>
>>
>> If someone has better workaround, please share that with us :)
>>
>> btw , I don't think that should be treated as compatibility issue
>> in the client python as it's an eventlet issue..
>>
>> Thanks ,
>> leyal
>>
>
>
> __________________________________________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180107/3cd81efe/attachment.html>


More information about the OpenStack-dev mailing list