Description of problem: ======================= Create Directory from mountpoint and while creation is in progress (Directory created only on hashed sub-volume), execute rename of that Directory(destination Directory does not exist and both Source and Destination hash to same sub-volume here) i.e. from one mout point :- mkfir dir1 from another mount point mv dir1 dir2 After both operation are finished:- - same gfid for different Directories (at same level) - sometimes few files inside those directories are not listed on mount and not accessible Version-Release number : ========================= 3.6.0.24-1.el6rhs.x86_64 How reproducible: ================= always Steps to Reproduce: ==================== 1. create and mount distributed volume. (mount on multiple client) 2. [to reproduce race, we are putting breakpoint at dht_mkdir_hashed_dir_cbk and dht_rename_hashed_dir_cbk] 3. from one mount point execute [root@OVM1 race]# mkdir inprogress bricks:- [root@OVM5 race]# tree /brick*/race/ /brick1/race/ /brick2/race/ └── inprogress /brick3/race/ 1 directory, 0 files from another mount point:- [root@OVM1 race1]# mv inprogress rename bricks:- [root@OVM5 race]# tree /brick*/race/ /brick1/race/ └── rename /brick2/race/ └── inprogress /brick3/race/ └── inprogress 3 directories, 0 files 4. now continue bothe operation 5. verify data from another mount and bricks also mount:- [root@OVM5 race]# ls -lR .: total 0 drwxr-xr-x 2 root root 18 Jul 10 12:50 rename ./rename: total 0 [root@OVM5 race]# mkdir inprogress mkdir: cannot create directory `inprogress': File exists [root@OVM5 race]# ls -lR .: total 0 drwxr-xr-x 2 root root 18 Jul 10 12:50 inprogress drwxr-xr-x 2 root root 18 Jul 10 12:50 rename ./inprogress: total 0 ./rename: total 0 bricks:- same gfid:- [root@OVM5 race]# getfattr -d -m . /brick3/race/* -e hex getfattr: Removing leading '/' from absolute path names # file: brick3/race/inprogress trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 trusted.glusterfs.dht=0x000000010000000055555555aaaaaaa9 # file: brick3/race/rename trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 trusted.glusterfs.dht=0x000000010000000055555555aaaaaaa9 [root@OVM5 race]# tree /brick*/race/ /brick1/race/ ├── inprogress └── rename /brick2/race/ ├── inprogress └── rename /brick3/race/ ├── inprogress └── rename Actual results: =============== - same gfid for different Directories - sometimes files inside those directories are not listed on mount and Expected results: ================= - no two directory should have same gfid - all files inside those Directories should be accessible from mount point
In case if destination directory exist, output would be rename1 already exist and race :- [root@OVM1 race]# mkdir rename [root@OVM1 race1]# mv rename rename1 output on mount:- [root@OVM5 race]# ls -lR .: total 0 drwxr-xr-x 2 root root 18 Jul 10 15:00 rename drwxr-xr-x 3 root root 57 Jul 10 15:00 rename1 ./rename: total 0 ./rename1: total 0 drwxr-xr-x 2 root root 18 Jul 10 15:00 rename ./rename1/rename: total 0 bricks:- [root@OVM5 race]# tree /brick*/race/ /brick1/race/ ├── rename └── rename1 └── rename /brick2/race/ ├── rename └── rename1 └── rename /brick3/race/ ├── rename └── rename1 └── rename 9 directories, 0 files [root@OVM5 race]# getfattr -d -m . -e hex /brick3/race/* -R getfattr: Removing leading '/' from absolute path names # file: brick3/race/rename trusted.gfid=0xac6b95cb620c400d91a55f3ce66ee005 trusted.glusterfs.dht=0x0000000100000000aaaaaaaaffffffff # file: brick3/race/rename1 trusted.gfid=0x9482dd3bf0834596bb74d6ffeffa40d2 trusted.glusterfs.dht=0x00000001000000000000000055555554 # file: brick3/race/rename1/rename trusted.gfid=0xac6b95cb620c400d91a55f3ce66ee005 trusted.glusterfs.dht=0x0000000100000000aaaaaaaaffffffff
Triage Update: RCA is known. Design and fix need to be done.
https://code.engineering.redhat.com/gerrit/#/c/71596/
Sakshi, Is there a reason, you moved the bug back to MODIFIED? The patch is already merged. Can you please revisit and move the bug to modified if there is no valid reason? regards, Raghavendra
The issue reported in the bug is still seen in build - glusterfs-3.7.9-4.el7rhgs.x86_64 With parallel mkdir and rename operation, mismatching gfids is seen on the directory under test. Moving this back to assigned.
Thanks raghavendra, I have updated the doc text further, let me know if this looks ok.
Doc text seems fine too.
upstream patch https://review.gluster.org/15472 fixes this issue
Verified this BZ on glusterfs version 3.12.2-7.el7rhgs.x86_64. Ran testcases mentioned in description, Comment2 and Comment16. I didn't see any gfid mismatch on the directory under test. Moving this BZ to Verified.
Updated the doc text. Kindly review and confirm
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2607