]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: set ceph osd (down|out|in|rm) error code on failure
authorLoic Dachary <loic@dachary.org>
Sun, 15 Dec 2013 15:27:02 +0000 (16:27 +0100)
committerSage Weil <sage@inktank.com>
Mon, 30 Dec 2013 21:07:10 +0000 (13:07 -0800)
commitca4540aa5659f77c1a15a3e0702329ec1964e538
treeaa4266e4177a28f67755d3a143fbed2702fdf4bc
parentf862c53010d1de528846bd2f2c4e5dfbbf6b709d
mon: set ceph osd (down|out|in|rm) error code on failure

Instead of always returning true, the error code is set if at least one
operation fails.

EINVAL if the OSD id is invalid (osd.foobar for instance).
EBUSY if trying to remove and OSD that is up.

When used with the ceph command line, it looks like this:

    ceph -c ceph.conf osd rm osd.0
    Error EBUSY: osd.0 is still up; must be down before removal.
    kill PID_OF_osd.0
    ceph -c ceph.conf osd down osd.0
    marked down osd.0.
    ceph -c ceph.conf osd rm osd.0 osd.1
    Error EBUSY: removed osd.0, osd.1 is still up; must be down before removal.

http://tracker.ceph.com/issues/6824 fixes #6824

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 15b8616b13a327701c5d48c6cb7aeab8fcc4cafc)
src/mon/OSDMonitor.cc