Re: ceph-rest-api's behavior

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

 



On Fri, Mar 24, 2017 at 4:06 PM, Mika c <mika.leaf666@xxxxxxxxx> wrote:
> Hi all,
>      Same question with CEPH 10.2.3 and 11.2.0.
>       Is this command only for client.admin ?
>
> client.symphony
>        key: AQD0tdRYjhABEhAAaG49VhVXBTw0MxltAiuvgg==
>        caps: [mon] allow *
>        caps: [osd] allow *
>
> Traceback (most recent call last):
>  File "/usr/bin/ceph-rest-api", line 43, in <module>
>    rest,
>  File "/usr/lib/python2.7/dist-packages/ceph_rest_api.py", line 504, in
> generate_a
> pp
>    addr, port = api_setup(app, conf, cluster, clientname, clientid, args)
>  File "/usr/lib/python2.7/dist-packages/ceph_rest_api.py", line 106, in
> api_setup
>    app.ceph_cluster.connect()
>  File "rados.pyx", line 811, in rados.Rados.connect
> (/tmp/buildd/ceph-11.2.0/obj-x
> 86_64-linux-gnu/src/pybind/rados/pyrex/rados.c:10178)
> rados.ObjectNotFound: error connecting to the cluster

# strace -eopen /bin/ceph-rest-api |& grep keyring
open("/etc/ceph/ceph.client.restapi.keyring", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/etc/ceph/ceph.keyring", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ceph/keyring", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/etc/ceph/keyring.bin", O_RDONLY) = -1 ENOENT (No such file or directory)

# ceph auth get-or-create client.restapi mon 'allow *' mds 'allow *'
osd 'allow *' >/etc/ceph/ceph.client.restapi.keyring

# /bin/ceph-rest-api
 * Running on http://0.0.0.0:5000/

>
>
>
> Best wishes,
> Mika
>
>
> 2016-03-03 12:25 GMT+08:00 Shinobu Kinjo <shinobu.kj@xxxxxxxxx>:
>>
>> Yes.
>>
>> On Wed, Jan 27, 2016 at 1:10 PM, Dan Mick <dmick@xxxxxxxxxx> wrote:
>> > Is the client.test-admin key in the keyring read by ceph-rest-api?
>> >
>> > On 01/22/2016 04:05 PM, Shinobu Kinjo wrote:
>> >> Does anyone have any idea about that?
>> >>
>> >> Rgds,
>> >> Shinobu
>> >>
>> >> ----- Original Message -----
>> >> From: "Shinobu Kinjo" <skinjo@xxxxxxxxxx>
>> >> To: "ceph-users" <ceph-users@xxxxxxxxxxxxxx>
>> >> Sent: Friday, January 22, 2016 7:15:36 AM
>> >> Subject: ceph-rest-api's behavior
>> >>
>> >> Hello,
>> >>
>> >> "ceph-rest-api" works greatly with client.admin.
>> >> But with client.test-admin which I created just after building the Ceph
>> >> cluster , it does not work.
>> >>
>> >>  ~$ ceph auth get-or-create client.test-admin mon 'allow *' mds 'allow
>> >> *' osd 'allow *'
>> >>
>> >>  ~$ sudo ceph auth list
>> >>  installed auth entries:
>> >>    ...
>> >>  client.test-admin
>> >>       key: AQCOVaFWTYr2ORAAKwruANTLXqdHOchkVvRApg==
>> >>       caps: [mds] allow *
>> >>       caps: [mon] allow *
>> >>       caps: [osd] allow *
>> >>
>> >>  ~$ ceph-rest-api -n client.test-admin
>> >>  Traceback (most recent call last):
>> >>    File "/bin/ceph-rest-api", line 59, in <module>
>> >>      rest,
>> >>    File "/usr/lib/python2.7/site-packages/ceph_rest_api.py", line 504,
>> >> in generate_app
>> >>      addr, port = api_setup(app, conf, cluster, clientname, clientid,
>> >> args)
>> >>    File "/usr/lib/python2.7/site-packages/ceph_rest_api.py", line 106,
>> >> in api_setup
>> >>      app.ceph_cluster.connect()
>> >>    File "/usr/lib/python2.7/site-packages/rados.py", line 485, in
>> >> connect
>> >>      raise make_ex(ret, "error connecting to the cluster")
>> >>  rados.ObjectNotFound: error connecting to the cluster
>> >>
>> >> # ceph version 9.2.0 (bb2ecea240f3a1d525bcb35670cb07bd1f0ca299)
>> >>
>> >> Is that expected behavior?
>> >> Or if I've missed anything, please point it out to me.
>> >>
>> >> Rgds,
>> >> Shinobu
>> >> _______________________________________________
>> >> ceph-users mailing list
>> >> ceph-users@xxxxxxxxxxxxxx
>> >> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>> >>
>> >
>> >
>> > --
>> > Dan Mick
>> > Red Hat, Inc.
>> > Ceph docs: http://ceph.com/docs
>> > _______________________________________________
>> > ceph-users mailing list
>> > ceph-users@xxxxxxxxxxxxxx
>> > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>>
>>
>>
>> --
>> Email:
>> shinobu@xxxxxxxxx
>> GitHub:
>> shinobu-x
>> Blog:
>> Life with Distributed Computational System based on OpenSource
>> _______________________________________________
>> 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
>



-- 
Cheers,
Brad
_______________________________________________
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]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux