From 300c7584217db9e223f74249027c319f58fab968 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 29 Dec 2011 08:43:41 -0800 Subject: [PATCH] osd: catch authenticate error on startup Signed-off-by: Sage Weil --- src/osd/OSD.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c8683c77b44..467816fe9ef 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -692,7 +692,13 @@ int OSD::init() osd_lock.Unlock(); - monc->authenticate(); + r = monc->authenticate(); + if (r < 0) { + monc->shutdown(); + store->umount(); + return r; + } + monc->wait_auth_rotating(30.0); osd_lock.Lock();