+++ This bug was initially created as a clone of Bug #1648296 +++
Description of problem:
In dht_revalidate_cbk, the stbuf returned by the brick is merged into local->stbuf only if the dir contains a layout. local->stbuf is also used to compare the stbuf returned in responses to check if an attr heal is needed.
If the newly added brick (which does not contain a layout) is the first one to respond, its stbuf is not merged into local->stbuf. Subsequent responses from existing bricks never see a mismatch in the stbuf and self heal is not triggered.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
--- Additional comment from Red Hat Bugzilla Rules Engine on 2018-11-09 05:58:05 EST ---
This bug is automatically being proposed for a Z-stream release of Red Hat Gluster Storage 3 under active development and open for bug fixes, by setting the release flag 'rhgs‑3.4.z' to '?'.
If this bug should be proposed for a different release, please manually change the proposed release flag.
REVIEW: https://review.gluster.org/21611 (cluster/dht: sync brick root perms on add brick) posted (#1) for review on master by N Balachandran
REVIEW: https://review.gluster.org/21611 (cluster/dht: sync brick root perms on add brick) posted (#5) for review on master by N Balachandran
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 , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.