Bug 1125843

Summary: geo-rep: changelog_register fails when geo-rep started after session creation.
Product: [Community] GlusterFS Reporter: Kotresh HR <khiremat>
Component: geo-replicationAssignee: Kotresh HR <khiremat>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: mainlineCC: aavati, avishwan, bugs, csaba, gluster-bugs, nlevinki, nsathyan, sdharane
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.0beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1125818 Environment:
Last Closed: 2015-05-14 17:26:05 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: 1125818    
Bug Blocks:    

Description Kotresh HR 2014-08-01 08:45:44 UTC
+++ This bug was initially created as a clone of Bug #1125818 +++

Description of problem:
changelog_register fails with ENOENT when geo-rep started just after session creation. It goes to Hybrid Crawl and never goes to changelog mode untill a stop and start of geo-rep.

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


How reproducible:
Happens everytime.

Steps to Reproduce:
1. Create geo-rep session between master and slave
2. Start the geo-rep between master and slave
3. Check the log to see changelog_register failure or status to see "Hybrid Crawl"

Actual results:
changelog_register fails and always be in xsync mode

Expected results:
changelog_register should not fail, it should got to history, xsync and then changelog.

Additional info:

Comment 1 Kotresh HR 2014-08-01 08:51:08 UTC
Cause: 
gf_changelog_register is failing with ENOENT for the working directory when it
tries to get the realpath.
Earlier, xsync was being called first, which creates working drectory
and changelog_register is called. Now it is history first, hence the 
issue.

Solution:
Create working directory in gf_changelog_register if its not already
created.

Comment 2 Anand Avati 2014-08-01 08:57:29 UTC
REVIEW: http://review.gluster.org/8399 (geo-rep/changelog: Create working dir during changelog_register if not present.) posted (#1) for review on master by Kotresh HR (khiremat)

Comment 3 Anand Avati 2014-08-01 10:47:02 UTC
REVIEW: http://review.gluster.org/8399 (geo-rep/libgfchangelog: Create working dir during changelog_register if not present.) posted (#2) for review on master by Kotresh HR (khiremat)

Comment 4 Anand Avati 2014-08-02 00:24:04 UTC
COMMIT: http://review.gluster.org/8399 committed in master by Vijay Bellur (vbellur) 
------
commit d09f69e76f86e727ea9a3487f57a0d7fd7b5bcd7
Author: Kotresh H R <khiremat>
Date:   Fri Aug 1 14:08:56 2014 +0530

    geo-rep/libgfchangelog: Create working dir during changelog_register if not present.
    
    Earlier, xysnc's register was being called first,
    which was creating working directory before calling
    changelog_register. Now it is history crawl first.
    Hence working directory would not have been created.
    Create it in gf_changelog_register itself if it is
    not already created.
    
    Change-Id: Ief3f2b87deaf5da16c135b64be1be42e0a7647f3
    BUG: 1125843
    Signed-off-by: Kotresh H R <khiremat>
    Reviewed-on: http://review.gluster.org/8399
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Aravinda VK <avishwan>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 5 Kotresh HR 2014-08-04 10:07:16 UTC
A small change required to support symlinks while creating working directory
hence a rework.

Comment 6 Anand Avati 2014-08-04 10:07:53 UTC
REVIEW: http://review.gluster.org/8409 (geo-rep/libgfchangelog: Support of symlinks while creation of working dir.) posted (#1) for review on master by Kotresh HR (khiremat)

Comment 7 Anand Avati 2014-08-04 11:38:36 UTC
COMMIT: http://review.gluster.org/8409 committed in master by Venky Shankar (vshankar) 
------
commit 51394183e94ac0be70fcf22793b2040ba3f0b918
Author: Kotresh H R <khiremat>
Date:   Mon Aug 4 15:33:02 2014 +0530

    geo-rep/libgfchangelog: Support of symlinks while creation of working dir.
    
    In gf_changelog_register, enable symlink support while creating
    working directory if its not already created.
    
    Change-Id: I4b81762d04f5276a65087d2ff94f2a36dc504b58
    BUG: 1125843
    Signed-off-by: Kotresh H R <khiremat>
    Reviewed-on: http://review.gluster.org/8409
    Reviewed-by: Venky Shankar <vshankar>
    Tested-by: Gluster Build System <jenkins.com>
    Tested-by: Venky Shankar <vshankar>

Comment 8 Niels de Vos 2015-05-14 17:26:05 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 9 Niels de Vos 2015-05-14 17:28:07 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 10 Niels de Vos 2015-05-14 17:35:13 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user