[Bugs] [Bug 1599785] New: _is_prefix should return false for 0-length strings

bugzilla at redhat.com bugzilla at redhat.com
Tue Jul 10 15:16:38 UTC 2018


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

            Bug ID: 1599785
           Summary: _is_prefix should return false for 0-length strings
           Product: GlusterFS
           Version: 4.1
         Component: glusterd
          Assignee: bugs at gluster.org
          Reporter: kaushal at redhat.com
                CC: bugs at gluster.org
        Depends On: 1599783



+++ This bug was initially created as a clone of Bug #1599783 +++

The `_is_prefix` function in glusterd-utils.c is used to check if one of 2
given paths contains the other. When one of the passed paths is a 0-length
string, `_is_prefix` returns true. This is incorrect, as a 0-length string is
not a path, and isn't a prefix of the other.

The current behaviour sometimes causes problems when creating new volumes, as
it causes new brick paths to appear to contain/be contained by old bricks.
Because of issues with volume deletion and volume sync, there are cases when
stale volumes with stale and incomplete brickinfo could be present.


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1599783
[Bug 1599783] _is_prefix should return false for 0-length strings
-- 
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