Bug 1296174

Summary: geo-rep: hard-link rename issue on changelog replay
Product: [Community] GlusterFS Reporter: Milind Changire <mchangir>
Component: geo-replicationAssignee: Milind Changire <mchangir>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: avishwan, bugs, hostingnuggets
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1296175 1296176 (view as bug list) Environment:
Last Closed: 2016-06-16 13:53:44 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:    
Bug Blocks: 1296175, 1296176    

Description Milind Changire 2016-01-06 14:16:08 UTC
Description of problem:
hard-link creation followed by a rename causes stale hard-links if changelogs are replayed

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


How reproducible:
always

Steps to Reproduce:
0. create and start geo-rep on a volume
1. touch f1; and wait for 20 seconds
2. ln f1 link1; mv link1 link2; and wait for 20 seconds
3. stop and start geo-rep
4. you will see link1 getting created on slave volume; ideally it shouldn't exist

Actual results:
link1 exists after logs are replayed

Expected results:
link1 shouldn't exist

Additional info:

Comment 1 Vijay Bellur 2016-01-06 16:26:25 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#1) for review on master by Milind Changire (mchangir)

Comment 2 Vijay Bellur 2016-02-01 10:33:32 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#2) for review on master by Milind Changire (mchangir)

Comment 3 Vijay Bellur 2016-02-01 10:42:50 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#3) for review on master by Milind Changire (mchangir)

Comment 4 Vijay Bellur 2016-02-05 12:41:27 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#4) for review on master by Milind Changire (mchangir)

Comment 5 Vijay Bellur 2016-02-22 11:49:04 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#5) for review on master by Milind Changire (mchangir)

Comment 6 Vijay Bellur 2016-02-25 05:35:55 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#6) for review on master by Milind Changire (mchangir)

Comment 7 Vijay Bellur 2016-03-08 09:55:19 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#7) for review on master by Milind Changire (mchangir)

Comment 8 Vijay Bellur 2016-03-09 04:51:54 UTC
REVIEW: http://review.gluster.org/13189 (geo-rep: hard-link rename issues on changelog replay) posted (#8) for review on master by Milind Changire (mchangir)

Comment 9 Vijay Bellur 2016-03-09 08:25:21 UTC
COMMIT: http://review.gluster.org/13189 committed in master by Aravinda VK (avishwan) 
------
commit bf03543388c39e4b5162ff5866ba4754fb4fdfc1
Author: Milind Changire <mchangir>
Date:   Wed Jan 6 21:23:51 2016 +0530

    geo-rep: hard-link rename issues on changelog replay
    
    Problem:
    LINK + RENAME changelog when replayed after worker restart causes stale
    hard-links to persist since VFS returns success for RENAME if hard-links
    point to same inode.
    
    Solution:
    Worker detects RENAME being issued on hard-links to the same inode and
    unlinks the source file-name. Conditionally rename by verifying that the
    source gfid matches with the on-disk gfid on the slave.
    
    Change-Id: I3ff1c30ef79e77503c8b246d46dab8ac3059ccf2
    BUG: 1296174
    Signed-off-by: Milind Changire <mchangir>
    Reviewed-on: http://review.gluster.org/13189
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Aravinda VK <avishwan>

Comment 10 Niels de Vos 2016-06-16 13:53:44 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-3.8.0, please open a new bug report.

glusterfs-3.8.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] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user