All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: new rados whereis command
@ 2014-12-23 22:22 Loic Dachary
  2014-12-25 12:52 ` Wido den Hollander
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Loic Dachary @ 2014-12-23 22:22 UTC (permalink / raw)
  To: Andreas-Joachim Peters; +Cc: Ceph Development

[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]

Hi Andreas,

I took a closer look at https://github.com/ceph/ceph/pull/2730 implementing rados whereis [--dns] and I think it deserves a discussion here. If I understand correctly, it relies on a new function of the rados API:

  typedef struct whereis {
    int64_t osd_id;                              //< ID of the OSD hosting this object
    std::string osd_state;                       //< state of the OSD - either 'active' or 'inactive'
    int64_t pg_seed;                             //< Seed of the PG hosting this object
    std::string ip_string;                       //< Ip as string
    std::vector<std::string> host_names;         //< optional reverse DNS HostNames
    std::map<std::string, std::string> user_map; //< optional user KV map
    void resolve();                              //< reverse DNS OSD IPs and store in HostNames
  } whereis_t;

  static int whereis(IoCtx &ioctx, const std::string &oid, std::vector<whereis_t> &locations);

which needs to be added there because the rados API does not expose some details that are needed to fill the fields of the whereis_t structure.

It looks fine to me but ... I'm not used to maintaining or developing the rados API and someone else may have a more informed opinion.

There is a technical detail that also needs to be sorted out : the current implementation exposes the RadosWhereis class (for dump) and this should either be moved to rados.cc or be part of the rados API (which probably is not the best option because it would also expose Formatter as a consequence).

Cheers
-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-09 15:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23 22:22 RFC: new rados whereis command Loic Dachary
2014-12-25 12:52 ` Wido den Hollander
2014-12-26  7:54 ` Mykola Golub
2014-12-29 20:08 ` Sage Weil
2015-01-09 15:21   ` Andreas Joachim Peters

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.