Bug #20582
common: config showing ints as floats
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Something broke in common/config.cc around printing values, the ints are coming out as floats, and it's breaking tests like this:
2017-07-10T06:37:52.631 INFO:tasks.cephfs_test_runner:====================================================================== 2017-07-10T06:37:52.631 INFO:tasks.cephfs_test_runner:ERROR: test_network_death (tasks.cephfs.test_client_recovery.TestClientNetworkRecovery) 2017-07-10T06:37:52.631 INFO:tasks.cephfs_test_runner:---------------------------------------------------------------------- 2017-07-10T06:37:52.631 INFO:tasks.cephfs_test_runner:Traceback (most recent call last): 2017-07-10T06:37:52.632 INFO:tasks.cephfs_test_runner: File "/home/teuthworker/src/git.ceph.com_ceph_master/qa/tasks/cephfs/cephfs_test_case.py", line 164, in setUp 2017-07-10T06:37:52.632 INFO:tasks.cephfs_test_runner: )[setting])) 2017-07-10T06:37:52.632 INFO:tasks.cephfs_test_runner:ValueError: invalid literal for int() with base 10: '60.000000' 2017-07-10T06:37:52.632 INFO:tasks.cephfs_test_runner: 2017-07-10T06:37:52.632 ERROR:teuthology.run_tasks:Saw exception from tasks. Traceback (most recent call last): File "/home/teuthworker/src/git.ceph.com_git_teuthology_master/teuthology/run_tasks.py", line 89, in run_tasks manager.__enter__() File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "/home/teuthworker/src/git.ceph.com_ceph_master/qa/tasks/cephfs_test_runner.py", line 207, in task raise RuntimeError("Test failure: {0}".format(", ".join(bad_tests))) RuntimeError: Test failure: test_network_death (tasks.cephfs.test_client_recovery.TestClientNetworkRecovery)
http://pulpito.ceph.com/teuthology-2017-07-10_03:15:05-fs-master-distro-basic-smithi/
History
#1 Updated by Zheng Yan over 6 years ago
For float/double config option, the output of 'ceph daemon mds.x config get xxxx' looks like
{ "mds_beacon_grace": "15.000000" }
I think it's test case bug
#2 Updated by John Spray over 6 years ago
- Status changed from New to In Progress
- Assignee set to John Spray
It was this change:
commit 26cb1537c07d020395ee75bb419defef200ecc5a Author: Yanhu Cao <gmayyyha@gmail.com> Date: Tue Jun 13 10:34:10 2017 +0800 common,config: OPT_FLOAT and OPT_DOUBLE output format in "config show" Fixes: http://tracker.ceph.com/issues/20104 Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
It used boost::get<double> to determine if a value should be output as floating point -- unfortunately boost was helpfully casting integers to double.
I'll assign this to myself and fix it as part of the overall config rework that should land in a few days.
#3 Updated by Zheng Yan over 6 years ago
- Status changed from In Progress to Fix Under Review
- Assignee deleted (
John Spray)
#4 Updated by Patrick Donnelly over 6 years ago
- Project changed from CephFS to Ceph
- Subject changed from fs suite failures on getting config opts to common: config showing ints as floats
- Category deleted (
Testing) - Assignee set to John Spray
Reassigning John. I agree `config show` needs fixed, not the tests.
#5 Updated by Patrick Donnelly over 6 years ago
- Status changed from Fix Under Review to In Progress
#6 Updated by John Spray over 6 years ago
- Status changed from In Progress to Fix Under Review
- Assignee changed from John Spray to Zheng Yan
#7 Updated by Patrick Donnelly over 6 years ago
- Project changed from Ceph to CephFS
#8 Updated by Patrick Donnelly over 6 years ago
- Status changed from Fix Under Review to Resolved