Bug 1379328 - Boolean attributes are published as string
Summary: Boolean attributes are published as string
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: eventsapi
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Aravinda VK
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1387099
TreeView+ depends on / blocked
 
Reported: 2016-09-26 11:45 UTC by Aravinda VK
Modified: 2017-03-06 17:27 UTC (History)
0 users

Fixed In Version: glusterfs-3.10.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1387099 (view as bug list)
Environment:
Last Closed: 2017-03-06 17:27:39 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Aravinda VK 2016-09-26 11:45:38 UTC
Description of problem:
Boolean attributes like "force" is published as {"force": "1"} instead of {"force": true}

Comment 1 Worker Ant 2016-09-26 11:47:19 UTC
REVIEW: http://review.gluster.org/15574 (eventsapi: Auto convert Boolean and Int attributes) posted (#1) for review on master by Aravinda VK (avishwan@redhat.com)

Comment 2 Worker Ant 2016-09-29 06:25:11 UTC
REVIEW: http://review.gluster.org/15574 (eventsapi: Auto convert Boolean and Int attributes) posted (#2) for review on master by Aravinda VK (avishwan@redhat.com)

Comment 3 Worker Ant 2016-10-13 05:49:14 UTC
REVIEW: http://review.gluster.org/15574 (eventsapi: Auto convert Boolean and Int attributes) posted (#3) for review on master by Aravinda VK (avishwan@redhat.com)

Comment 4 Worker Ant 2016-10-20 06:10:49 UTC
COMMIT: http://review.gluster.org/15574 committed in master by Aravinda VK (avishwan@redhat.com) 
------
commit a482645865af56b8d34a17430649c3c646f3d450
Author: Aravinda VK <avishwan@redhat.com>
Date:   Mon Sep 26 17:08:31 2016 +0530

    eventsapi: Auto convert Boolean and Int attributes
    
    Before publishing in JSON format, automatically convert the
    attribute to "bool" or "int" if configured.
    
    For example, instead of sending force="1", convert to bool and
    send as force=True
    
    {
        "event": "VOLUME_START",
        "name" : "gv1",
        "force": "1"
    }
    
    Convert to,
    
    {
        "event": "VOLUME_START",
        "name" : "gv1",
        "force": true
    }
    
    BUG: 1379328
    Change-Id: Iabc51fd61abc267a7c8dcf0aeac6b3c722d89649
    Signed-off-by: Aravinda VK <avishwan@redhat.com>
    Reviewed-on: http://review.gluster.org/15574
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Prashanth Pai <ppai@redhat.com>
    Smoke: Gluster Build System <jenkins@build.gluster.org>

Comment 5 Shyamsundar 2017-03-06 17:27:39 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-3.10.0, please open a new bug report.

glusterfs-3.10.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] http://lists.gluster.org/pipermail/gluster-users/2017-February/030119.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.