Project

General

Profile

Bug #6824

Removal of an OSD that is not down should set non-successful status code

Added by Brian Andrus over 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Joao Eduardo Luis
Category:
Monitor
Target version:
-
% Done:

0%

Source:
Support
Tags:
Backport:
Dumpling
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Revision 15b8616b (diff)
Added by Loïc Dachary over 10 years ago

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 <>

Revision 31507c90 (diff)
Added by Loïc Dachary over 10 years ago

qa: test for error when ceph osd rm is EBUSY

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

Signed-off-by: Loic Dachary <>

Revision ca4540aa (diff)
Added by Loïc Dachary about 10 years ago

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 <>
(cherry picked from commit 15b8616b13a327701c5d48c6cb7aeab8fcc4cafc)

Revision f75c9734 (diff)
Added by Loïc Dachary about 10 years ago

qa: test for error when ceph osd rm is EBUSY

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

Signed-off-by: Loic Dachary <>
(cherry picked from commit 31507c90f0161c4569a2cc634c0b5f671179440a)

Revision 10ad2e01 (diff)
Added by Loïc Dachary about 10 years ago

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 <>
(cherry picked from commit 15b8616b13a327701c5d48c6cb7aeab8fcc4cafc)

Revision 2354b957 (diff)
Added by Loïc Dachary about 10 years ago

qa: test for error when ceph osd rm is EBUSY

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

Signed-off-by: Loic Dachary <>
(cherry picked from commit 31507c90f0161c4569a2cc634c0b5f671179440a)

History

#1 Updated by Loïc Dachary over 10 years ago

  • Status changed from New to 12
  • Assignee set to Loïc Dachary

#2 Updated by Loïc Dachary over 10 years ago

  • Category changed from ceph cli to Monitor
  • Status changed from 12 to Fix Under Review

#3 Updated by Loïc Dachary over 10 years ago

  • Status changed from Fix Under Review to Resolved

#4 Updated by Ian Colle about 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 about 10 years ago

Request to backport fix to Dumpling.

#6 Updated by Sage Weil about 10 years ago

  • Status changed from Pending Backport to Resolved

#7 Updated by Greg Farnum about 10 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?

Also available in: Atom PDF