From: Joao Eduardo Luis <jecluis@gmail.com>
To: Sage Weil <sage@newdream.net>, John Spray <john.spray@redhat.com>
Cc: kefu chai <tchaikov@gmail.com>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: adding "{mds,mon} metadata" asok command
Date: Tue, 24 Mar 2015 10:11:36 +0000 [thread overview]
Message-ID: <55113858.50301@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1503230656560.6964@cobra.newdream.net>
On 03/23/2015 01:58 PM, Sage Weil wrote:
> On Mon, 23 Mar 2015, John Spray wrote:
>> On 23/03/2015 10:04, Joao Eduardo Luis wrote:
>>> I agree. And I don't think we need a new service for this, and I also don't
>>> think we need to write stuff to the store. We can generate this information
>>> when the monitor hits 'bootstrap()' and share it with the rest of the quorum
>>> once an election finishes, and always keep it in memory (unless there's some
>>> information that needs to be persisted, but I was under the impression that
>>> was not the case).
>>
>> Just to clarify, you mean we don't need to write the mon metadata to the
>> store, but we'd still want to persist the MDS/OSD metadata - right?
>
> I think we definitely still want to persist those (as we already do
> persist the OSD metadata).
>
> Since we're reporting on running daemons we could get that without
> persisting the mon metadata. I think the question is whether we want to
> report on the last known running instance. I forget whether 'osd
> metadata' includes OSDs that are down... if so, we may as well do
> the same for mons too and persist that.
>
Yeah, we may persist the info if we intend on reporting on down/out of
quorum monitors. In that case, I don't think we need anything
particularly fancy. Something like:
1. on finish_election() send metadata info to leader
2. leader coalesces all quorum participants info
3. leader gets last known metadata:
last_metadata = store->get(MONITOR_STORE_PREFIX, "last_metadata");
4. Fill whatever is missing on the this quorum's metadata (down mons and
what not):
new_metadata.fill_gaps_and_stuff(last_metada);
5. leader creates a store transaction:
MonitorDBStore::TransactionRef t = paxos->get_pending_transaction();
t->put(Monitor::MONITOR_STORE_PREFIX, "last_metadata", new_metadata);
paxos->trigger_propose();
This should do nicely, and it will only take adding a new message type
and a few functions to the Monitor class that will handle that message
type. I don't think we need to enforce the same restrictions that
PaxosService does, so that will simplify things a lot.
Also, just thought that a good way to version the metadata struct would
be to use the election epoch.
Anyway, on reporting it would be nice if we were to clearly state that
the hostname may not be current, if the mon is not in quorum. I don't
think people change hostnames for sport, but I can imagine an instance
in which someone changed a given hostname, kept the IP just the same,
and then got confused seeing the old hostname being reported by ceph mon
metadata (or wtv).
-Joao
--
Joao Eduardo Luis | github.com/jecluis
next prev parent reply other threads:[~2015-03-24 10:11 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
[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 [this message]
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=55113858.50301@gmail.com \
--to=jecluis@gmail.com \
--cc=ceph-devel@vger.kernel.org \
--cc=john.spray@redhat.com \
--cc=sage@newdream.net \
--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.