Hi David,

Thanks for the reply...I had thought there might be something simple like
this, do you know what key I should use in the config file to specify the
user? I didn't see anything related to user specification in the
documentation.

Thanks,
Ben

On Sun, Aug 19, 2018 at 8:02 PM, David Turner <drakonst...@gmail.com> wrote:

> You are not specifying which user you are using. Your config file
> specifies the keyring, but it's still trying to use the default user admin.
> If you specify that in your python you'll be good to go.
>
> On Sun, Aug 19, 2018, 9:17 PM Benjamin Cherian <benjamin.cher...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm trying to write a simple test application using the Python 3 RADOS
>> API. I've made a separate keyring for my application with the same
>> permissions as the admin keyring, but I can't seem to use it to connect to
>> my cluster. The only keyring that seems to work is the client.admin
>> keyring. Does anyone have any experience with this issue?
>>
>> Cluster info:
>> OS: Ubuntu 18.04.1
>> Ceph: Mimic 13.2.1 (from Ceph repository)
>>
>> Attempting to connect to the cluster using python3-rados or python-rados
>> results in the following error:
>>
>> >>> import rados
>> >>> cluster = rados.Rados(conffile="python_ceph.conf")
>> >>> cluster.connect()
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "rados.pyx", line 895, in rados.Rados.connect
>>   File "rados.pyx", line 474, in rados.make_ex
>> TypeError: InvalidArgumentError does not take keyword arguments
>>
>> Contents of python_ceph.conf:
>>
>> [global]
>> cluster network = 0.0.0.0/0
>> fsid = 518403a0-6b6f-42b8-be99-e58788bee5c2
>> mon host = <redacted>
>> mon initial members = <hostname of monitor>
>> mon_allow_pool_delete = True
>> osd crush chooseleaf type = 0
>> public network = 0.0.0.0/0
>>
>> keyring = /etc/ceph/ceph.client.dms.keyring # Everything works ok if i
>> use client.adming.keyring
>>
>>
>>
>> Output of ceph auth ls
>>
>> ...
>> client.admin
>>         key: <Redacted>
>>         caps: [mds] allow *
>>         caps: [mgr] allow *
>>         caps: [mon] allow *
>>         caps: [osd] allow *
>> ...
>> client.dms
>>         key: <redacted, but matches contents of keyring file>
>>         caps: [mgr] allow *
>>         caps: [mon] allow *
>>         caps: [osd] allow *
>>
>> ...
>>
>>
>> What's even more odd is that I can use client.dms keyring with the ceph
>> command line program without issues...
>> e.g., "ceph --user dms status" does not result in any errors has the
>> same output as "ceph --user admin status"
>>
>>
>> Does anyone have any thoughts on what could be causing this issue?
>>
>>
>> Thanks,
>> Ben
>> _______________________________________________
>> ceph-users mailing list
>> ceph-users@lists.ceph.com
>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>>
>
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to