Bug 762064 (GLUSTER-332)

Summary: Server path resolution broken
Product: [Community] GlusterFS Reporter: Vikas Gorur <vikas>
Component: protocolAssignee: Anand Avati <aavati>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: mainlineCC: chrisw, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vikas Gorur 2009-10-23 11:59:00 UTC
Some more info:

Initially /big exists on both servers (server0 & server1).

rm /big from server1. Trigger self-heal. /big is recreated on server1.

rm /big from server1. Trigger self-heal. /big is not recreated and mknod fails with EEXIST.

All further attempts yield the same result.

Comment 1 Vikas Gorur 2009-10-23 12:18:45 UTC
Invalid bug, this has been fixed by the deep resolution and other patches in server/protocol.

Comment 2 Vikas Gorur 2009-10-23 14:46:28 UTC
This was observed during afr self-heal. afr tried to create a file that did not exist on one of the subvolume.

First it tries the lookup, and server reports ENOENT (correct).

[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE LOOKUP() on / (null)
[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE LOOKUP() on /big (null)
[2009-10-23 20:11:36] T [server-protocol.c:2161:server_lookup_cbk] server: 94: LOOKUP /big (225954) ==> -1 (No such file or directory)

Then it tries to do mknod, and server reports EEXIST (wrong). No other operation has happened between the lookup and mknod.

[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE ENTRYLK() on / (null)
[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE LOOKUP() on /big (null)
[2009-10-23 20:11:36] T [server-protocol.c:2161:server_lookup_cbk] server: 96: LOOKUP /big (225954) ==> -1 (No such file or directory)
[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE MKNOD() on /big (null)
[2009-10-23 20:11:36] T [server-protocol.c:553:server_mknod_cbk] server: 97: MKNOD /big ==> -1 (File exists)
[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE ENTRYLK() on / (null)
[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE INODELK() on /big (null)
[2009-10-23 20:11:36] T [inodelk.c:369:pl_inode_setlk] locks: Lock (pid=19842) 0 - 9223372036854775807 => OK

Later lookup's still give ENOENT.

[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE LOOKUP() on /big (null)
[2009-10-23 20:11:36] T [server-protocol.c:2161:server_lookup_cbk] server: 99: LOOKUP /big (225954) ==> -1 (No such file or directory)
[2009-10-23 20:11:36] D [server-resolve.c:462:resolve_and_resume] brick: RESOLVE SETATTR() on /big (null)
[2009-10-23 20:11:36] E [posix.c:618:posix_setattr] posix: setattr (lstat) on /export/1/big failed: No such file or directory
[2009-10-23 20:11:36] D [server-protocol.c:2011:server_setattr_cbk] server: 83: SETATTR /big (225954) ==> -1 (No such file or directory)