Bug 1622001

Summary: dht: File rename removes the .glusterfs handle for linkto file
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Nithya Balachandran <nbalacha>
Component: distributeAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED ERRATA QA Contact: Prasad Desala <tdesala>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.4CC: amanzane, amukherj, apaladug, bkunal, bugs, dwojslaw, rhs-bugs, sanandpa, sankarshan, sheggodu, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.4.z Batch Update 2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.12.2-27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1621981 Environment:
Last Closed: 2018-12-17 17:07:04 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: 1621981    
Bug Blocks: 1619623    

Description Nithya Balachandran 2018-08-24 06:29:20 UTC
+++ This bug was initially created as a clone of Bug #1621981 +++

Description of problem:

dht_rename_cbk sends a linkfile create in parallel with the unlinks to clean up the original src linkto files. If these fops reach the brick out of order, we end up a linkto file without a gfid handle


Version-Release number of selected component (if applicable):


How reproducible:
Often

Steps to Reproduce:
1. Run glusterfs/tests/bugs/posix/bug-1619720.t over and over again and check the file listing on both bricks.


Actual results:

/bricks/brick1/backends/patchy0/tmp/:
total 0
---------T. 1 root root 0 Aug 23 20:04 file-3  <-- Only one link

/bricks/brick1/backends/patchy1/tmp/:
total 0
-rw-r--r--. 2 root root 0 Aug 23 20:04 file-3

Expected results:

/bricks/brick1/backends/patchy0/tmp/:
total 0
---------T. 2 root root 0 Aug 23 20:04 file-3

/bricks/brick1/backends/patchy1/tmp/:
total 0
-rw-r--r--. 2 root root 0 Aug 23 20:04 file-3

Additional info:

--- Additional comment from Nithya Balachandran on 2018-08-24 01:46:43 EDT ---

Success case:

[2018-08-23 15:35:39.449830] E [MSGID: 113018] [posix-entry-ops.c:372:posix_mknod] 0-patchy-posix: debug: Calling mknod for /bricks/brick1/backends/patchy0/tmp/file-3
[2018-08-23 15:35:39.449874] W [MSGID: 113096] [posix-handle.c:997:posix_create_link_if_gfid_exists] 0-patchy-posix: debug: link if handle exists /bricks/brick1/backends/patchy0/.glusterfs/5d/1d/5d1d04c7-a64e-41dd-89e0-1cbd47123831 (5d1d04c7-a64e-41dd-89e0-1cbd47123831)
[2018-08-23 15:35:39.449898] W [MSGID: 113096] [posix-handle.c:1011:posix_create_link_if_gfid_exists] 0-patchy-posix: debug: link  /bricks/brick1/backends/patchy0/.glusterfs/5d/1d/5d1d04c7-a64e-41dd-89e0-1cbd47123831, /bricks/brick1/backends/patchy0/tmp/file-3 (0)
[2018-08-23 15:35:39.450396] E [MSGID: 113018] [posix-entry-ops.c:1119:posix_unlink] 0-patchy-posix: debug: Calling unlink for /bricks/brick1/backends/patchy0/tmp/file-1  
[2018-08-23 15:35:39.450437] E [MSGID: 113018] [posix-entry-ops.c:965:posix_unlink_gfid_handle_and_entry] 0-patchy-posix: debug: Calling unlink_gfid_handle for /bricks/brick1/backends/patchy0/tmp/file-1, 2



Failure case:

[2018-08-23 15:38:48.480424] E [MSGID: 113018] [posix-entry-ops.c:372:posix_mknod] 0-patchy-posix: debug: Calling mknod for /bricks/brick1/backends/patchy0/tmp/file-3
[2018-08-23 15:38:48.480437] E [MSGID: 113018] [posix-entry-ops.c:1119:posix_unlink] 0-patchy-posix: debug: Calling unlink for /bricks/brick1/backends/patchy0/tmp/file-1
[2018-08-23 15:38:48.480462] E [MSGID: 113018] [posix-entry-ops.c:965:posix_unlink_gfid_handle_and_entry] 0-patchy-posix: debug: Calling unlink_gfid_handle for /bricks/brick1/backends/patchy0/tmp/file-1, 1
[2018-08-23 15:38:48.480474] W [MSGID: 113096] [posix-handle.c:997:posix_create_link_if_gfid_exists] 0-patchy-posix: debug: link if handle exists /bricks/brick1/backends/patchy0/.glusterfs/8a/d4/8ad46424-529f-4ec8-a8c3-03b94168d470 (8ad46424-529f-4ec8-a8c3-03b94168d470)

Comment 16 Prasad Desala 2018-11-28 06:02:50 UTC
Verified this BZ on glusterfs version 3.12.2-28. Ran the planned test cases in the test plan (refer BZ 1619623: Comment 27) and didn't see any issues.

Moving this BZ to Verified.

Comment 17 errata-xmlrpc 2018-12-17 17:07:04 UTC
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/RHBA-2018:3827

Comment 18 Nithya Balachandran 2019-02-18 08:03:14 UTC
*** Bug 1672233 has been marked as a duplicate of this bug. ***