Re: [openstack-dev] How to develop a new [Cinder] driver?

2016-07-17 Thread Turbo Fredriksson
On Jul 17, 2016, at 5:40 PM, Jay Bryant wrote:

> New drivers need to go into the latest release.

Sorry, that's not going to happen. I'm "scared" enough to use Sid/Unstable
with Mitaka :D.

But to be serious, I'm taking quite a lot of short cuts. That and the
fact that my Python isn't really that good, I'm not actually seeing this
being included into Cinder proper.

Not any time soon anyway.

> Second, there really isn't any other way with Python

Ok, got it. Thanx. I tried a 'wrapper' (include my driver in a separate
Python script) and then call the function I wanted to test. Didn't seem
to work, but on the other hand, it could just as well be my failure with
Python..

> Unless the image you are
> copying is on the same backing storage it needs to be mounted on the
> control node and then dd'ed

Figured as much. That's what I do now - login to the remote target
(on the Cinder storage node), find the device node created and return
that.

Not pretty in my opinion, but it seems to work. That's ONE of many
of the shortcuts I'm taking.. I was just hoping there was a simpler
(i.e. cleaner :) way.

We'll see if I get any interest in the driver. I could sure need the
help :).


As far as I know, the driver is now working "just fine". Might be the
odd corner case that's still a problem, but I'll iron out that eventually.

But looking at 
http://docs.openstack.org/developer/cinder/devref/drivers.html#core-functionality,
 I can manually do all those with the "cinder" command from
the shell.


However, and I'm know this isn't a user questions list, but I'm not sure
if I've failed to register something in my driver or not so I'll just
throw it out there. I've already tried both the IRC channel(s) and the
'openstack' list, but haven't gotten an answer.

I've created a host aggregate, and added a Compute node to it, that have
the following property set:

  volume_backend_name=ZOL

This is the same as in the configuration:

  [zol]
  volume_driver = cinder.volume.drivers.zol.ZFSonLinuxISCSIDriver
  volume_backend_name = ZOL

Then a volume type, again with the same property set. Then, finally,
a flavor (again with that same property set).

So when I create an instance (in Horizon), I choose one of those
flavors.

The problem is that I get (from nova):

  Filter ComputeFilter returned 1 host(s)
  There are no capabilities to retrieve.
  [Compute node FQDN] ram: 15046MB disk: 116736MB io_ops: 0 instances: 1 fails 
instance_type extra_specs requirements
  Filter ComputeCapabilitiesFilter returned 0 hosts

and the instance creation fails :(. It doesn't even get as far as
creating a volume.

Note that the Cinder node already have, working, NFS and LVM backend
storage configured. Which is why I'm going with a special flavor for
choosing this specific backend. Horizon don't allow to specify which
backend to use (that I've been able to find) when creating an instance.

I've also tried to create the instance using one of the volumes I've
created in the shell. Same problem.
-- 
Med ett schysst järnrör slår man hela världen med häpnad
- Sockerconny


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] How to develop a new [Cinder] driver?

2016-07-17 Thread Jay Bryant
Turbo,

First, trying to understand why you are trying to create a new driver for
Mitaka. New drivers need to go into the latest release. More information
can be found here:
https://wiki.openstack.org/wiki/Cinder/how-to-contribute-a-driver

Second, there really isn't any other way with Python, that I know of, other
than making changes and restarting. That is just kind of the way that
Python works.

Third, it sounds to me like you are not getting the image you want to copy
to the volume node where you are running properly. Unless the image you are
copying is on the same backing storage it needs to be mounted on the
control node and then dd'ed, or something similar, into an image you have
created on your backend.

Hope this helps

Jay

On Fri, Jul 15, 2016 at 3:24 PM Turbo Fredriksson  wrote:

> On Jul 15, 2016, at 9:33 PM, Turbo Fredriksson wrote:
>
> > Is there a simpler way to do this?
>
>
> A followup question on that: I'm using a remote SAN
> and I've gotten the creation/deletion/iSCSI share/unshare
> on that to work just fine.
>
> However, when creating a volume from an image, the driver
> fails on copying the image to the volume. Which is kind'a
> obvious I guess, it's not (yet?) available on localhost..
>
> I was thinking about login to the target, copy the
> image onto the device that's created.
>
> But that just don't seem to be a very .. "nice" way to
> do it.. Is there a better one?
> --
> Med ett schysst järnrör slår man hela världen med häpnad
> - Sockerconny
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] How to develop a new [Cinder] driver?

2016-07-15 Thread Turbo Fredriksson
On Jul 15, 2016, at 9:33 PM, Turbo Fredriksson wrote:

> Is there a simpler way to do this?


A followup question on that: I'm using a remote SAN
and I've gotten the creation/deletion/iSCSI share/unshare
on that to work just fine.

However, when creating a volume from an image, the driver
fails on copying the image to the volume. Which is kind'a
obvious I guess, it's not (yet?) available on localhost..

I was thinking about login to the target, copy the
image onto the device that's created.

But that just don't seem to be a very .. "nice" way to
do it.. Is there a better one?
-- 
Med ett schysst järnrör slår man hela världen med häpnad
- Sockerconny


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] How to develop a new [Cinder] driver?

2016-07-15 Thread Turbo Fredriksson
I'm trying to port the/a Openstack-ZFS driver to Mitaka,
but every time I do a change, I have to restart cinder-volume,
run my test command, look through the log file, modify the driver,
and back to beginning

Is there a simpler way to do this? I'm not extremely fluent
in Python (it's been over six years since I did some serious
work in it), but just importing the module and then run
through the functions in the class don't seem to work.
--
Michael Jackson is not going to buried or cremated
but recycled into shopping bags so he can remain white,
plastic and dangerous for kids to play with.


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev