Re: Getting a list of all defined monitors from a client

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

 



Am Dienstag, 23. Juli 2013, 09:01:39 schrieb Sage Weil:
> On Tue, 23 Jul 2013, Gregory Farnum wrote:
> > On Tue, Jul 23, 2013 at 8:50 AM, Guido Winkelmann
> > 
> > <guido-ceph@xxxxxxxxxxxxxxxxx> wrote:
> > > Hi,
> > > 
> > > How can I get a list of all defined monitors in a ceph cluster from a
> > > client when using the C API?
> > > 
> > > I need to store the monitors for available ceph clusters in a database,
> > > and I would like to build this software so that a) the administrator
> > > has to enter only one of the monitor addresses and the software will
> > > automatically fetch the rest once it can reach the cluster and b) the
> > > software will notice if the list of monitors changes in any way and
> > > automatically update its database.> 
> > Hmm, I don't know that there is a C interface for this. You can get
> > the information out of "ceph mon status" or similar (and formatted in
> > json for easy parsing). Dan's been working on making an API for all
> > those monitor commands but I'm not sure where it is in terms of
> > external usability.
> 
> They are in 0.66 and the about-to-be-announced 0.67-rc1:
> 
> int rados_mon_command(rados_t cluster, const char **cmd, size_t cmdlen,
> 		      const char *inbuf, size_t inbuflen,
> 	       	      char **outbuf, size_t *outbuflen,
> 		      char **outs, size_t *outslen);
> 
> and you probably want to do a 'mon dump', where cmd[0] = '{"prefix": "mon
> dump"}' and cmdlen == 1.  You'll get a json result in outbuf, same as the
> 'ceph mon dump' command.


Okay, thanks, I suppose I'll give it a try some time after dumpling is 
released.

	Guido
_______________________________________________
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