Actions
Bug #40294
openlibrados mon_command json parser int/float type problem
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
for some commands there is a parameterof type float,
e.g. for 'osd reweight' there is the parameter 'weight' of type float (with a range of 0.0 to 1.0)
when giving such command as json to rados_mon_command
e.g.
{ "prefix":"osd reweight", "id":0, "weight":0.0 }
it works, but
{ "prefix":"osd reweight", "id":0, "weight": 0 }
does not
this is a problem, since json does not define different types of numbers, so 0.0 and 0 should be treated the same
and some json encoders will convert 0.0 to 0 (e.g. in Perl using JSON::encode_json)
Files
Actions