<div dir="ltr">Hi, folks.<br><br><div>At the last summit, we decided to support pluggable conductor for multi backend [1].</div><div>So, if we choose #3, new service (instance of periodic task) also should support plugin.</div><div>I think this will be a little complicated to implement a plugin.</div><div><br></div><div>[1]: <a href="https://etherpad.openstack.org/p/liberty-work-abstract-backend">https://etherpad.openstack.org/p/liberty-work-abstract-backend</a></div><div><br></div><div>Thanks</div><div>-yuanying</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">2015年6月15日(月) 11:59 Hongbin Lu <<a href="mailto:hongbin.lu@huawei.com">hongbin.lu@huawei.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div bgcolor="white" lang="EN-CA" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I think option #3 is the most desired choice in performance’s point of view, because magnum is going to support multiple conductors and all conductors share
 the same DB. However, if each conductor runs its own thread for periodic task, we will end up to have multiple instances of tasks for doing the same job (syncing heat’s state to magnum’s DB). I think magnum should have only one instance of periodic task since
 the replicated instance of tasks will stress the computing and networking resources.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hongbin  <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Qiao,Liyong [mailto:<a href="mailto:liyong.qiao@intel.com" target="_blank">liyong.qiao@intel.com</a>]
<br>
<b>Sent:</b> June-14-15 9:38 PM<br>
<b>To:</b> <a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a><br>
<b>Cc:</b> <a href="mailto:qiaoliyong@gmail.com" target="_blank">qiaoliyong@gmail.com</a><br>
<b>Subject:</b> [openstack-dev] [Magnum] Add periodic task threading for conductor server<u></u><u></u></span></p>
</div>
</div></div></div><div bgcolor="white" lang="EN-CA" link="blue" vlink="purple"><div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">hi magnum team,<br>
<br>
I am planing to add periodic task for magnum conductor service, it will be good<br>
to sync task status with heat and container service. and I have already have a WIP<br>
patch[1], I'd like to start a discussion on the implement.<br>
<br>
Currently, conductor service is an rpc server, and it has several handlers<br>
    endpoints = [<br>
        docker_conductor.Handler(),<br>
        k8s_conductor.Handler(),<br>
        bay_conductor.Handler(),<br>
        conductor_listener.Handler(),<br>
    ]<br>
all handler runs in the rpc server.<br>
<br>
1. my patch [1] is to add periodic task functions in each handlers (if it requires such tasks)<br>
and setup these functions when start rpc server, add them to a thread group.<br>
so for example:<br>
<br>
if we have task in bay_conductor.Handler() and docker_conductor.Handler(),<br>
then adding 2 threads to current service's tg. each thread run it own periodic tasks.<br>
<br>
the advantage is we separate each handler's task job to separate thread.<br>
but hongbin's concern is if it will has some impacts on horizontally scalability.
<br>
<br>
2. another implement is put all tasks in a thread, this thread will run all<br>
tasks(for bay,k8s, docker etc), just like sahara does see [2]<br>
<br>
3 last one is start a new service in a separate process to run tasks.( I think this<br>
will be too heavy/wasteful)<br>
<br>
I'd like to get what's your suggestion, thanks in advance.<br>
<br>
[1] <a href="https://review.openstack.org/#/c/187090/4" target="_blank">https://review.openstack.org/#/c/187090/4</a><br>
[2] <a href="https://github.com/openstack/sahara/blob/master/sahara/service/periodic.py#L118" target="_blank">
https://github.com/openstack/sahara/blob/master/sahara/service/periodic.py#L118</a><br>
<br>
<u></u><u></u></p>
<pre>-- <u></u><u></u></pre>
<pre>BR, Eli(Li Yong)Qiao<u></u><u></u></pre>
</div></div>

__________________________________________________________________________<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.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div>