CSI Driver in Python

28 views
Skip to first unread message

vna...@infinidat.com

unread,
Sep 19, 2019, 5:32:38 PM9/19/19
to container-storage-interface-community
Hi!

I have been looking at the Ember CSI driver in Python and the IBM driver's controller code, and was wondering if there is any particular reason not to write a driver in Python as opposed to Go?

Thanks,
Venu

Luis Pabon

unread,
Sep 19, 2019, 5:36:40 PM9/19/19
to vna...@infinidat.com, container-storage-interface-community
No reason Venu. Just make sure that CSI driver can handle multiple concurrent requests. May want to use event threads or something like that. Check Ember CSI to see how the did it.

- Luis

--
You received this message because you are subscribed to the Google Groups "container-storage-interface-community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to container-storage-interf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/container-storage-interface-community/cbad1086-a5b1-4730-ae14-8dce2a5e0fa7%40googlegroups.com.

Gorka Eguileor

unread,
Sep 20, 2019, 9:05:07 AM9/20/19
to vna...@infinidat.com, container-storage-interface-community
Hi Venu,

I believe it depends on your starting point.

Developing it in Python makes sense if you have Python technical
expertise, but not Golang, or if you only have Python client libraries
to manage your storage.

If you have Golang experience and a REST API, then you should use Golang
instead, since you'll find more CSI plugin examples out there as a
reference.

Ember-CSI was developed in Python because it reuses existing Python code
allowing it to manage many different storage solutions.

As far as I know it would be easy to use Ember-CSI for Infinidat iSCSI
connections, since the driver is already included in Ember-CSI's master
image. The only missing part is the infinisdk dependency in the
container image, so creating a new image using it as a base and adding
infinisdk is trivial (or creating a PR to Ember-CSI to include it in the
base image).

You can have a look at the Driver Validation article [1] to see how to
test it.

If you have any questions regarding Ember-CSI feel free to email me
off-list, via #ember-csi at freenode, or in the embercsi google group.

Cheers,
Gorka.

[1]: https://ember-csi.io/post/validation/

Venu Nayar

unread,
Sep 20, 2019, 1:15:04 PM9/20/19
to container-storage-interface-community
Thanks Luis. I believe that the Ember CSI already does this.

Venu


On Thursday, September 19, 2019 at 2:36:40 PM UTC-7, Luis Pabon wrote:
No reason Venu. Just make sure that CSI driver can handle multiple concurrent requests. May want to use event threads or something like that. Check Ember CSI to see how the did it.

- Luis

On Thu, Sep 19, 2019 at 5:32 PM <vna...@infinidat.com> wrote:
Hi!

I have been looking at the Ember CSI driver in Python and the IBM driver's controller code, and was wondering if there is any particular reason not to write a driver in Python as opposed to Go?

Thanks,
Venu

--
You received this message because you are subscribed to the Google Groups "container-storage-interface-community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to container-storage-interface-community+unsubscribe@googlegroups.com.

Venu Nayar

unread,
Sep 20, 2019, 1:24:08 PM9/20/19
to container-storage-interface-community
Thanks, Gorka. I am using the Ember CSI as my example client. Yeah, my main argument to use Python (or any other language) would be prior familiarity - we could use Go and learn it as we go, but our code would be clunky till we became familiar with Go and then we'd have to refactor it.

Yes, the cinder driver exists, and we could add any missing functionality to the Ember CSI and the cinder driver (if needed). This is one of the possible options that we will consider.

Thanks,
Venu
> To unsubscribe from this group and stop receiving emails from it, send an email to container-storage-interface-community+unsubscribe@googlegroups.com.

Gorka Eguileor

unread,
Sep 20, 2019, 6:43:19 PM9/20/19
to Venu Nayar, container-storage-interface-community
On 20/09, Venu Nayar wrote:
> Thanks Luis. I believe that the Ember CSI already does this.
>
> Venu

Hi Venu,

That is correct, Ember-CSI is currently using the eventlet library to
handle multiple concurrent requests.

Cheers,
Gorka.


>
> On Thursday, September 19, 2019 at 2:36:40 PM UTC-7, Luis Pabon wrote:
> >
> > No reason Venu. Just make sure that CSI driver can handle multiple
> > concurrent requests. May want to use event threads or something like that.
> > Check Ember CSI to see how the did it.
> >
> > - Luis
> >
> > On Thu, Sep 19, 2019 at 5:32 PM <vna...@infinidat.com <javascript:>>
> > wrote:
> >
> >> Hi!
> >>
> >> I have been looking at the Ember CSI driver in Python and the IBM
> >> driver's controller code, and was wondering if there is any particular
> >> reason not to write a driver in Python as opposed to Go?
> >>
> >> Thanks,
> >> Venu
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "container-storage-interface-community" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to
> >> container-storage-interf...@googlegroups.com
> >> <javascript:>.
> >> <https://groups.google.com/d/msgid/container-storage-interface-community/cbad1086-a5b1-4730-ae14-8dce2a5e0fa7%40googlegroups.com?utm_medium=email&utm_source=footer>
> >> .
> >>
> >
>
> --
> You received this message because you are subscribed to the Google Groups "container-storage-interface-community" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to container-storage-interf...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/container-storage-interface-community/b829c4b6-8e32-4664-b8af-afaf029d5397%40googlegroups.com.

Gorka Eguileor

unread,
Sep 20, 2019, 6:59:02 PM9/20/19
to Venu Nayar, container-storage-interface-community
On 20/09, Venu Nayar wrote:
> Thanks, Gorka. I am using the Ember CSI as my example client. Yeah, my main
> argument to use Python (or any other language) would be prior familiarity -
> we could use Go and learn it as we go, but our code would be clunky till we
> became familiar with Go and then we'd have to refactor it.
>
> Yes, the cinder driver exists, and we could add any missing functionality
> to the Ember CSI and the cinder driver (if needed). This is one of the
> possible options that we will consider.
>
> Thanks,
> Venu

Hi Venu,

You shouldn't need to make any code changes to Ember-CSI for the iSCSI
driver, as we have tested other iSCSI drivers such as 3PAR, XtremIO,
QNAP, Kaminario, and LVM. And Ember-CSI's upstream 3rd party CI system
runs 4 of those iSCSI backends on every patch [1].

I haven't looked at your Cinder driver, but in the worst case scenario
it is accessing the DB directly in an unexpected way and the driver
isn't compatible with cinderlib [2][3]. If that is the case you can
provide me the trace exceptions and I can improve cinderlib like I did
for IBM SVC [4].

Feel free to ping me if you need any assistance to test it or any other
Ember-CSI or cinderlib related matter.

Cheers,
Gorka.

[1]: https://github.com/embercsi/ember-csi/pull/129
[2]: https://opendev.org/openstack/cinderlib
[3]: https://docs.openstack.org/cinderlib/latest/
[4]: https://review.opendev.org/#/c/648212/
> > container-storage-interf...@googlegroups.com
> > <javascript:>.
> --
> You received this message because you are subscribed to the Google Groups "container-storage-interface-community" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to container-storage-interf...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/container-storage-interface-community/4ad94b99-0fdd-47a8-b692-6385d865421b%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages