Bug 1227691
Summary: | [Backup]: Rename is getting recorded as a MODIFY entry in output file | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Sweta Anandpara <sanandpa> |
Component: | glusterfind | Assignee: | Saravanakumar <sarumuga> |
Status: | CLOSED ERRATA | QA Contact: | Sweta Anandpara <sanandpa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rhgs-3.1 | CC: | asrivast, avishwan, khiremat, rhs-bugs, storage-qa-internal |
Target Milestone: | --- | ||
Target Release: | RHGS 3.1.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.7.1-3 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-07-29 04:55:44 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: | |||
Bug Blocks: | 1202842, 1223636 |
Description
Sweta Anandpara
2015-06-03 10:32:23 UTC
pre command was run immediately after Rename. Changelog may not have rolled over and you will not get all the changes in output file. If you run pre command again then you will get Both Rename as well as Modify in output file. We will work on avoiding displaying MODIFY entry. This bug is similar to BZ 1226889 I verified the same steps again. Running the pre command the second time after 10 minutes, does not display any entry for RENAME. Only MODIFY gets recorded in the output file. [root@dhcp43-140 ~]# glusterfind pre testvol_sess testvol /tmp/outtest.txt Generated output file /tmp/outtest.txt [root@dhcp43-140 ~]# ls -l /tmp/outtest.txt -rw-r--r--. 1 root root 11 Jun 4 23:37 /tmp/outtest.txt [root@dhcp43-140 ~]# cat /tmp/outtest.txt NEW test1 [root@dhcp43-140 ~]# # after creating one more file and 2 directories [root@dhcp43-140 ~]# glusterfind post testvol_sess testvol [root@dhcp43-140 ~]# glusterfind pre testvol_sess testvol /tmp/outtest.txt Generated output file /tmp/outtest.txt [root@dhcp43-140 ~]# cat /tmp/outtest.txt NEW test2 NEW dir1 NEW dir2 [root@dhcp43-140 ~]# glusterfind post testvol_sess testvol [root@dhcp43-140 ~]# # after moving a file test1 to another directory , with a new name [root@dhcp43-140 ~]# glusterfind pre testvol_sess testvol /tmp/outtest.txt Generated output file /tmp/outtest.txt [root@dhcp43-140 ~]# cat /tmp/outtest.txt MODIFY dir1%2Fnewtest1 [root@dhcp43-140 ~]# # after moving another file to a different directory, retaining the name [root@dhcp43-140 ~]# glusterfind pre testvol_sess testvol /tmp/outtest.txt --regenerate-outfile Generated output file /tmp/outtest.txt [root@dhcp43-140 ~]# cat /tmp/outtest.txt MODIFY dir1%2Fnewtest1 MODIFY dir2%2Ftest2 [root@dhcp43-140 ~]# [root@dhcp43-140 ~]## after moving back test2 to its original location [root@dhcp43-140 ~]# [root@dhcp43-140 ~]# glusterfind pre testvol_sess testvol /tmp/outtest.txt --regenerate-outfile Generated output file /tmp/outtest.txt [root@dhcp43-140 ~]# cat /tmp/outtest.txt MODIFY dir1%2Fnewtest1 [root@dhcp43-140 ~]# glusterfind pre testvol_sess testvol /tmp/outtest.txt --regenerate-outfile Generated output file /tmp/outtest.txt [root@dhcp43-140 ~]# cat /tmp/outtest.txt MODIFY dir1%2Fnewtest1 [root@dhcp43-140 ~]# I have posted a patch for Bug#1226889, http://review.gluster.org/c/11137/. and it resolves this issue. Please find the logs below. Let me know if any issues. [root@gfvm1 master]# touch newfile [root@gfvm1 master]# [root@gfvm1 master]# [root@gfvm1 master]# echo "b1";ls /opt/volume_test/tv_1/b1/ -la; echo "b2";ls /opt/volume_test/tv_1/b2/ -la b1 total 20 drwxr-xr-x 4 root root 4096 Jun 6 05:38 . drwxr-xr-x. 4 root root 4096 Jun 5 20:41 .. drw------- 53 root root 4096 Jun 6 04:57 .glusterfs drwxr-xr-x 3 root root 4096 Jun 5 20:41 .trashcan b2 total 28 drwxr-xr-x 4 root root 4096 Jun 6 07:37 . drwxr-xr-x. 4 root root 4096 Jun 5 20:41 .. drw------- 66 root root 4096 Jun 6 04:57 .glusterfs -rw-r--r-- 2 root root 0 Jun 6 07:37 newfile drwxr-xr-x 3 root root 4096 Jun 5 20:41 .trashcan [root@gfvm1 master]# [root@gfvm1 master]# [root@gfvm1 master]# glusterfind pre sess1 tv1 /tmp/out.txt Generated output file /tmp/out.txt [root@gfvm1 master]# cat /tmp/out.txt NEW newfile [root@gfvm1 master]# [root@gfvm1 master]# [root@gfvm1 master]# [root@gfvm1 master]# glusterfind post sess1 tv1 [root@gfvm1 master]# [root@gfvm1 master]# [root@gfvm1 master]# mv newfile newfile777 [root@gfvm1 master]# [root@gfvm1 master]# [root@gfvm1 master]# echo "b1";ls /opt/volume_test/tv_1/b1/ -la; echo "b2";ls /opt/volume_test/tv_1/b2/ -la b1 total 24 drwxr-xr-x 4 root root 4096 Jun 6 07:38 . drwxr-xr-x. 4 root root 4096 Jun 5 20:41 .. drw------- 54 root root 4096 Jun 6 07:38 .glusterfs ---------T 2 root root 0 Jun 6 07:38 newfile777 drwxr-xr-x 3 root root 4096 Jun 5 20:41 .trashcan b2 total 28 drwxr-xr-x 4 root root 4096 Jun 6 07:38 . drwxr-xr-x. 4 root root 4096 Jun 5 20:41 .. -rw-r--r-- 2 root root 0 Jun 6 04:57 222_1 drw------- 66 root root 4096 Jun 6 04:57 .glusterfs -rw-r--r-- 2 root root 0 Jun 6 07:37 newfile777 drwxr-xr-x 3 root root 4096 Jun 5 20:41 .trashcan [root@gfvm1 master]# glusterfind pre sess1 tv1 /tmp/out.txt Generated output file /tmp/out.txt [root@gfvm1 master]# [root@gfvm1 master]# cat /tmp/out.txt RENAME newfile newfile777 [root@gfvm1 master]# Tested this on the build 3.7.1.3 and 3.7.1-4 build. Rename of a file does get recorded as RENAME and not a MODIFY. Functionality testing in and around this fix has been done, and logs of the same have been uploaded here: https://polarion.engineering.redhat.com/polarion/testrun-attachment/RHG3/glusterfs-3_7_1_3_RHEL6_7_FUSE/RHG3-5400_Logs_6.7_3.7.1-3_output_file_validation.odt Moving this to verified in 3.1 everglades. 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://rhn.redhat.com/errata/RHSA-2015-1495.html |