Bug #6824
Removal of an OSD that is not down should set non-successful status code
0%
Description
A customer reports that some ceph commands return a status code of 0, even when they failed. The provided example was for removing an OSD that is still up (ceph osd rm). ceph will even return successful when a non-valid OSD id is provided.
An audit should be considered for other ceph sub-commands to ensure that status codes are standardized and accurate.
Associated revisions
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>
qa: test for error when ceph osd rm is EBUSY
http://tracker.ceph.com/issues/6824 fixes #6824
Signed-off-by: Loic Dachary <loic@dachary.org>
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)
qa: test for error when ceph osd rm is EBUSY
http://tracker.ceph.com/issues/6824 fixes #6824
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 31507c90f0161c4569a2cc634c0b5f671179440a)
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)
qa: test for error when ceph osd rm is EBUSY
http://tracker.ceph.com/issues/6824 fixes #6824
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 31507c90f0161c4569a2cc634c0b5f671179440a)
History
#1 Updated by Loïc Dachary almost 10 years ago
- Status changed from New to 12
- Assignee set to Loïc Dachary
#2 Updated by Loïc Dachary almost 10 years ago
- Category changed from ceph cli to Monitor
- Status changed from 12 to Fix Under Review
#3 Updated by Loïc Dachary almost 10 years ago
- Status changed from Fix Under Review to Resolved
#4 Updated by Ian Colle almost 10 years ago
- Status changed from Resolved to Pending Backport
- Assignee changed from Loïc Dachary to Joao Eduardo Luis
- Backport set to Dumpling
#5 Updated by Ian Colle almost 10 years ago
Request to backport fix to Dumpling.
#6 Updated by Sage Weil almost 10 years ago
- Status changed from Pending Backport to Resolved
#7 Updated by Greg Farnum over 9 years ago
I missed this when it was going by, but it looks like that patch makes things like "osd down" and "osd out" no longer idempotent?