Project

General

Profile

Actions

Bug #8429

closed

admin socket: commands always return 0 even if erroneous

Added by Joao Eduardo Luis almost 10 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
common
Target version:
-
% Done:

0%

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

Description

It appears that the admin socket interface will only propagate error codes to the user if the command itself outputs said error in the resulting (text) response.

For instance, should a user issue a 'ceph daemon mon.a config set mon_pg_warn_min_objects FOO', the command will return with success while the output will be '{"error" : "error setting 'mon_pg_warn_min_objects' to 'FOO': (22) Invalid argument"}'. This is far from ideal.

In fact, the whole interface doesn't support propagating the return code. In order to change this we must modify class AdminSocket and then adapt the code throughout the tree, including common/ceph_context.cc, mon, osd, and whatever else that makes use of admin sockets.

Actions

Also available in: Atom PDF