Project

General

Profile

Actions

Bug #9606

open

mon: ambiguous error_status returned to user when type is wrong in a command

Added by Christina Meno over 9 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Administration/Usability
Target version:
-
% Done:

0%

Source:
Development
Tags:
low-hanging-fruit
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Monitor
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

ubuntu@vpm115:~$ sudo python ceph.py 
['{"prefix": "osd crush add-bucket", "type": "host", "name": "a7e06cd2-45a8-11e4-bf78-5254003aa6a0", "format": "json"}'] to mon
{'versions': {'osd_map': 53, 'pg_summary': '405c0c5d6700b861d74286f50516a4f9', 'mds_map': 1, 'mon_status': 36, 'health': '103c8b9adfecfbe6fba778fd6335e327', 'mon_map': 1, 'config': 'f60a9b20ef912e78e656c8da65ca8158'}, 'error_status': '', 'results': [None], 'fsid': 12345, 'error': False}
['{"prefix": "osd crush add", "args": ["host=a7e06cd2-45a8-11e4-bf78-5254003aa6a0"], "id": "1", "weight": 0.0, "format": "json"}'] to mon
{'versions': {'osd_map': 53, 'pg_summary': '405c0c5d6700b861d74286f50516a4f9', 'mds_map': 1, 'mon_status': 36, 'health': '103c8b9adfecfbe6fba778fd6335e327', 'mon_map': 1, 'config': 'f60a9b20ef912e78e656c8da65ca8158'}, 'error_status': '(22) Invalid argument', 'results': [], 'fsid': 12345, 'error': True}

cranking the mon log gives:
2014-09-26 18:12:20.401645 7ff2d9256700 -1 bad boost::get: key id is not type long


Files

ceph.py (20.5 KB) ceph.py Christina Meno, 09/26/2014 11:18 AM
Actions #1

Updated by Loïc Dachary over 9 years ago

ceph.in uses ceph_argparse to validate the arguments client side you could use the same to avoid that until this is fixed ?

Actions #2

Updated by Dan Mick over 9 years ago

This may be easier if/when ceph_argparse gets made into a proper Python package; I hear there is renewed interest in that

Actions #3

Updated by Joao Eduardo Luis over 9 years ago

  • Subject changed from ambiguous error_status when type is wrong in a rados command to mon: ambiguous error_status returned to user when type is wrong in a command
  • Category set to Monitor
  • Status changed from New to 12
  • Source changed from other to Development
  • Tags set to low-hanging-fruit

regardless of this being properly parsed on the client or not, the monitor should not rely on client argument validation (which it clearly does not) and should spit out a helpful error (which it clearly does not).

This however needs to be done on a per-command basis and is not high on the priority list. Also setting this as low-hanging-fruit hoping that someone will get to it before then :)

Actions #4

Updated by Greg Farnum almost 7 years ago

  • Project changed from Ceph to RADOS
  • Category changed from Monitor to Administration/Usability
  • Component(RADOS) Monitor added
Actions #5

Updated by Patrick Donnelly over 4 years ago

  • Status changed from 12 to New
Actions #6

Updated by Laura Flores almost 2 years ago

  • Translation missing: en.field_tag_list set to low-hanging-fruit
Actions

Also available in: Atom PDF