Otherwise e.g. a client.admin connectin will fail because the mon doesn't
have the key in the database yet.
Signed-off-by: Sage Weil <sage@redhat.com>
return -EACCES;
}
+ // wait until we've formed an initial quorum on mkfs so that we have
+ // the initial keys (e.g., client.admin).
+ if (authmon()->get_last_committed() == 0) {
+ dout(10) << __func__ << " haven't formed initial quorum, EBUSY" << dendl;
+ return -EBUSY;
+ }
+
RefCountedPtr priv;
MonSession *s;
int32_t r = 0;