Bug #9606
openmon: ambiguous error_status returned to user when type is wrong in a command
0%
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
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 ?
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
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 :)
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
Updated by Laura Flores almost 2 years ago
- Translation missing: en.field_tag_list set to low-hanging-fruit