Bug 762543 (GLUSTER-811)

Summary: files inaccessible after server down time : replicate unknown file type
Product: [Community] GlusterFS Reporter: Robin Waarts <robin>
Component: replicateAssignee: Vikas Gorur <vikas>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.3CC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
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:
Attachments:
Description Flags
Client trace
none
Server 1 log
none
Server 2 log none

Description Robin Waarts 2010-04-08 07:33:17 UTC
Created attachment 173 [details]
test case

Comment 1 Robin Waarts 2010-04-08 07:33:35 UTC
Created attachment 174 [details]
show how to modify main.c

Comment 2 Robin Waarts 2010-04-08 07:40:10 UTC
Just noticed changes in the git.

These changes now crash the client on bringing the second server online.
After remounting the client, files not on both servers are no longer visible but give the same error 

(git last change: Thu, 8 Apr 2010 10:08:31 +0000)


[2010-04-08 12:39:44] N [trace.c:1302:trace_stat] www: 78: (loc {path=/robin, ino=671090376})
[2010-04-08 12:39:44] N [trace.c:183:trace_stat_cbk] www: 78: (op_ret=0, buf {ia_gen=5427496935835566081, ia_ino=671090376, st_mode=40755, ia_nlink=2, ia_uid=0, ia_gid=0, ia_rdev=0, ia_size=45, ia_blksize=4096, ia_blocks=8, ia_atime=[Nov 10 15:05:17], ia_mtime=[Apr 08 12:28:00], ia_ctime=[Apr 08 12:36:46]})
[2010-04-08 12:39:44] N [trace.c:1284:trace_lookup] www: 79: (loc {path=/robin/server1, ino=268443589})
[2010-04-08 12:39:44] E [afr-self-heal-common.c:1237:sh_missing_entries_create] replicate: unknown file type: 01
[2010-04-08 12:39:44] N [trace.c:598:trace_lookup_cbk] www: 79: (op_ret=0, ino=268443589, *buf {ia_ino=268443589, ia_gen=5457710222581694466, st_mode=100644, ia_nlink=1, ia_uid=0, ia_gid=0, ia_size=0, ia_blocks=0, ia_atime=[Apr 08 12:26:09], ia_mtime=[Apr 08 12:26:09], ia_ctime=[Apr 08 12:26:09]}, *postparent {ia_ino=671090376, ia_gen=5427496828461383761, st_mode=40755, ia_nlink=2, ia_uid=0, ia_gid=0, ia_size=63, ia_blocks=8, ia_atime=[Nov 10 15:05:17], ia_mtime=[Apr 08 12:26:09], ia_ctime=[Apr 08 12:36:46]}
[2010-04-08 12:39:44] N [trace.c:1583:trace_open] www: 80: (loc {path=/robin/server1, ino=268443589}, flags=32768, fd=0x876bb00, wbflags=0)
[2010-04-08 12:39:44] N [trace.c:147:trace_open_cbk] www: 80: (op_ret=-1, op_errno=5, *fd=0x876bb00)
[2010-04-08 12:39:44] W [fuse-bridge.c:859:fuse_fd_cbk] glusterfs-fuse: 80: OPEN() /robin/server1 => -1 (Input/output error)

Comment 3 Robin Waarts 2010-04-08 10:32:43 UTC
Files created with one of the servers down become inaccessible after both the servers are both back online.
It is possible to remove the file and recreate it with both servers online.

The files are not replicated and the error is 
replicate: xx has unknown file type on server: 01

(git - version Wed, 7 Apr 2010)
-- test --

Both servers online 

#touch /www/htdocs/robin/both1
#cat /www/htdocs/robin/both1

Take server 1 offline

#touch /www/htdocs/robin/server2-only
#cat /www/htdocs/robin/server2-only

bring server 1 online

#cat /www/htdocs/robin/server2-only
cat: /www/htdocs/robin/server2-only: Input/output error

# ls -al /www/htdocs/robin/
total 24
drwxr-xr-x 2 root root   81 2010-04-08 11:14 .
drwxr-xr-x 9 root root 4096 2010-03-20 12:43 ..
-rw-r--r-- 1 root root    0 2010-04-08 11:14 both1
-rw-r--r-- 1 root root    0 2010-04-08 11:14 server2-only

Take server 2 offline

# touch /www/htdocs/robin/server1-only
# cat /www/htdocs/robin/server1-only

bring server 2 online

# cat /www/htdocs/robin/server2-only
cat: /www/htdocs/robin/server2-only: Input/output error
# cat /www/htdocs/robin/server1-only
cat: /www/htdocs/robin/server1-only: Input/output error
# cat /www/htdocs/robin/both1

ls -lR /www/htdocs/robin/
total 8
-rw-r--r-- 1 root root    0 2010-04-08 11:14 both1
-rw-r--r-- 1 root root    0 2010-04-08 11:14 server2-only

Comment 4 Vikas Gorur 2010-04-13 15:43:48 UTC

*** This bug has been marked as a duplicate of bug 730 ***

Comment 5 Vikas Gorur 2010-04-13 15:45:12 UTC
Robin,

Thanks for reporting this. This bug appears to be a duplicate of bug 762462. A patch has been committed to git to fix that. Please let us know if you still see this bug despite that patch.