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/MonClient: hunt monitors in parallel #11128

Merged
merged 7 commits into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/auth/AuthClientHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AuthClientHandler {
lock("AuthClientHandler::lock") {}
virtual ~AuthClientHandler() {}

void init(EntityName& n) { name = n; }
void init(const EntityName& n) { name = n; }

void set_want_keys(__u32 keys) {
RWLock::WLocker l(lock);
Expand Down
5 changes: 2 additions & 3 deletions src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ int Client::init()
messenger->add_dispatcher_tail(objecter);
messenger->add_dispatcher_tail(this);

monclient->set_want_keys(CEPH_ENTITY_TYPE_MDS | CEPH_ENTITY_TYPE_OSD);
int r = monclient->init();
if (r < 0) {
// need to do cleanup because we're in an intermediate init state
Expand All @@ -488,8 +489,6 @@ int Client::init()
}
objecter->start();

monclient->set_want_keys(CEPH_ENTITY_TYPE_MDS | CEPH_ENTITY_TYPE_OSD);

// logger
PerfCountersBuilder plb(cct, "client", l_c_first, l_c_last);
plb.add_time_avg(l_c_reply, "reply", "Latency of receiving a reply on metadata request");
Expand Down Expand Up @@ -12729,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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
3 changes: 2 additions & 1 deletion src/mds/MDSDaemon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include "messages/MCommandReply.h"

#include "auth/AuthAuthorizeHandler.h"
#include "auth/RotatingKeyRing.h"
#include "auth/KeyRing.h"

#include "common/config.h"
Expand Down Expand Up @@ -1185,7 +1186,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
4 changes: 3 additions & 1 deletion src/mgr/DaemonServer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

#include "DaemonServer.h"

#include "auth/RotatingKeyRing.h"

#include "messages/MMgrOpen.h"
#include "messages/MMgrConfigure.h"
#include "messages/MCommand.h"
Expand Down Expand Up @@ -117,7 +119,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
Original file line number Diff line number Diff line change
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
Loading