RBD for ephemeral

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 20, 2014 at 10:14 AM, Pierre Grandin <
pierre.grandin at tubemogul.com> wrote:

>
> After digging some more, i've narrowed to this call :
>
> https://github.com/jdurgin/nova/blob/havana-ephemeral-rbd/nova/virt/libvirt/imagebackend.py#L787-792
>
> The clone seems to fail, as the volume is not created, but i have nothing
> in my logs. I've added some debugging and the parameters seems to be
> correct :
> [...] rbd c29a96da-5165-4190-9727-0b728648f6a6_disk
> [...] pool images
> [...] image 55542add-6dca-4a01-8f17-bc4aed962f5e
> [...] snapshot snap
>
> No exception is raised according to my logs, i've also read
> https://ceph.com/docs/master/rbd/librbdpy/
>
> I'm not really clear about how to create the contexts so I can't try to
> reproduce it from a simple python script right now.
>


Ok i found the error with my code. So if i try to do the snapshot with the
image and volume from my previous mail, it works :

import rbd
import rados

cluster = rados.Rados(conffile='/etc/ceph/ceph.conf')
cluster.connect()
src_ioctx = cluster.open_ioctx('images')
dest_ioctx = cluster.open_ioctx('volumes')

rbd.RBD().clone(src_ioctx,
    '55542add-6dca-4a01-8f17-bc4aed962f5e',
    'snap',
    dest_ioctx,
    'c29a96da-5165-4190-9727-0b728648f6a6_disk',
    features=rbd.RBD_FEATURE_LAYERING)


# rbd -p volumes info c29a96da-5165-4190-9727-0b728648f6a6_disk
rbd image 'c29a96da-5165-4190-9727-0b728648f6a6_disk':
        size 2048 MB in 256 objects
        order 23 (8192 kB objects)
        block_name_prefix: rbd_data.1d4886b8b4567
        format: 2
        features: layering
        parent: images/55542add-6dca-4a01-8f17-bc4aed962f5e at snap
        overlap: 2048 MB

Now need to find why nova believe it did not work..

--
Pierre

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20140520/674db118/attachment.htm>


[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux