<div dir="ltr"><div class="gmail_default"><font face="trebuchet ms, sans-serif">Thanks, leyal. I've already changed the service framework from oslo.service to cotyledon <a href="https://review.openstack.org/#/c/530428/">https://review.openstack.org/#/c/530428/</a>, and it works perfectly fine.</font></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><font face="trebuchet ms, sans-serif">Cheers,<br>Lingxian Kong (Larry)</font></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jan 8, 2018 at 2:47 AM, Eyal Leshem <span dir="ltr"><<a href="mailto:ey.leshem@gmail.com" target="_blank">ey.leshem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Lingxian, </span><div><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">I uploaded a patch for kuryr-kubernetes  that </span><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre-wrap">monkey-patch the ThreadPool with </span></font></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:9pt;white-space:pre-wrap">GreenPool </span></font><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap">(</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><a href="https://review.openstack.org/#/c/530655/4/kuryr_kubernetes/thread_pool_patch.py" target="_blank">https://review.openstack.org/<wbr>#/c/530655/4/kuryr_kubernetes/<wbr>thread_pool_patch.py</a></span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap">).</span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap"><br></span></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:9pt;white-space:pre-wrap">It's support only apply_async - but that should be </span><span style="font-size:12px;white-space:pre-wrap">enough for k8s. </span></font></div><div><br></div><div>That can be dangers<span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap"> - if you use ThreadPool in other places in your code, </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap">but in such case you can't run with eventlet anyway. </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap">hope that helps, </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:9pt;white-space:pre-wrap">leyal  </span><br></div><div><span style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt;font-style:italic"><br></span></div><div><span style="color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9pt;font-style:italic"> </span></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 4 January 2018 at 23:45, Lingxian Kong <span dir="ltr"><<a href="mailto:anlin.kong@gmail.com" target="_blank">anlin.kong@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><span><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif"><span style="font-family:arial,sans-serif">On Tue, Jan 2, 2018 at 1:56 AM, Eyal Leshem </span><span dir="ltr" style="font-family:arial,sans-serif"><<a href="mailto:ey.leshem@gmail.com" target="_blank">ey.leshem@gmail.com</a>></span><span style="font-family:arial,sans-serif"> wrote:</span><br></div></span><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi , <div><br></div><div>According to <a href="https://github.com/eventlet/eventlet/issues/147" style="font-family:'trebuchet ms',sans-serif;font-size:12.8px" target="_blank">https://github.com/eventlet<wbr>/eventlet/issues/147</a> - it's looks that eventlet </div><div>has issue with "<span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap">multiprocessing.pool". </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap">The ThreadPool used in code that auto-</span><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre-wrap">generated by swagger.</span></font></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre-wrap">Possible workaround for that is to monky-patch the client library , </span></font></div><div><span style="font-size:12px;white-space:pre-wrap;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace">and replace the pool with greenpool. </span></div></div></blockquote><div><br></div></span><div><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif">Hi, leyal, I'm not very familar with eventlet, but how can I monkey patch kubernetes python lib?</div></div><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif">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 <a href="https://bugs.launchpad.net/taskflow/+bug/1225275" target="_blank">https://bugs.launchpad.net<wbr>/taskflow/+bug/1225275</a> in taskflow, they chose to not use multiprocessing module.</div><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif">Any other suggestions are welcomed!</div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span style="font-size:12px;white-space:pre-wrap;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace"><br></span></div><div><span style="font-size:12px;white-space:pre-wrap;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace">If someone has better workaround, please share that with us :) </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div><div><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre-wrap">btw , I don't think that should be treated as compatibility</span> issue </font></div><div><span style="font-size:12px;white-space:pre-wrap;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace">in the client python as it's an eventlet issue.. </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap">Thanks , </span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap">leyal    </span></div></div></blockquote></span></div><br></div></div>
<br></div></div><span class="">______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
<br></span></blockquote></div><br></div>
<br>______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br></blockquote></div><br></div>