Commit Graph

8 Commits

Author SHA1 Message Date
Sage Weil
1123fc293f mon/MonCap: add new MonCap implementation
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>
2013-05-21 16:23:43 -07:00
Sage Weil
e2528ae42c ceph-create-keys: gracefully handle no data from admin socket
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>
2013-05-08 14:54:33 -07:00
Gary Lowell
1a8b30eff1 ceph-create-keys: Don't wait if permission denied
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>
2013-04-21 22:08:49 -07:00
Danny Al-Gaaf
e2df59e245 ceph-create-keys: rename log to LOG since it's a constants
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-21 17:13:26 +01:00
Sage Weil
809143f16c ceph-create-keys: create mds bootstrap key
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-13 12:30:22 -08:00
Tommi Virtanen
1f3a50a521 ceph-create-keys: Refactor to share wait_for_quorum call.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-10-05 11:09:06 -07:00
Tommi Virtanen
4302f12a60 ceph-create-keys: Create a bootstrap-osd key too.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-10-05 11:09:06 -07:00
Tommi Virtanen
f2c4510848 upstart, ceph-create-keys: Make client.admin key generation automatic.
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.
2012-08-30 13:41:20 -04:00