[Bugs] [Bug 1388563] [Eventing]: 'VOLUME_REBALANCE' event messages have an incorrect volume name

bugzilla at redhat.com bugzilla at redhat.com
Tue Oct 25 16:29:54 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1388563



--- Comment #2 from Nithya Balachandran <nbalacha at redhat.com> ---
RCA:

Gluster translators do not store the actual volume name anywhere. Each
translator appends a specific string to the volume name and stores this value
in this->name.
For dht, the suffix is "-dht" so this->name actually contains <volname>-dht.

The event framework requires the actual volume name to be sent. The rebalance
code incorrectly used strtok to parse the volume name by using "-dht" as the
delimiter. strtok () treats every char in the delim string as a delimiter. So
the parsing fails for a volume which contains 'd', 'h', or 't' in its name.

Fix:
The code was rewritten to use strstr instead.

--- Additional comment from Worker Ant on 2016-10-25 07:09:26 EDT ---

COMMIT: http://review.gluster.org/15712 committed in master by Raghavendra G
(rgowdapp at redhat.com) 
------
commit f4efbf0e3092bd2181f62be1e1f30f202678c866
Author: N Balachandran <nbalacha at redhat.com>
Date:   Mon Oct 24 13:54:41 2016 +0530

    cluster/dht: Incorrect volname in rebalance events

    The rebalance event code was using strtok to parse the
    volume name which is incorrect.
    Reworked the code to get the correct volume name using
    strstr.

    Change-Id: Ib5f3305a34e6bf1ecfef677d87c5aff96bdeb0e6
    BUG: 1388010
    Signed-off-by: N Balachandran <nbalacha at redhat.com>
    Reviewed-on: http://review.gluster.org/15712
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list