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

Turbo Fredriksson turbo at bayour.com
Sun Jul 17 18:58:51 UTC 2016


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




More information about the OpenStack-dev mailing list