[openstack-dev] [cinder] Does the OpenStack community(or Cinder team) allow one driver to call another driver's public method?

Eric Harney eharney at redhat.com
Fri Mar 18 14:12:16 UTC 2016


On 03/18/2016 10:01 AM, Sean McGinnis wrote:
> On Fri, Mar 18, 2016 at 04:05:34AM +0000, liuxinguo wrote:
>> Hi Cinder team,
>>
>> We are going to implement storage-assisted volume migrate in our driver between different backend storage array or even different array of different vendors.
>> This is really high-efficiency than the host-copy migration between different array of different vendors.
>>
>> 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:
>>
>>         rpcapi.create_volume(ctxt, new_volume, host['host'],
>>                              None, None, allow_reschedule=False)
>>
>> or
>>         conn = rpcapi.initialize_connection(ctxt, volume, properties)
>>
>> 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()?
>>
> 
> This is an interesting question. I have thought in the past we may be
> able to do some interesting things, particularly with more involved
> replication or migration scenarios.
> 
> We do not currently do this. Ideally I think we would want the other
> driver instance passed in to the source driver so each driver would not
> need to do something special to look it up.
> 

I believe Jon Bernard researched this same idea a bit while implementing
generic volume migration [2] and found that there were a handful of
reasons that it doesn't really work.

[2] https://review.openstack.org/#/c/187270/

> You do have the option today of optimizing migrate for your driver [1].
> But I think especially in cross-vendor migrations, there are things that
> need to be done outside the scope of a driver that are currently handled
> by Cinder.
> 
> There could be a valid use case for driver to driver interfaces, but I
> think as it is now, what I think you are looking for is something that
> is a little more involved and would need a little more design (and a lot
> more discussion) to support.
> 
> [1]
> https://github.com/openstack/cinder/blob/master/cinder/volume/driver.py#L1552
> 
>>
>> Thanks for any input!
>> --
>> Wilson Liu
> 






More information about the OpenStack-dev mailing list