Comment 2 for bug 1648972

Revision history for this message
Turbo Fredriksson (turbo-bayour) wrote :

This looks good, but I'm unsure on how to use it.

I can se that it does a volume attach, which in turn first tries to create an export.

But because my SAN is remote, and require a very special command to run on the remote host as well as creating a specific target, I don't know how/if this can/could solve my problem.

My hack was to pretty much do the same thing in create_volume() - https://github.com/FransUrbo/Openstack-ZFS/blob/master/zol.py#L229-231 - but I guess those lines is better of done in the copy_image_to_volume(), but is this the correct way to do it?

As in, the copy_image_to_volume() have to initiate and login to the target? From reading the documentation about the driver API (above), it seems this is/should be automatic. And it was in Mitaka..

So from what I remember of my porting of it to Mitaka, that if there was a san/remote variable set, it would then first call create_export() and initialize_connection() before it called copy_image_to_volume().

But I'm not sure, it was a while ago :).

In either case, this sounds like a much saner way to do it - let Cinder figure this out, and let the driver do the actual work.