Bug 1619720 - posix_mknod does not update trusted.pgfid.xx xattr correctly
Summary: posix_mknod does not update trusted.pgfid.xx xattr correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nithya Balachandran
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1619623 1620765 1623317
TreeView+ depends on / blocked
 
Reported: 2018-08-21 14:59 UTC by Nithya Balachandran
Modified: 2018-10-23 15:17 UTC (History)
1 user (show)

Fixed In Version: glusterfs-5.0
Clone Of:
: 1620765 1623317 (view as bug list)
Environment:
Last Closed: 2018-10-23 15:17:29 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Nithya Balachandran 2018-08-21 14:59:23 UTC
Description of problem:

posix_mknod always sets the value of trusted.pgfid.xxx to 1. This works in most cases but is incorrect when posix_mknod calls posix_create_link_if_gfid_exists.

This leads to problems when renaming a file as the xattr is deleted and the subsequent posix_rename fails.



From the logs:

[2018-08-21 14:56:41.685906] W [MSGID: 113093] [posix-entry-ops.c:472:posix_mknod] 0-patchy-posix: setting xattr failed on /bricks/brick1/backends/patchy0/tmp/file-3: key = trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8  [File exists]
[2018-08-21 14:56:41.691156]:++++++++++ G_LOG:bugs/distribute/bug-rianovosti.t: TEST: 51 getfattr -n trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8 /bricks/brick1/backends/patchy0/tmp/file-3 ++++++++++
[2018-08-21 14:56:41.700318]:++++++++++ G_LOG:bugs/distribute/bug-rianovosti.t: TEST: 52 getfattr -n trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8 /bricks/brick1/backends/patchy1/tmp/file-3 ++++++++++
[2018-08-21 14:56:41.710943]:++++++++++ G_LOG:bugs/distribute/bug-rianovosti.t: TEST: 54 mv /mnt/glusterfs/0/tmp/file-3 /mnt/glusterfs/0/tmp/file-6 ++++++++++
[2018-08-21 14:56:41.721513] W [MSGID: 113093] [posix-entry-ops.c:1714:posix_rename] 0-patchy-posix: getting xattr failed on /bricks/brick1/backends/patchy0/tmp/file-3: key = trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8  [No data available]
[2018-08-21 14:56:41.721532] W [MSGID: 113001] [posix-entry-ops.c:1808:posix_rename] 0-patchy-posix: modification of parent gfid xattr failed (gfid:2cf7c436-f926-4cbb-90fa-b3dbd3ced4d1)
[2018-08-21 14:56:41.721558] I [MSGID: 115061] [server-rpc-fops_v2.c:957:server4_rename_cbk] 0-patchy-server: 70: RENAME /tmp/file-3 (aa873350-56fd-4664-a822-6c96ec935ba8/file-3) -> /tmp/file-6 (aa873350-56fd-4664-a822-6c96ec935ba8/file-6), client: CTX_ID:f2627781-b626-4f21-8298-42ed87f8556c-GRAPH_ID:0-PID:32112-HOST:rhgs313-6.localdomain-PC_NAME:patchy-client-0-RECON_NO:-0, error-xlator: patchy-posix [No data available]




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2018-08-21 15:34:17 UTC
REVIEW: https://review.gluster.org/20875 (storage/posix: Increment trusted.pgfid in posix_mknod) posted (#1) for review on master by N Balachandran

Comment 2 Worker Ant 2018-08-23 06:49:44 UTC
COMMIT: https://review.gluster.org/20875 committed in master by "Amar Tumballi" <amarts> with a commit message- storage/posix: Increment trusted.pgfid in posix_mknod

The value of trusted.pgfid.xx was always set to 1
in posix_mknod. This is incorrect if posix_mknod
calls posix_create_link_if_gfid_exists.

Change-Id: Ibe87ca6f155846b9a7c7abbfb1eb8b6a99a5eb68
fixes: bz#1619720
Signed-off-by: N Balachandran <nbalacha>

Comment 3 Shyamsundar 2018-10-23 15:17:29 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/


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