[sheepdog] [Sheepdog]Openstack support sheepdog matters?

harryxiyou harryxiyou at gmail.com
Thu Jan 17 14:24:58 CET 2013


On Thu, Jan 17, 2013 at 2:52 PM, MORITA Kazutaka
<morita.kazutaka at lab.ntt.co.jp> wrote:
> At Thu, 17 Jan 2013 00:07:23 +0800,
[...]
>
> What do you mean by 'library'?
>
Hmmm, just the way how we use sheepdog in Openstack. You have told me
at the same mail ;-). (I was understanding Openstack use sheepdog by dynamic
library).

> I looked at the nova branch, but line 122 doesn't mention sheepdog.
> Do you mean line 145 (libvirt_volume_drivers)?

Yup, i read nova branch codes by github web way(122 line) and you may use other
editors like vim ;-).

>
> Nova uses libvirt to attach sheepdog volumes to QEMU, and you can
> create, snapshot, and clone sheepdog volumes from Cinder, IIUC.  Does
> this answer your question?
>
Absolutely right, thanks very much ;-)
Therefore, why do we have to use libvirt to attach sheepdog volumes to QEMU.
If openstack driver only support this way? Or other reasons?

[...]
>
> Are you using iSCSI volumes from Cinder?
Yup, actually, i mean how to let openstack support for sheepdog by
changing openstack
ISCSI way? That is to say, If Openstack allow us to support sheepdog
by adding ISCSI
driver interface?

>Then you can use sheepdog by
> setting volume_driver to cinder.conf.  Add the following line to the
> DEFAULT section of cinder.conf:
>
> volume_driver = cinder.volume.drivers.sheepdog.SheepdogDriver
>
> I've noticed that we need the following patch to use sheepdog
> successfully with Cinder.  I'll send this one to Cinder community
> later.  With this patch, I could create sheepdog volumes and boot from
> it with OpenStack.
>
> diff --git a/cinder/volume/drivers/sheepdog.py b/cinder/volume/drivers/sheepdog.py
> index ed1466d..a041a7a 100644
> --- a/cinder/volume/drivers/sheepdog.py
> +++ b/cinder/volume/drivers/sheepdog.py
> @@ -46,6 +46,11 @@ class SheepdogDriver(driver.VolumeDriver):
>              exception_message = _("Sheepdog is not working")
>              raise exception.VolumeBackendAPIException(data=exception_message)
>
> +    def _sizestr(self, size_in_g):
> +        if int(size_in_g) == 0:
> +            return '100M'
> +        return '%sG' % size_in_g
> +
>      def create_cloned_volume(self, volume, src_vref):
>          raise NotImplementedError()

But this is still the way we use libvirt to attach sheepdog volumes to QEMU.
I wanna know if we can let Openstack support sheepdog by ISCSI way(openstack
support sheepdog driver by some interfaces about ISCSI provided by Openstack).
Maybe i understand ISCSI not correctly.



-- 
Thanks
Harry Wei



More information about the sheepdog mailing list