All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Spray <john.spray@redhat.com>
To: kefu chai <tchaikov@gmail.com>,
	"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: adding "{mds,mon} metadata" asok command
Date: Fri, 20 Mar 2015 11:43:21 +0000	[thread overview]
Message-ID: <550C07D9.30700@redhat.com> (raw)
In-Reply-To: <CAJE9aOP2g4=Pw-oGY4m90aXayc=Kx_GP8yLC+tTkSE62V6ObuQ@mail.gmail.com>

On 20/03/2015 05:39, kefu chai wrote:
> to pave the road to http://tracker.ceph.com/issues/10904, where we
> need to add a command to list the hostname of nodes in a ceph cluster,
> i would like to add the "{mds,mon} metadata" commands to print the
> system information including, but not limited to hostname,
> mem_{total,swap}_kb, and distro info, of specified mds and mon.
>
> the implementation follow the mechanism of "osd metadata":
>
> on the mds side i would like to reuse the MDSMonitor service:
> 1. piggy back a map for the metadata in MMDSBeacon message,
> 2. put the metadata into the same DBStore transaction but with another
> prefix when storing the pending inc into local storage.
> 3. and expose it using the "mds metadata" and later on the "service
> ls" (not sure about the name ...)
>
> @greg and @zyan, are you good with this? not sure this will overburden
> the mds or not. i will use uname(2) and grep /proc/meminfo to get the
> metadata in the same way of OSD.
It should be straightforward to include the metadata in MMDSBeacon only 
once per daemon lifetime, by checking if state is CEPH_MDS_STATE_BOOT -- 
that way we don't have to worry about any ongoing costs.  I expect that 
change can live entirely in Beacon.cc without touching any other MDS code.

As for the means of getting the information, I expect the generic 
kernel/mem/cpu/distro stuff from OSD::_collect_metadata can be moved up 
into common/ somewhere and reused as-is from mon+mds.

John

  reply	other threads:[~2015-03-20 11:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20  5:39 adding "{mds,mon} metadata" asok command kefu chai
2015-03-20 11:43 ` John Spray [this message]
     [not found]   ` <CAJE9aOPK6Qge8BNvB0na2-Y_12THB2aSmk-wvpPytAwcjonMGQ@mail.gmail.com>
2015-03-20 15:58     ` Fwd: " kefu chai
2015-03-20 13:30 ` Sage Weil
2015-03-20 16:04   ` kefu chai
2015-03-23 10:04   ` Joao Eduardo Luis
2015-03-23 10:35     ` John Spray
2015-03-23 13:58       ` Sage Weil
2015-03-24 10:11         ` Joao Eduardo Luis
2015-03-24 10:20           ` John Spray
2015-03-25 18:18         ` kefu chai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=550C07D9.30700@redhat.com \
    --to=john.spray@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=tchaikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.