Was calling messenger destructor before
calling shutdown in case where config
was bad, e.g. in vstart without "-c" flag.
Signed-off-by: John Spray <john.spray@inktank.com>
messenger->start();
// Initialize MonClient
- if (monc->build_initial_monmap() < 0)
+ if (monc->build_initial_monmap() < 0) {
+ messenger->shutdown();
+ messenger->wait();
return -1;
+ }
monc->set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD|CEPH_ENTITY_TYPE_MDS);
monc->set_messenger(messenger);
r = monc->authenticate();
if (r < 0) {
derr << "Authentication failed, did you specify an MDS ID with a valid keyring?" << dendl;
+ monc->shutdown();
+ messenger->shutdown();
+ messenger->wait();
return r;
}