Re: Fwd: What's the fastest way to try out object classes?

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

 



I installed rados-objclass-dev and objclass.h was installed successfully. However, I failed to run the objclass following the steps as below:

1. copy https://github.com/ceph/ceph/blob/master/src/cls/sdk/cls_sdk.cc into my machine. (cls_test.cpp)
2. make some changes on cls_test.cpp: 1) rename all "sdk" into "test". 2) add "namespace ceph {..}" wrapping the whole code.
3. compile it using the g++: g++ -std=c++11 -fPIC cls_test.cpp --shared -o libcls_test.so
4. copy libcls_test.so to all osds:/usr/lib/rados-classes
5. add two lines in ceph.conf: "osd class load list = *" and "osd class default list = *" and copy to all nodes.
6. restart all nodes in the cluster
7. call the objclass from python code
~~~
ioctx.execute('oid', 'test', 'test_coverage_write', "test")
~~~
I got this error:
~~~
...
File "rados.pyx", line 498, in rados.requires.wrapper.validate_func (/build/ceph-12.2.1/obj-x86_64-linux-gnu/src/pybind/rados/pyrex/rados.c:4922)
File "rados.pyx", line 2751, in rados.Ioctx.execute (/build/ceph-12.2.1/obj-x86_64-linux-gnu/src/pybind/rados/pyrex/rados.c:35467)
rados.OSError: [errno 95] Ioctx.read(test): failed to read oid
~~~
8. calling sdk gave me no error 
~~~
ioctx.execute('oid', 'sdk', 'test_coverage_write', "test")
~~~

Did I do anything wrong here? I hope anyone can help me with this.

Thank you very much,
Zheyuan

On Mon, Oct 30, 2017 at 4:20 PM, Neha Ojha <nojha@xxxxxxxxxx> wrote:
Should be rados-objclass-dev or rados-objclass-devel. Try and let me
know how it goes. Honestly, I've always done it from source :)

On Mon, Oct 30, 2017 at 4:12 PM, Zheyuan Chen <zchen137@xxxxxxxx> wrote:
> Do you know which package should I install?
>
> On Mon, Oct 30, 2017 at 3:54 PM, Neha Ojha <nojha@xxxxxxxxxx> wrote:
>>
>> I am not sure about a docker image, but you should be able to install
>> it through packages.
>>
>> On Mon, Oct 30, 2017 at 3:20 PM, Zheyuan Chen <zchen137@xxxxxxxx> wrote:
>> > Hi Neha,
>> >
>> > Thanks for answering.
>> > Building from source just takes too much time. So I was wondering if
>> > there's
>> > any docker image or prebuilt package already containing objclass.h
>> > If that's the only way, I have to go ahead with it.
>> >
>> > On Mon, Oct 30, 2017 at 3:05 PM, Neha Ojha <nojha@xxxxxxxxxx> wrote:
>> >>
>> >> Hi Zheyuan,
>> >>
>> >> You can build Ceph from source and run make install. This should place
>> >> objclass.h in <prefix>/include/rados/ .
>> >>
>> >> Thanks,
>> >> Neha
>> >>
>> >> On Mon, Oct 30, 2017 at 2:18 PM, Zheyuan Chen <zchen137@xxxxxxxx>
>> >> wrote:
>> >> >
>> >> > ---------- Forwarded message ----------
>> >> > From: Zheyuan Chen <zchen137@xxxxxxxx>
>> >> > Date: Mon, Oct 30, 2017 at 2:16 PM
>> >> > Subject: What's the fastest way to try out object classes?
>> >> > To: ceph-users@xxxxxxxxxxxxxx
>> >> >
>> >> >
>> >> > Hi All,
>> >> >
>> >> > I'd like to try out object classes.
>> >> > http://docs.ceph.com/docs/master/rados/api/objclass-sdk/
>> >> > I used this docker image: https://hub.docker.com/r/ceph/demo/, but
>> >> > found
>> >> > the
>> >> > object class sdk is not included (couldn't find
>> >> > /usr/local/include/rados/objectclass.h) even after I installed
>> >> > librados-devel manually.
>> >> >
>> >> > Do I have to build from the source code if I want to have
>> >> > objectclass.h?
>> >> > What is the fastest way to set up the environment if I want to try
>> >> > out
>> >> > object classes?
>> >> >
>> >> > Thank you very much!
>> >> > Zheyuan
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > ceph-users mailing list
>> >> > ceph-users@xxxxxxxxxxxxxx
>> >> > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>> >> >
>> >
>> >
>
>

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

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


  Powered by Linux