This is a new class with a new grammer. Implementation is modeled after
OSDCap, and the semantics are based on the old MonCaps, although somewhat
different (though not in too many important ways, I think).
Note that we complete drop auid support; the semantics for that were a
complete mess.
Signed-off-by: Sage Weil <sage@inktank.com>
Old ceph-mon (prior to 393c9372f8) would
return an empty string and success if the command was not registered yet.
Gracefully handle that case by retrying.
If we still fail to parse, exit entirely with EINVAL.
Fixes: #4952
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@intank.com>
If get or create keys returns permssion denied, exit
gracefully instead of retrying.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
This should help simplify Chef etc deployments. Now (when using the
Upstart jobs), when a ceph-mon is started, ceph-create-admin-key is
triggered. If /etc/ceph/$cluster.client.admin.keyring already exists,
it does nothing; otherwise, it waits for ceph-mon to reach quorum, and
then does a "ceph auth get-or-create" to create the key, and writes it
atomically to disk.
The equivalent code can be removed from the Chef cookbook once this is
in.