Bug 1654521

Summary: io-stats outputs json numbers as strings
Product: [Community] GlusterFS Reporter: Chris Holcombe <xfactor973>
Component: io-statsAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-6.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-25 16:32:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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/