Hi Shlomi,

Another solution to consider is to create a subclass per transport (iSCSI, 
iSER) which reference the same shared common code.
This is the solution used for the 3PAR iSCSI & FC transports. See these for 
reference:
cinder/volume/drivers/san/hp/hp_3par_common.py
cinder/volume/drivers/san/hp/hp_3par_fc.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py

Hope this helps.

Ramy

From: Shlomi Sasson [mailto:shlo...@mellanox.com]
Sent: Tuesday, March 25, 2014 8:07 AM
To: openstack-dev@lists.openstack.org
Subject: [openstack-dev] [nova][cinder] Refactor ISCSIDriver to support other 
iSCSI transports besides TCP

Hi,

I want to share with the community the following challenge:
Currently, Vendors who have their iSCSI driver, and want to add RDMA transport 
(iSER), cannot leverage their existing plug-in which inherit from iSCSI
And must modify their driver or create an additional plug-in driver which 
inherit from iSER, and copy the exact same code.

Instead I believe a simpler approach is to add a new attribute to ISCSIDriver 
to support other iSCSI transports besides TCP, which will allow minimal changes 
to support iSER.
The existing ISERDriver code will be removed, this will eliminate significant 
code and class duplication, and will work with all the iSCSI vendors who 
supports both TCP and RDMA without the need to modify their plug-in drivers.

To achieve that both cinder & nova requires slight changes:
For cinder, I wish to add a  parameter called "transport" (default to iscsi) to 
distinguish between the transports and use the existing "iscsi_ip_address" 
parameter for any transport type connection.
For nova, I wish to add a parameter called "default_rdma" (default to false) to 
enable initiator side.
The outcome will avoid code duplication and the need to add more classes.

I am not sure what will be the right approach to handle this, I already have 
the code, should I open a bug or blueprint to track this issue?

Best Regards,
Shlomi

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to