Re: Format of option string for rados_conf_set()

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

 



On 05/07/2013 12:08 PM, Guido Winkelmann wrote:
Hi,

The API documentation for librados says that, instead of providing command
line options or a configuration file, the rados object can also be configured
by manually setting options with rados_conf_set() (or Rados::conf_set() for
the C++ interface). This takes both the option and value as C-strings, but the
documentation fails to mention how the string for option should look like.

If I want to set the address for a monitor, would the option be "[mon.alpha]
mon addr" or just "mon addr"? If the latter, how do I set multiple monitor
addresses? Also, how do I set Cephx authentication keys?


The setting is actually "mon_host" and you set it this way:

rados_conf_set(cluster, "mon_host", "127.0.1.1,127.0.1.2,127.0.1.3")

The value for the cephx secret is "key", so you set:

rados_conf_set(cluster, "key", <base64 string of the key>)

Depending on the version you might just for safety enabled cephx:

rados_conf_set(ptr->cluster, "auth_supported", "cephx")

The ID of which you connect with should be set when creating the cluster:

ados_create(&cluster, "admin")

I assume that apart from at least one mon address and an authentication key
(if needed), the rados object will get pretty much all other relevant options
from the cluster once it has connected. Is this correct?


It doesn't get any configuration options, but for a client usually just the monitors and the cephx data is enough.

Wido

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



--
Wido den Hollander
42on B.V.

Phone: +31 (0)20 700 9902
Skype: contact42on
_______________________________________________
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