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

mgr: init() return when connection daemons failed && add some err info #11424

Merged
merged 2 commits into from Nov 17, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/mgr/DaemonServer.cc
Expand Up @@ -48,8 +48,10 @@ int DaemonServer::init(uint64_t gid, entity_addr_t client_addr)
msgr = Messenger::create(g_ceph_context, g_conf->ms_type,
entity_name_t::MGR(gid), "server", getpid());
int r = msgr->bind(g_conf->public_addr);
if (r < 0)
if (r < 0) {
derr << "unable to bind mgr to " << g_conf->public_addr << dendl;
return r;
}

msgr->set_myname(entity_name_t::MGR(gid));
msgr->set_addr_unknowns(client_addr);
Expand Down
6 changes: 5 additions & 1 deletion src/mgr/Mgr.cc
Expand Up @@ -148,7 +148,11 @@ void Mgr::init()
assert(!initialized);

// Start communicating with daemons to learn statistics etc
server.init(monc->get_global_id(), client_messenger->get_myaddr());
int r = server.init(monc->get_global_id(), client_messenger->get_myaddr());
if (r < 0) {
derr << "Initialize server fail"<< dendl;
return;
}
dout(4) << "Initialized server at " << server.get_myaddr() << dendl;

// Preload all daemon metadata (will subsequently keep this
Expand Down
1 change: 1 addition & 0 deletions src/mgr/MgrStandby.cc
Expand Up @@ -124,6 +124,7 @@ void MgrStandby::handle_signal(int signum)
{
Mutex::Locker l(lock);
assert(signum == SIGINT || signum == SIGTERM);
derr << "*** Got signal " << sig_str(signum) << " ***" << dendl;
shutdown();
}

Expand Down