Planet Ceph

Aggregated news from external sources

March 28, 2018

The Ceph MON synchronization (election)

The Ceph MON synchronization (election)

Here recently I had got asked a question about Ceph that I wasn’t entirely sure how to answer. It had to do with how the synchronization (election) process worked between monitors. I had an idea, but wasn’t quite sure. So here is a quick synopsis of what I found out.

Ceph monitor needs to join the quorum

When a Ceph monitor needs to regain its status in the cluster, it goes through a pretty simple process. For this purpose, each monitor has a role to play. The roles are as follows:

  • Leader: The leader is the first monitor to achieve the most recent version of the cluster map. And like all good leaders, this monitor will delegate sync duties to a Provider, as not to over burden himself.
  • Provider: When it comes to the Cluster map olympics, this was the guy who got silver. He has the most recent version of the cluster map, he just wasn’t the first to achieve it. He will be delegated sync duties from the Leader and will then sync his cluster map with the …
  • Requester: The monitor that wants to join the cool kids club. He no longer has the most recent info, and will make a request to the leader to to join. Before he can do that though the leader will want him to sync up with another monitor.

Lets see how this process would go in normal operation. If this were from a movie, would it be from “The MONchurian Candidate”?

# Ask to sync
Requester: Hey Leader my cluster map is outta date,
and I want back in to the quorum.
Leader: Look man I really don't have time for this,
talk to Provider Cephmon2 to get back up to speed.
# Sync with provider
Requester: Hey bro, the leader told me to talk to you
about getting the current cluster map.
Provider: No problem, I'll send these over to you in
chances, just let me know you received them ok
Requester: Cool man I got them all and I'm up to date.
# Let the Leader know you're done
Requester: Hey there Leader, my sync is done
everything is good to go.
Leader: It sure is, welcome to Quorum, bro.
### END SCENE ###

And thats it in a nutshell. As always, if this even helped out one admin, then it was well worth it. For a more complete and deep dive into this process check out Ceph Monitor Config Reference. Thanks for reading and feel free to contact me if you have any questions!

Source: Stephen McElroy (The Ceph MON synchronization (election))