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

Sean McGinnis sean.mcginnis at gmx.com
Fri Mar 18 14:01:19 UTC 2016


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.

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

> __________________________________________________________________________
> 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




More information about the OpenStack-dev mailing list