Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon:Re join the Monitor alone to form a cluster when it's rank=0 #7124

Closed
wants to merge 1 commit into from
Closed

mon:Re join the Monitor alone to form a cluster when it's rank=0 #7124

wants to merge 1 commit into from

Conversation

renhwztetecs
Copy link
Contributor

Increase whether there is Monitor extra judgment. when there is Monitor information in the extra_probe_peers, it does not enter the win_standalone_election() process

Fixes: #14263
Signed-off-by: huanwen ren ren.huanwen@zte.com.cn

Increase whether there is Monitor extra judgment. when there is Monitor information in the extra_probe_peers,
it does not enter the win_standalone_election() process

Fixes: #14263
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
@renhwztetecs
Copy link
Contributor Author

@jecluis
Increase whether there is Monitor extra judgment. when there is Monitor information in the extra_probe_peers, it does not enter the win_standalone_election() process

I'm not sure if this change is the most appropriate, please help to retrieve
thank you

@renhwztetecs
Copy link
Contributor Author

I tested a variety of scenes are no problem, and can be modified bug
Http://tracker.ceph.com/issues/14263

@jecluis
Copy link
Member

jecluis commented Jan 8, 2016

I need to take a better look at this - I'll do it later today.

@renhwztetecs
Copy link
Contributor Author

@jdurgin
thank you for your attention

@gregsfortytwo
Copy link
Member

I'm not sure what this is trying to do. extra_probe_peers get added to the monmap when we're setting up a new one (that is, when we haven't already been in a quorum), so monmap->size()==1 already implies there are no extra_probe_peers when starting up for the first time. If we're starting up after having already been in a quorum, the extra_probe_peers don't matter as we already have knowledge of the system's genuine state.

@renhwztetecs
Copy link
Contributor Author

@gregsfortytwo
verification according to http://tracker.ceph.com/issues/14263 process:
At the start of the ceph240 ceph-mon found monmap->size () = = 1 when set mon initial members = "ceph240" in ceph.conf, and "monitor::handle probe probe()" function to obtain cluster has the monitor data, which can get extra_probe_peers= "ceph243" "ceph244"
So monitor::bootstrap process will enter:
if (monmap->size() == 1 && rank == 0){
win_standalone_election();
return;
}
note:ceph240 rank = 0

@renhwztetecs
Copy link
Contributor Author

@gregsfortytwo
remove a monitor in the cluster, need to call extra_probe_peers.erase to remove the corresponding monitor, to prevent the cluster in only one node, can not enter this process and abnormal:
if (monmap->size() == 1 && rank == 0 && extra_probe_peers.empty()) {
win_standalone_election();
return;
}

@gregsfortytwo
Copy link
Member

Yeah, in that ticket you set up mon240 with an existing monmap that only contains itself. That's expected behavior; you needed to tell it to join up with the others. See http://docs.ceph.com/docs/master/rados/operations/add-or-rm-mons/ for instructions.

@gregsfortytwo
Copy link
Member

Wait, I misread the steps you followed.

Still, I think you've misdiagnosed the problem. The new monitor is somehow losing track of the existing monitors which should be in its map.

@renhwztetecs
Copy link
Contributor Author

@gregsfortytwo @liewegas
I don't agree with this conclusion, according to the http://tracker.ceph.com/issues/14263 problem described in the construction, and add the following printed in the code:

Monitor::bootstrap()
{
......
dout(10) << " monmap is " << *monmap << dendl;
dout(10) << " extra probe peers " << extra_probe_peers << dendl;

// singleton monitor?
if (monmap->size() == 1 && rank == 0) {
win_standalone_election();
return;
}
......
}

@renhwztetecs
Copy link
Contributor Author

@ gregsfortytwo
when a new Monitor to join the cluster, through handle_probe_probe () detects the existing Monitor, but if the handle_probe_probe () before testing, judgment entered win_standalone_election() process, then there will be a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants