<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 10:05 PM, liuxinguo <span dir="ltr"><<a href="mailto:liuxinguo@huawei.com" target="_blank">liuxinguo@huawei.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="ZH-CN" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi Cinder team,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">We are going to implement storage-assisted volume migrate in our driver between different backend storage array or even different array of different vendors.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">This is really high-efficiency than the host-copy migration between different array of different vendors.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">To implement this, we need to call other backend’s method like create_volume() or initialize_connection(). We can call them like the cinder/volume/manage.py:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal" align="left" style="text-align:left;text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black"> rpcapi.create_volume(ctxt, new_volume, host[</span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#00aa00">'host'</span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">],</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:blue">None</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:blue">None</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">, allow_reschedule=</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:blue">False</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">or<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black"> conn = rpcapi.initialize_connection(ctxt, volume, properties)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">And my question is: Does the OpenStack community(or Cinder team) allow driver to call rpcapi in order to call other driver’s method like create_volume() or initialize_connection()?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for any input!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">--<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Wilson Liu<u></u><u></u></span></p>
</div>
</div>
<br>__________________________________________________________________________<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>
<br></blockquote></div><div class="gmail_default" style="font-family:monospace,monospace">Hi Wilson,</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">We don't have a direct version of the model you describe in place currently. We do have something similar by coordinating through the api and scheduler layers, there's even some existing code in the migrate code that does some similar things in manager.py.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">It would be good to see if you could leverage some of the design that's already in place. I don't know that there should be an objection to having a driver call another driver but it really depends on how in depth it ends up being and how all the details around context and quota are dealt with.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">I'd be curious to see what you've got going. Might be something that helps make the migrate code we already have better?</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Thanks,</div><div class="gmail_default" style="font-family:monospace,monospace">John</div><br></div></div>