Bug 1654521 - io-stats outputs json numbers as strings
Summary: io-stats outputs json numbers as strings
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: io-stats
Version: 4.1
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-29 00:40 UTC by Chris Holcombe
Modified: 2019-03-25 16:32 UTC (History)
1 user (show)

Fixed In Version: glusterfs-6.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-25 16:32:19 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 21753 0 None Merged debug/io-stats: Fix json output 2018-12-05 15:04:56 UTC

Description Chris Holcombe 2018-11-29 00:40:14 UTC
Description of problem: The json output of the io-stats debug xlator quotes the numbers as strings instead of just printing them as numbers.  This makes parsing them in a strongly typed language more difficult than it should be.  This is an easy fix so I'll be following up with a patch to correct the output.  


Version-Release number of selected component (if applicable):
As far as I know it's been like this since first released.  Commit: d3e496cbcd35b9d9b840e328ae109c44f59083ce and bug id: 1271310

How reproducible: Easily reproducible by enabling the iostats fop diagnostics.  

Steps to Reproduce:
1. Setup a gluster volume called gv0
2. gluster vol set gv0 diagnostics.dump-fd-stats on
3. gluster vol set gv0 diagnostics.count-fop-hits on
4. gluster vol set gv0 diagnostics.stats-dump-interval 10
5. gluster vol set gv0 diagnostics.fop-sample-interval 10
6. Observe output in /var/lib/glusterd/stats/xxx.dump files

Actual results:
Json entries look like this:
"gluster.brick._mnt_brick.inter.bytes_written_per_sec": "0.00"

Expected results:
Json entries should look like this:
"gluster.brick._mnt_brick.inter.bytes_written_per_sec": 0.00


Additional info:

Comment 1 Worker Ant 2018-11-29 00:51:11 UTC
REVIEW: https://review.gluster.org/21745 (debug/io-stats: Fix json output) posted (#1) for review on master by None

Comment 2 Worker Ant 2018-11-29 18:31:49 UTC
REVIEW: https://review.gluster.org/21753 (debug/io-stats: Fix json output) posted (#1) for review on master by None

Comment 3 Worker Ant 2018-12-05 15:04:55 UTC
REVIEW: https://review.gluster.org/21753 (debug/io-stats: Fix json output) posted (#4) for review on master by Amar Tumballi

Comment 4 Shyamsundar 2019-03-25 16:32:19 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-6.0, please open a new bug report.

glusterfs-6.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2019-March/000120.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.