* perl binding for rados ?
@ 2011-11-15 8:34 Lalit Kumar Bhasin
2011-11-15 19:38 ` Gregory Farnum
0 siblings, 1 reply; 4+ messages in thread
From: Lalit Kumar Bhasin @ 2011-11-15 8:34 UTC (permalink / raw)
To: ceph-devel
Hi,
Is there any perl bindings available for rados, or be available in near
furture? I can't find it on cpan. As of now, only way I can see is to
use librados through perl-XS interface.
/Lalit
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: perl binding for rados ?
2011-11-15 8:34 perl binding for rados ? Lalit Kumar Bhasin
@ 2011-11-15 19:38 ` Gregory Farnum
[not found] ` <CALFpzo71Aq=xLeNx0LztjKgi2hAfEfWEMmVF7SEag7dkJcT=HA@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Gregory Farnum @ 2011-11-15 19:38 UTC (permalink / raw)
To: Lalit Kumar Bhasin; +Cc: ceph-devel, Marcus Sorensen
On Tue, Nov 15, 2011 at 12:34 AM, Lalit Kumar Bhasin <lkb@one.com> wrote:
> Hi,
>
> Is there any perl bindings available for rados, or be available in near
> furture? I can't find it on cpan. As of now, only way I can see is to use
> librados through perl-XS interface.
>
> /Lalit
All I can give you is a past discussion thread:
http://comments.gmane.org/gmane.comp.file-systems.ceph.devel/3792
Marcus, did you get anywhere with these?
-Greg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Fwd: perl binding for rados ?
[not found] ` <CALFpzo71Aq=xLeNx0LztjKgi2hAfEfWEMmVF7SEag7dkJcT=HA@mail.gmail.com>
@ 2011-11-15 21:10 ` Gregory Farnum
[not found] ` <4EC34E9C.5070600@one.com>
0 siblings, 1 reply; 4+ messages in thread
From: Gregory Farnum @ 2011-11-15 21:10 UTC (permalink / raw)
To: ceph-devel
Forwarding to list.
---------- Forwarded message ----------
From: Marcus Sorensen <shadowsor@gmail.com>
Date: Tue, Nov 15, 2011 at 1:05 PM
Subject: Re: perl binding for rados ?
To: Gregory Farnum <gregory.farnum@dreamhost.com>
Admittedly they kind of dropped off my radar after it didn't seem to
Garner much interest. I do however have some code that seems to work
for connecting, listing pools and devices, basic adding and removing.
I dont have all of the functions wrapped but at this point I feel like
it's mainly just a matter of copying what's already there to fill in
the rest. It uses inline::c . I would be happy to tar up what I have
and make it available if someone wants to build on ot
On Nov 15, 2011 12:38 PM, "Gregory Farnum" <gregory.farnum@dreamhost.com> wrote:
>
> On Tue, Nov 15, 2011 at 12:34 AM, Lalit Kumar Bhasin <lkb@one.com> wrote:
> > Hi,
> >
> > Is there any perl bindings available for rados, or be available in near
> > furture? I can't find it on cpan. As of now, only way I can see is to use
> > librados through perl-XS interface.
> >
> > /Lalit
>
> All I can give you is a past discussion thread:
> http://comments.gmane.org/gmane.comp.file-systems.ceph.devel/3792
>
> Marcus, did you get anywhere with these?
> -Greg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: perl binding for rados ?
[not found] ` <4EC35B1A.2030803@one.com>
@ 2011-11-16 15:46 ` Marcus Sorensen
0 siblings, 0 replies; 4+ messages in thread
From: Marcus Sorensen @ 2011-11-16 15:46 UTC (permalink / raw)
To: Lalit Kumar Bhasin; +Cc: ceph-devel
[-- Attachment #1: Type: text/plain, Size: 5630 bytes --]
Here is the package, just tested against 0.38. There are perl
subroutines at the top of RADOS.pm, which call the native C functions
below. Inline::C handles the conversion of datatypes, you should be
able to look at what's already done for the most part to fill out the
rest of the routines.
As far as known issues, the cluster_stat throws a failed assertion
with a brand new cluster, if I comment out the stat lines in my test
script, run the script once, and then uncomment everything is fine
from then on. Have not troubleshot it at all, it might be on the C
side with rados_cluster_stat or perhaps it's returning something
unexpected.
./common/Mutex.h: In function 'void Mutex::Lock(bool)', in thread '7fc0e2c2a720'
./common/Mutex.h: 110: FAILED assert(r == 0)
ceph version 0.38 (commit:b600ec2ac7c0f2e508720f8e8bb87c3db15509b9)
1: (()+0x8c0a3) [0x7fc0e08000a3]
2: (librados::RadosClient::get_fs_stats(ceph_statfs&)+0x7f) [0x7fc0e080eb1f]
3: (rados_cluster_stat()+0x10) [0x7fc0e080ecb0]
4: (cluster_stat_c()+0x10) [0x7fc0e0bb6e80]
5: (XS_Ceph__RADOS_cluster_stat_c()+0x135) [0x7fc0e0bb72b5]
6: (Perl_pp_entersub()+0x585) [0x7fc0e2774265]
7: (Perl_runops_standard()+0x20) [0x7fc0e276bcd0]
8: (perl_run()+0x35e) [0x7fc0e27175fe]
9: (main()+0xec) [0x400ccc]
10: (__libc_start_main()+0xff) [0x7fc0e1cabeff]
11: perl() [0x400af9]
Also in general some extra validation,etc is a good idea, I was just
writing things and seeing if they worked. testrados2.pl does the
following:
connects to monitor
stats cluster
creates a pool
lists pools
opens a pool
gets the pool id
gets the pool auid
sets the pool auid
closes the pool
deletes the pool
disconnects
I hope this is useful to someone so they don't have to start from
scratch. What follows is the test procedure I performed this morning.
mlsorensen@mlsorensen-pc:~/Downloads$ tar xzf Ceph-RADOS-0.01.tar.gz
mlsorensen@mlsorensen-pc:~/Downloads$ cd Ceph-RADOS-0.01/
mlsorensen@mlsorensen-pc:~/Downloads/Ceph-RADOS-0.01$ perl Makefile.PL
Writing Makefile for Ceph::RADOS
mlsorensen@mlsorensen-pc:~/Downloads/Ceph-RADOS-0.01$ make
Skip blib/lib/Ceph/types (unchanged)
Skip blib/lib/Ceph/RADOS.pm (unchanged)
Skip blib/lib/Ceph/RADOS.pm (unchanged)
Manifying blib/man3/Ceph::RADOS.3pm
mlsorensen@mlsorensen-pc:~/Downloads/Ceph-RADOS-0.01$ sudo make install
Files found in blib/arch: installing files in blib/lib into
architecture dependent library tree
Installing /usr/local/lib/perl/5.10.1/auto/Ceph/RADOS/RADOS.so
Installing /usr/local/lib/perl/5.10.1/Ceph/RADOS.pm
Installing /usr/local/lib/perl/5.10.1/Ceph/types
Installing /usr/local/man/man3/Ceph::RADOS.3pm
Appending installation info to /usr/local/lib/perl/5.10.1/perllocal.pod
### build/install ceph 0.38 on my local box, start up mon,mds,osd ###
mlsorensen@mlsorensen-pc:~/Downloads/Ceph-RADOS-0.01$ perl testrados2.pl
connected
Kbytes: 175779840
Kbytes used: 151856
Kbytes avail: 171382160
Objects: 39
create pool this_test_pool success
pool:(0) data
pool:(1) metadata
pool:(2) rbd
pool:(4) this_test_pool
open pool success
pool id: 4
pool auid: -1
new pool auid: 232323
delete pool this_test_pool success
On Tue, Nov 15, 2011 at 11:41 PM, Lalit Kumar Bhasin <lkb@one.com> wrote:
> On Wednesday 16 November 2011 11:22 AM, Marcus Sorensen wrote:
>>
>> Yeah, let me tar up the module I have along with the test scripts I
>> was using, I hope it will be useful to you.
>
> Thanks Marcus
>>
>> On Tue, Nov 15, 2011 at 10:48 PM, Lalit Kumar Bhasin<lkb@one.com> wrote:
>>>
>>> Marcus, It would be nice if you can share your code with me. It would
>>> ease
>>> my task as I was planning to write a xs interface for librados.
>>> Unless you have other ideas, I would publish it to cpan once done.
>>>
>>> /Lalit
>>>
>>>
>>>
>>>
>>> On Wednesday 16 November 2011 02:40 AM, Gregory Farnum wrote:
>>>>
>>>> Forwarding to list.
>>>> ---------- Forwarded message ----------
>>>> From: Marcus Sorensen<shadowsor@gmail.com>
>>>> Date: Tue, Nov 15, 2011 at 1:05 PM
>>>> Subject: Re: perl binding for rados ?
>>>> To: Gregory Farnum<gregory.farnum@dreamhost.com>
>>>>
>>>>
>>>> Admittedly they kind of dropped off my radar after it didn't seem to
>>>> Garner much interest. I do however have some code that seems to work
>>>> for connecting, listing pools and devices, basic adding and removing.
>>>> I dont have all of the functions wrapped but at this point I feel like
>>>> it's mainly just a matter of copying what's already there to fill in
>>>> the rest. It uses inline::c . I would be happy to tar up what I have
>>>> and make it available if someone wants to build on ot
>>>>
>>>> On Nov 15, 2011 12:38 PM, "Gregory Farnum"<gregory.farnum@dreamhost.com>
>>>> wrote:
>>>>>
>>>>> On Tue, Nov 15, 2011 at 12:34 AM, Lalit Kumar Bhasin<lkb@one.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Is there any perl bindings available for rados, or be available in
>>>>>> near
>>>>>> furture? I can't find it on cpan. As of now, only way I can see is to
>>>>>> use
>>>>>> librados through perl-XS interface.
>>>>>>
>>>>>> /Lalit
>>>>>
>>>>> All I can give you is a past discussion thread:
>>>>> http://comments.gmane.org/gmane.comp.file-systems.ceph.devel/3792
>>>>>
>>>>> Marcus, did you get anywhere with these?
>>>>> -Greg
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>
>
[-- Attachment #2: Ceph-RADOS-0.01.tar.gz --]
[-- Type: application/x-gzip, Size: 52897 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-16 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 8:34 perl binding for rados ? Lalit Kumar Bhasin
2011-11-15 19:38 ` Gregory Farnum
[not found] ` <CALFpzo71Aq=xLeNx0LztjKgi2hAfEfWEMmVF7SEag7dkJcT=HA@mail.gmail.com>
2011-11-15 21:10 ` Fwd: " Gregory Farnum
[not found] ` <4EC34E9C.5070600@one.com>
[not found] ` <CALFpzo6=kF7MKb9Du7_G8Kd3=nqYfWqBZ6uQWxww223Dr7zdxg@mail.gmail.com>
[not found] ` <4EC35B1A.2030803@one.com>
2011-11-16 15:46 ` Marcus Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.