Bug 1219412
Summary: | Geo-Replication - Fails to handle file renaming correctly between master and slave | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Saravanakumar <sarumuga> |
Component: | geo-replication | Assignee: | bugs <bugs> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | urgent | Docs Contact: | |
Priority: | high | ||
Version: | 3.7.0 | CC: | avishwan, bugs, gluster-bugs, gluster, jamoflaw, vagarwal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.7.0beta2 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 1141379 | Environment: | |
Last Closed: | 2015-05-14 17:27:33 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: | 1141379 | ||
Bug Blocks: | 1002026, 1154307 |
Description
Saravanakumar
2015-05-07 09:30:22 UTC
REVIEW: http://review.gluster.org/10628 (geo-rep: rename handling in dht volume) posted (#1) for review on release-3.7 by Saravanakumar Arumugam (sarumuga) REVIEW: http://review.gluster.org/10633 (geo-rep: rename handling in dht volume) posted (#1) for review on release-3.7 by Saravanakumar Arumugam (sarumuga) REVIEW: http://review.gluster.org/10633 (geo-rep: rename handling in dht volume) posted (#2) for review on release-3.7 by Kotresh HR (khiremat) REVIEW: http://review.gluster.org/10633 (geo-rep: rename handling in dht volume(changelog changes)) posted (#3) for review on release-3.7 by Saravanakumar Arumugam (sarumuga) REVIEW: http://review.gluster.org/10633 (geo-rep: rename handling in dht volume(changelog changes)) posted (#4) for review on release-3.7 by Saravanakumar Arumugam (sarumuga) REVIEW: http://review.gluster.org/10633 (geo-rep: rename handling in dht volume(changelog changes)) posted (#5) for review on release-3.7 by Kotresh HR (khiremat) COMMIT: http://review.gluster.org/10633 committed in release-3.7 by Vijay Bellur (vbellur) ------ commit c466b137b0cabb844ce7a1f92549ff9b72369830 Author: Saravanakumar Arumugam <sarumuga> Date: Tue May 5 17:03:39 2015 +0530 geo-rep: rename handling in dht volume(changelog changes) Background: Glusterfs changelogs are stored in each brick, which records the changes happened in that brick. Georep will run in all the nodes of master and processes changelogs "independently". Processing changelogs is in brick level, but all the fops will be replayed on "slave mount" point. Problem: With a DHT volume, in changelog "internal fops" are NOT recorded. For Rename case, Rename is recorded in "hashed" brick changelog. (DHT's internal fops like creating linkto file, unlink is NOT recorded). This lead us to inconsistent rename operations. For example, Distribute volume created with Two bricks B1, B2. //Consider master volume mounted @ /mnt/master and following operations executed: cd /mnt/master touch f1 // f1 falls on B1 Hash mv f1 f2 // f2 falls on B2 Hash // Here, Changelogs are recorded as below: @B1 CREATE f1 @B2 RENAME f1 f2 Here, race exists between Brick B1 and B2, say B2 will get executed first. Source file f1 itself is "NOT PRESENT", so it will go ahead and create f2 (Current implementation). We have this problem When rename falls in another brick and file is unlinked in Master. Similar kind of issue exists in following case too(multiple rename): CREATE f1 RENAME f1 f2 RENAME f2 f1 Solution: Instead of carrying out "changelogging" at "HASHED volume", carry out at the "CACHED volume". This way we have rename operations carried out where actual files are present. So,Changelog recorded as : @B1 CREATE f1 RENAME f1 f2 Note: This patch is dependent on dht changes from this patch. http://review.gluster.org/10410/ changelog related changes are separated out for review. In changelog, xdata passed from DHT is considered as: 1. In case of unlink (internal operation as part of rename), xdata value is set , it is considered as RENAME and recorded accordingly. 2. In case of rename (Hash and Cache different), xdata value is NOT set, recording rename operation is SKIPPED. BUG: 1219412 Change-Id: I7691166c84991482b2cfe073df64e2317c935b13 Reviewed-On: http://review.gluster.org/#/c/10220/ Signed-off-by: Saravanakumar Arumugam <sarumuga> Reviewed-on: http://review.gluster.org/10633 Reviewed-by: Aravinda VK <avishwan> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Vijay Bellur <vbellur> DHT Patch http://review.gluster.org/#/c/10628/ and Changelog patch http://review.gluster.org/#/c/10633/ are merged. 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 |