Bug 1282318 - DHT : file rename operation is successful but log has error 'key:trusted.glusterfs.dht.linkto error:File exists' , 'setting xattrs on <old_filename> failed (File exists)'
Summary: DHT : file rename operation is successful but log has error 'key:trusted.glus...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: distribute
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: RHGS 3.4.0
Assignee: Mohit Agrawal
QA Contact: Prasad Desala
URL:
Whiteboard: dht-rca-unknown, dht-log, rebase
: 1328000 (view as bug list)
Depends On: 1030200
Blocks: 1404905 1503134
TreeView+ depends on / blocked
 
Reported: 2015-11-16 05:32 UTC by Sakshi
Modified: 2018-09-04 06:29 UTC (History)
15 users (show)

Fixed In Version: glusterfs-3.12.2-1
Doc Type: Bug Fix
Doc Text:
Clone Of: 1030200
: 1404905 (view as bug list)
Environment:
Last Closed: 2018-09-04 06:26:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2607 None None None 2018-09-04 06:29:05 UTC

Comment 2 Nithya Balachandran 2016-05-03 09:05:24 UTC
*** Bug 1328000 has been marked as a duplicate of this bug. ***

Comment 4 Raghavendra G 2016-07-05 06:13:38 UTC
The fix we thought is to move the log in posix_mknod to DEBUG level

Comment 6 surabhi 2016-09-19 09:35:36 UTC
A 2x2 dis-rep volume , mounted on cifs client and running different fops on client using crefi, following error messages are seen in brick logs:
[2016-09-19 07:06:54.089211] E [MSGID: 113001] [posix-helpers.c:1175:posix_handle_pair] 0-testvol-posix: /mnt/brick/testvol/b2/thread0/level00/hardlink_to_files/57df8e7
3%%YLW8207V72: key:trusted.glusterfs.dht.linktoflags: 1 length:20 [File exists]
[2016-09-19 07:06:54.089256] E [MSGID: 113001] [posix.c:1353:posix_mknod] 0-testvol-posix: setting xattrs on /mnt/brick/testvol/b2/thread0/level00/hardlink_to_files/57d
f8e73%%YLW8207V72 failed
[2016-09-19 07:06:54.145984] E [MSGID: 113001] [posix-helpers.c:1175:posix_handle_pair] 0-testvol-posix: /mnt/brick/testvol/b2/thread0/level00/hardlink_to_files/57df8e7
4%%2BTFGH1HJS: key:trusted.glusterfs.dht.linktoflags: 1 length:20 [File exists]
[2016-09-19 07:06:54.146008] E [MSGID: 113001] [posix.c:1353:posix_mknod] 0-testvol-posix: setting xattrs on /mnt/brick/testvol/b2/thread0/level00/hardlink_to_files/57d
f8e74%%2BTFGH1HJS failed

Comment 7 Mohit Agrawal 2016-12-15 04:27:22 UTC
Below are the steps to reproduce the issue on plain distributed environment

touch file{1..20}
for i in `seq 1 20`; do ln file$i filehl$i; done
for i in `seq 1 20`; do mv file$i new_file$i; done

RCA: file rename operation is successful but message is coming in brick logs 
     "key:trusted.glusterfs.dht.linkto error:File exists".
     The messages are coming in logs because call (sys_lsetxattr) is returning
     error code(EEXIST) and it is returning error because key xattr is already 
     exists on the file before run rename operation.To avoid the message need to
     put a check(EEXIST) before print the message.

Comment 8 Nithya Balachandran 2016-12-15 05:47:42 UTC
(In reply to Mohit Agrawal from comment #7)
> Below are the steps to reproduce the issue on plain distributed environment
> 
> touch file{1..20}
> for i in `seq 1 20`; do ln file$i filehl$i; done
> for i in `seq 1 20`; do mv file$i new_file$i; done
> 
> RCA: file rename operation is successful but message is coming in brick logs 
>      "key:trusted.glusterfs.dht.linkto error:File exists".
>      The messages are coming in logs because call (sys_lsetxattr) is
> returning
>      error code(EEXIST) and it is returning error because key xattr is
> already 
>      exists on the file before run rename operation.To avoid the message
> need to
>      put a check(EEXIST) before print the message.

Can we be sure that the value of the xattr is the same?

Comment 9 Mohit Agrawal 2016-12-15 05:57:49 UTC
lsetxattr returns EEXIST only when same attribute already exists on the file so i believe 
the value is same.

Regards
Mohit Agrawal

Comment 10 Mohit Agrawal 2016-12-15 06:04:02 UTC
Please ignore my last comment not sure about the value,value could be different only attribute name is same but in both cases (value is same or different) it will update new value to the xattr.

Regards
Mohit Agrawal

Comment 14 Prasad Desala 2018-02-19 13:11:58 UTC
Verified this BZ on glusterfs version: 3.12.2-4.el7rhgs.x86_64.
Followed the same steps as in the description and Comment 7. Rename is successful and logs didn't throw any errors mentioned in the BZ.

Hence, moving this BZ to Verified.

Comment 16 errata-xmlrpc 2018-09-04 06:26:58 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/RHSA-2018:2607


Note You need to log in before you can comment on or make changes to this bug.