Skip to content

Commit

Permalink
mon/monclient: hunt for multiple monitor in parallel
Browse files Browse the repository at this point in the history
* add an option "mon_client_hunt_parallel" for the maxmimum number of parallel
  hunting sessions.

Fixes: http://tracker.ceph.com/issues/16091
Signed-off-by: Steven Dieffenbach <sdieffen@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Feb 14, 2017
1 parent 8729e1e commit a2eb6ae
Show file tree
Hide file tree
Showing 12 changed files with 451 additions and 286 deletions.
2 changes: 1 addition & 1 deletion src/client/Client.cc
Expand Up @@ -12728,7 +12728,7 @@ bool Client::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool
{
if (dest_type == CEPH_ENTITY_TYPE_MON)
return true;
*authorizer = monclient->auth->build_authorizer(dest_type);
*authorizer = monclient->build_authorizer(dest_type);
return true;
}

Expand Down
24 changes: 0 additions & 24 deletions src/common/SimpleRNG.h

This file was deleted.

1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -398,6 +398,7 @@ OPTION(cephx_sign_messages, OPT_BOOL, true) // Default to signing session messa
OPTION(auth_mon_ticket_ttl, OPT_DOUBLE, 60*60*12)
OPTION(auth_service_ticket_ttl, OPT_DOUBLE, 60*60)
OPTION(auth_debug, OPT_BOOL, false) // if true, assert when weird things happen
OPTION(mon_client_hunt_parallel, OPT_U32, 2) // how many mons to try to connect to in parallel during hunt
OPTION(mon_client_hunt_interval, OPT_DOUBLE, 3.0) // try new mon every N seconds until we connect
OPTION(mon_client_ping_interval, OPT_DOUBLE, 10.0) // ping every N seconds
OPTION(mon_client_ping_timeout, OPT_DOUBLE, 30.0) // fail if we don't hear back
Expand Down
2 changes: 1 addition & 1 deletion src/librados/RadosClient.cc
Expand Up @@ -60,7 +60,7 @@ bool librados::RadosClient::ms_get_authorizer(int dest_type,
/* monitor authorization is being handled on different layer */
if (dest_type == CEPH_ENTITY_TYPE_MON)
return true;
*authorizer = monclient.auth->build_authorizer(dest_type);
*authorizer = monclient.build_authorizer(dest_type);
return *authorizer != NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/mds/MDSDaemon.cc
Expand Up @@ -1185,7 +1185,7 @@ bool MDSDaemon::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bo
return false;
}

*authorizer = monc->auth->build_authorizer(dest_type);
*authorizer = monc->build_authorizer(dest_type);
return *authorizer != NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/mgr/DaemonServer.cc
Expand Up @@ -117,7 +117,7 @@ bool DaemonServer::ms_get_authorizer(int dest_type,
return false;
}

*authorizer = monc->auth->build_authorizer(dest_type);
*authorizer = monc->build_authorizer(dest_type);
dout(20) << "got authorizer " << *authorizer << dendl;
return *authorizer != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mgr/MgrStandby.cc
Expand Up @@ -211,7 +211,7 @@ bool MgrStandby::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer,
return false;
}

*authorizer = monc->auth->build_authorizer(dest_type);
*authorizer = monc->build_authorizer(dest_type);
return *authorizer != NULL;
}

Expand Down

0 comments on commit a2eb6ae

Please sign in to comment.