Bug 1125918
Summary: | Dist-geo-rep : geo-rep fails to do first history crawl after the volume restored from snap. | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Kotresh HR <khiremat> |
Component: | geo-replication | Assignee: | Kotresh HR <khiremat> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | mainline | CC: | aavati, avishwan, bugs, csaba, david.macdonald, gluster-bugs, khiremat, nlevinki, nsathyan, ssamanta |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.7.0beta1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 1108588 | Environment: | |
Last Closed: | 2015-05-14 17:26:06 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: | 1108588 | ||
Bug Blocks: |
Description
Kotresh HR
2014-08-01 10:49:38 UTC
Cause: On geo-rep start, when requested for stime, it is giving -1 because a check whether (stime < first geo-rep start time) fails and hence not going for history crawl, a complete xsync is being done. geo-rep start time is recorded, the very first time geo-rep session is started for that master between any of it slaves. geo-rep start time is fetched by doing getxattr on 'trusted.glusterfs.volume-mark' on master's gluster root. Analysis: Apart from 'trusted.glusterfs.volume-mark.<uuid>' xattr, 'trusted.glusterfs.volume-mark' xattr is also maintained virtually. Virtually in the sense, the xattr is not set on the gluster root, but when requested, marker gives it. 'trusted.glusterfs.volume-mark' holds the combination of 'node uuid', 'return value', 'geo-rep start time' and others as the value. On geo-rep start, marker creates 'marker.tstamp' file if indexing is turned on. On getxattr for the key 'trusted.glusterfs.volume-mark' on gluster root, marker stats 'marker.tstamp' file and modification time is returned along with others. On snapshot creation, brick vol files are freshly created and hence marker.tstamp file also. So marker.tstamp file records the snapshot creation time, instead of first geo-rep start time. On geo-rep start after master volume restoration, when requested for xtime, the comparison (xtime < first geo-rep start time) obviously fails and returns -1. REVIEW: http://review.gluster.org/8401 (feature/geo-rep: Keep marker.tstamp's mtime unchangeable during snapshot.) posted (#1) for review on master by Kotresh HR (khiremat) REVIEW: http://review.gluster.org/8401 (feature/geo-rep: Keep marker.tstamp's mtime unchangeable during snapshot.) posted (#2) for review on master by Kotresh HR (khiremat) REVIEW: http://review.gluster.org/8401 (feature/geo-rep: Keep marker.tstamp's mtime unchangeable during snapshot.) posted (#3) for review on master by Kotresh HR (khiremat) REVIEW: http://review.gluster.org/8401 (feature/geo-rep: keep marker.tstamp's mtime unchangeable during snapshot.) posted (#4) for review on master by Kotresh HR (khiremat) REVIEW: http://review.gluster.org/8401 (feature/geo-rep: Keep marker.tstamp's mtime unchangeable during snapshot.) posted (#5) for review on master by Kotresh HR (khiremat) REVIEW: http://review.gluster.org/8401 (feature/geo-rep: Keep marker.tstamp's mtime unchangeable during snapshot.) posted (#6) for review on master by Kotresh HR (khiremat) REVIEW: http://review.gluster.org/8401 (feature/geo-rep: Keep marker.tstamp's mtime unchangeable during snapshot.) posted (#7) for review on master by Kotresh HR (khiremat) COMMIT: http://review.gluster.org/8401 committed in master by Vijay Bellur (vbellur) ------ commit 0e8c537d6f48857b0f3c0ef10ce1c4458e303be8 Author: Kotresh H R <khiremat> Date: Fri Aug 1 16:12:38 2014 +0530 feature/geo-rep: Keep marker.tstamp's mtime unchangeable during snapshot. Problem: Geo-replicatoin does a full xsync crawl after snapshot restoration of slave and master. It does not do history crawl. Analysis: Marker creates 'marker.tstamp' file when geo-rep is started for the first time. The virtual extended attribute 'trusted.glusterfs.volume-mark' is maintained and whenever it is queried on gluster mount point, marker fills it on the fly and returns the combination of uuid, ctime of marker.tstamp and others. So ctime of marker.tstamp, in other sense 'volume-mark' marks the geo-rep start time when the session is freshly created. From the above, after the first filesystem crawl(xsync) is done during first geo-rep start, stime should always be less than 'volume-mark'. So whenever stime is less than volume-mark, it does full filesystem crawl (xsync). Root Cause: When snapshot is restored, marker.tstamp file is freshly created losing the timestamps, it was originally created with. Solution: 1. Change is made to depend on mtime instead of ctime. 2. mtime and atime of marker.tstamp is restored back when snapshot is created and restored. Change-Id: I4891b112f4aedc50cfae402832c50c5145807d7a BUG: 1125918 Signed-off-by: Kotresh H R <khiremat> Reviewed-on: http://review.gluster.org/8401 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Vijay Bellur <vbellur> 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 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 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 |