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.
REVIEW: https://review.gluster.org/20490 (glusterd: _is_prefix should handle 0-length paths) posted (#1) for review on master by Kaushal M
COMMIT: https://review.gluster.org/20490 committed in master by "Kaushal M" <kaushal> with a commit message- glusterd: _is_prefix should handle 0-length paths If one of the paths given to _is_prefix is 0-length, then it is not a prefix of the other. Hence, _is_prefix should return false. Change-Id: I54aa577a64a58940ec91872d0d74dc19cff9106d fixes: bz#1599783 Signed-off-by: Kaushal M <kaushal>
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-5.0, please open a new bug report. glusterfs-5.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/2018-October/000115.html [2] https://www.gluster.org/pipermail/gluster-users/