Bug 1371806
| Summary: | DHT :- inconsistent 'custom extended attributes',uid and gid, Access permission (for directories) if User set/modifies it after bringing one or more sub-volume down | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Mohit Agrawal <moagrawa> |
| Component: | distribute | Assignee: | Mohit Agrawal <moagrawa> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | mainline | CC: | bugs, moagrawa, mzywusko, nbalacha, racpatel, rgowdapp, rhs-bugs, rwheeler, sdharane, smohan, storage-qa-internal, vbellur |
| Target Milestone: | --- | Keywords: | Triaged, ZStream |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | dht-dir-attr-xattr-heal | ||
| Fixed In Version: | glusterfs-3.13.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1286036 | Environment: | |
| Last Closed: | 2017-12-08 17:32:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1286036, 1532109 | ||
| Bug Blocks: | 1064147 | ||
|
Description
Mohit Agrawal
2016-08-31 07:22:44 UTC
REVIEW: http://review.gluster.org/15369 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#1) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15369 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#2) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15369 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#3) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15369 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#4) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15456 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#1) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15456 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#2) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#1) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#2) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#3) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#4) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#5) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#6) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#7) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#8) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#9) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#10) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#11) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#12) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#13) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#14) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#15) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#16) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#17) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#18) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (WIP cluster/dht: User xattrs value is not correct after brick stop/start) posted (#19) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#20) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#21) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: http://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#22) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#23) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#24) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#25) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#26) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#27) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#28) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#29) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#30) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#31) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#32) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#33) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#34) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#35) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#36) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#37) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#38) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#39) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#40) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP): User xattrs value is not correct after brick stop/start) posted (#41) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#42) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#43) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#44) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#45) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#46) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#47) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht: User xattrs value is not correct after brick stop/start) posted (#48) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#49) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#50) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#51) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#52) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#53) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#54) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#55) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#56) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#57) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#58) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#59) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#60) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#61) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#62) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#63) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht(WIP) : User xattrs value is not correct after brick stop/start) posted (#64) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#65) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#66) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#67) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#68) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#69) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs value is not correct after brick stop/start) posted (#70) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#71) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#72) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#73) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#74) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#75) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#76) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#77) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#78) for review on master by MOHIT AGRAWAL (moagrawa) REVIEW: https://review.gluster.org/15468 (cluster/dht : User xattrs are not healed after brick stop/start) posted (#79) for review on master by MOHIT AGRAWAL (moagrawa) COMMIT: https://review.gluster.org/15468 committed in master by Raghavendra G (rgowdapp) ------ commit 9b4de61a136b8e5ba7bf0e48690cdb1292d0dee8 Author: Mohit Agrawal <moagrawa> Date: Fri May 12 21:12:47 2017 +0530 cluster/dht : User xattrs are not healed after brick stop/start Problem: In a distributed volume custom extended attribute value for a directory does not display correct value after stop/start or added newly brick. If any extended(acl) attribute value is set for a directory after stop/added the brick the attribute(user|acl|quota) value is not updated on brick after start the brick. Solution: First store hashed subvol or subvol(has internal xattr) on inode ctx and consider it as a MDS subvol.At the time of update custom xattr (user,quota,acl, selinux) on directory first check the mds from inode ctx, if mds is not present on inode ctx then throw EINVAL error to application otherwise set xattr on MDS subvol with internal xattr value of -1 and then try to update the attribute on other non MDS volumes also.If mds subvol is down in that case throw an error "Transport endpoint is not connected". In dht_dir_lookup_cbk| dht_revalidate_cbk|dht_discover_complete call dht_call_dir_xattr_heal to heal custom extended attribute. In case of gnfs server if hashed subvol has not found based on loc then wind a call on all subvol to update xattr. Fix: 1) Save MDS subvol on inode ctx 2) Check if mds subvol is present on inode ctx 3) If mds subvol is down then call unwind with error ENOTCONN and if it is up then set new xattr "GF_DHT_XATTR_MDS" to -1 and wind a call on other subvol. 4) If setxattr fop is successful on non-mds subvol then increment the value of internal xattr to +1 5) At the time of directory_lookup check the value of new xattr GF_DHT_XATTR_MDS 6) If value is not 0 in dht_lookup_dir_cbk(other cbk) functions then call heal function to heal user xattr 7) syncop_setxattr on hashed_subvol to reset the value of xattr to 0 if heal is successful on all subvol. Test : To reproduce the issue followed below steps 1) Create a distributed volume and create mount point 2) Create some directory from mount point mkdir tmp{1..5} 3) Kill any one brick from the volume 4) Set extended attribute from mount point on directory setfattr -n user.foo -v "abc" ./tmp{1..5} It will throw error " Transport End point is not connected " for those hashed subvol is down 5) Start volume with force option to start brick process 6) Execute getfattr command on mount point for directory 7) Check extended attribute on brick getfattr -n user.foo <volume-location>/tmp{1..5} It shows correct value for directories for those xattr fop were executed successfully. Note: The patch will resolve xattr healing problem only for fuse mount not for nfs mount. BUG: 1371806 Signed-off-by: Mohit Agrawal <moagrawa> Change-Id: I4eb137eace24a8cb796712b742f1d177a65343d5 This bug was used to introduce a test case that sporadically(?) fails. Please have a look https://build.gluster.org/job/centos6-regression/6753/console and improve the test. Also note that tests are recommended to be placed under ./tests/bugs/<component>/ consider moving the test into a subdirectory. Having the tests in subdirectories makes it much easier to run all tests for a selected component. Niels, I tried to execute multiple times on centos vm same test case but i did not get failure so i have not changed the same but after took centos-machine from nigels i tried the same, i got failure so now i have resolved the from below patch https://review.gluster.org/#/c/18436/ From above patch we are getting crash in one nfs case, i have tried to run same on centos machine in a loop but i did not get any crash, i have send a mail also to you. Please check and respond on the same. Thanks & Regards Mohit Agrawal For specific to move the location of test cases i will update the same in next patch. 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-3.13.0, please open a new bug report. glusterfs-3.13.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] http://lists.gluster.org/pipermail/announce/2017-December/000087.html [2] https://www.gluster.org/pipermail/gluster-users/ |