Bug 1108588
Summary: | Dist-geo-rep : geo-rep fails to do first history crawl after the volume restored from snap. | |||
---|---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Vijaykumar Koppad <vkoppad> | |
Component: | geo-replication | Assignee: | Kotresh HR <khiremat> | |
Status: | CLOSED ERRATA | QA Contact: | Bhaskar Bandari <bbandari> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | rhgs-3.0 | CC: | aavati, avishwan, bbandari, csaba, david.macdonald, khiremat, nlevinki, nsathyan, ssamanta, vagarwal | |
Target Milestone: | --- | |||
Target Release: | RHGS 3.0.0 | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | glusterfs-3.6.0.27-1 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1125918 (view as bug list) | Environment: | ||
Last Closed: | 2014-09-22 19:41:13 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: | 1125918 |
Description
Vijaykumar Koppad
2014-06-12 09:47:14 UTC
Please update the xattrs dump of bricks root(backend) before snap and after restore. This is happening even in the build, glusterfs-3.6.0.24-1.el6rhs. xattrs of the snapped bricks before restoration. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: [root@redlake geo-automation]# getfattr -d -m . -e hex /var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick1/master_b1/ getfattr: Removing leading '/' from absolute path names # file: var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick1/master_b1/ trusted.afr.master-client-0=0x000000000000000000000000 trusted.afr.master-client-1=0x000000000000000000000000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000555555547ffffffd trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.d52240de-e128-4e1f-9ef3-1cab1d657a61.stime=0x53bd30eb00000000 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.xtime=0x53bd36780006bfa4 trusted.glusterfs.volume-id=0x7f96ee01b5f7483aa9e6c3feefce95c8 [root@redlake geo-automation]# getfattr -d -m . -e hex /var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick5/master_b5/ getfattr: Removing leading '/' from absolute path names # file: var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick5/master_b5/ trusted.afr.master-client-4=0x000000000000000000000000 trusted.afr.master-client-5=0x000000000000000000000000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000aaaaaaa8d5555551 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.d52240de-e128-4e1f-9ef3-1cab1d657a61.stime=0x53bd30ed00000000 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.xtime=0x53bd367800058eb5 trusted.glusterfs.volume-id=0x7f96ee01b5f7483aa9e6c3feefce95c8 [root@redlake geo-automation]# getfattr -d -m . -e hex /var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick9/master_b9/ getfattr: Removing leading '/' from absolute path names # file: var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick9/master_b9/ trusted.afr.master-client-8=0x000000000000000000000000 trusted.afr.master-client-9=0x000000000000000000000000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000000000002aaaaaa9 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.d52240de-e128-4e1f-9ef3-1cab1d657a61.stime=0x53bd30eb00000000 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.xtime=0x53bd367800053ebf trusted.glusterfs.volume-id=0x7f96ee01b5f7483aa9e6c3feefce95c8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: It looks like huge difference between stime and xtime. As requested earlier, please provide xattr dump after restore also. xattr dump after restore of the same snap provided in the comment 3. [root@redlake ~]# getfattr -d -m . -e hex /var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick1/master_b1/ getfattr: Removing leading '/' from absolute path names # file: var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick1/master_b1/ trusted.afr.master-client-0=0x000000000000000000000000 trusted.afr.master-client-1=0x000000000000000000000000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000555555547ffffffd trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.d52240de-e128-4e1f-9ef3-1cab1d657a61.stime=0x53bd30eb00000000 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.xtime=0x53bd36780006bfa4 trusted.glusterfs.volume-id=0xe79069169db44aadbf52b744cfd52794 [root@redlake ~]# getfattr -d -m . -e hex /var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick5/master_b5/ getfattr: Removing leading '/' from absolute path names # file: var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick5/master_b5/ trusted.afr.master-client-4=0x000000000000000000000000 trusted.afr.master-client-5=0x000000000000000000000000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000aaaaaaa8d5555551 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.d52240de-e128-4e1f-9ef3-1cab1d657a61.stime=0x53bd30ed00000000 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.xtime=0x53bd367800058eb5 trusted.glusterfs.volume-id=0xe79069169db44aadbf52b744cfd52794 [root@redlake ~]# getfattr -d -m . -e hex /var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick9/master_b9/ getfattr: Removing leading '/' from absolute path names # file: var/run/gluster/snaps/7f96ee01b5f7483aa9e6c3feefce95c8/brick9/master_b9/ trusted.afr.master-client-8=0x000000000000000000000000 trusted.afr.master-client-9=0x000000000000000000000000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000000000002aaaaaa9 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.d52240de-e128-4e1f-9ef3-1cab1d657a61.stime=0x53bd30eb00000000 trusted.glusterfs.e7906916-9db4-4aad-bf52-b744cfd52794.xtime=0x53bd367800053ebf trusted.glusterfs.volume-id=0xe79069169db44aadbf52b744cfd52794 After much analysis and debugging, I figured out following things. 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. Upstream Patch: http://review.gluster.org/#/c/8401/ Downstream Patch: https://code.engineering.redhat.com/gerrit/#/c/30264/ verified on the build glusterfs-3.6.0.27-1 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. http://rhn.redhat.com/errata/RHEA-2014-1278.html |