Hide Forgot
PATCH: http://patches.gluster.com/patch/864 in master (dht_stat_merge - use the highest uid when ambiguous)
PATCH: http://patches.gluster.com/patch/863 in release-2.0 (dht_stat_merge - use the highest uid when ambiguous)
It was observed in samba logs that stat() and statfs() calls on files in glusterfs would randmoly return EACCESS (Permission denied). After debugging further it was found that the ownership of certain directories were returned differently, resulting in the VFS returning EACCESS. The actual reason is the way distribute's directory self-heal creates missing directories on newly added nodes. The modes are created properly but the directory is owned by root/root. Depending on the order in which attributes are unwound in lookup_dir_cbk, the last call of dht_stat_merge decides the final uid/gid of the directory. This could end up being the directory from the newly added node having uid/gid as root/root.