+++ This bug was initially created as a clone of Bug #1266875 +++ Description of problem: Race conditions can occur while processing changelogs(by geo-replication) in Tiering based volume, where rebalanace can cause frequent movement of files between hot and cold tiers. Also, rebalance operations are internal operations which needs to be avoided. (Deletion of the file and Creation of the file while carrying out rebalance). Version-Release number of selected component (if applicable): How reproducible: Following is one such example: ================================== Brick1 Brick2 ================================== Create file (file moved due to rebalance). Data file Delete file ================================== If Brick2 changelogs processed first followed by Brick1, file may be created. But, we expect the file to be deleted (as per the last operation) Steps to Reproduce: 1. 2. 3. Actual results: Files are not synced properly. Expected results: Files are synced as expected. Additional info: --- Additional comment from Saravanakumar on 2015-10-09 11:39:16 EDT --- Patches : http://review.gluster.org/#/c/12239/ http://review.gluster.org/#/c/12326/ Ignoring cold brick namespace related fops is pending. --- Additional comment from Vijay Bellur on 2015-10-14 02:28:13 EDT --- REVIEW: http://review.gluster.org/12355 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#1) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-14 10:32:36 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#2) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-15 02:28:36 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#3) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-15 06:25:07 EDT --- REVIEW: http://review.gluster.org/12239 (geo-rep: ignore recording tiering rebalance fops) posted (#4) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-15 06:36:55 EDT --- REVIEW: http://review.gluster.org/12355 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#2) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-16 01:41:17 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#4) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-16 01:44:17 EDT --- REVIEW: http://review.gluster.org/12239 (geo-rep: ignore recording tiering rebalance fops) posted (#5) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-16 04:50:09 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#5) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-16 05:52:05 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#6) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-19 01:05:34 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#7) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-19 02:41:37 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#8) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-22 07:49:32 EDT --- REVIEW: http://review.gluster.org/12239 (features/changelog: ignore recording tiering rebalance fops) posted (#6) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-23 02:03:36 EDT --- REVIEW: http://review.gluster.org/12239 (features/changelog: ignore recording tiering rebalance fops) posted (#7) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-23 02:32:08 EDT --- REVIEW: http://review.gluster.org/12417 ( features/changelog: Add data operation if mknod with tier attribute) posted (#1) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-23 02:34:18 EDT --- REVIEW: http://review.gluster.org/12326 (geo-rep: Add data operation if mknod with tier attribute) posted (#9) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-23 02:35:55 EDT --- REVIEW: http://review.gluster.org/12417 (features/changelog: Add data operation if mknod with tier attribute) posted (#2) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-23 06:55:18 EDT --- REVIEW: http://review.gluster.org/12355 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#3) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-23 06:58:10 EDT --- REVIEW: http://review.gluster.org/12417 (features/changelog: Add data operation if mknod with tier attribute) posted (#3) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-23 07:01:54 EDT --- REVIEW: http://review.gluster.org/12417 (features/changelog: Add data operation if mknod with tier attribute) posted (#4) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-26 01:35:01 EDT --- REVIEW: http://review.gluster.org/12239 (features/changelog: ignore recording tiering rebalance fops) posted (#8) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-26 01:35:25 EDT --- REVIEW: http://review.gluster.org/12417 (features/changelog: Add data operation if mknod with tier attribute) posted (#5) for review on master by Saravanakumar Arumugam (sarumuga) --- Additional comment from Vijay Bellur on 2015-10-26 03:21:24 EDT --- REVIEW: http://review.gluster.org/12417 (features/changelog: record mknod if tier-dht linkto is set) posted (#6) for review on master by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12425 (features/changelog: ignore recording tiering rebalance fops) posted (#2) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12425 (features/changelog: ignore recording tiering rebalance fops) posted (#3) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12425 (features/changelog: ignore recording tiering rebalance fops) posted (#4) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12427 (geo-rep: Add data operation if mknod with tier attribute) posted (#2) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12428 (features/changelog: record mknod if tier-dht linkto is set) posted (#2) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12428 (features/changelog: record mknod if tier-dht linkto is set) posted (#3) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#2) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12428 (features/changelog: record mknod if tier-dht linkto is set) posted (#4) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12427 (geo-rep: Add data operation if mknod with tier attribute) posted (#3) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12428 (features/changelog: record mknod if tier-dht linkto is set) posted (#5) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12428 (features/changelog: record mknod if tier-dht linkto is set) posted (#6) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12428 (features/changelog: record mknod if tier-dht linkto is set) posted (#7) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
COMMIT: http://review.gluster.org/12425 committed in release-3.7 by Venky Shankar (vshankar) ------ commit 531199b60e7a03ec7c3c56cb29cf74d8596f3cd6 Author: Saravanakumar Arumugam <sarumuga> Date: Mon Sep 28 16:31:54 2015 +0530 features/changelog: ignore recording tiering rebalance fops Recording of tiering rebalance process's fops like Creation and Deletion of file must be avoided. Ignore the fops using corresponding pid. Change-Id: Ifdc7765598d04d033f93e6339e9b188f7566cb65 BUG: 1275173 Signed-off-by: Saravanakumar Arumugam <sarumuga> Reviewed-on: http://review.gluster.org/12239/ Reviewed-on: http://review.gluster.org/12425 Tested-by: NetBSD Build System <jenkins.org> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Venky Shankar <vshankar>
REVIEW: http://review.gluster.org/12427 (geo-rep: Add data operation if mknod with tier attribute) posted (#4) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#3) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12428 (features/changelog: record mknod if tier-dht linkto is set) posted (#8) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
COMMIT: http://review.gluster.org/12428 committed in release-3.7 by Venky Shankar (vshankar) ------ commit 7598d5e1466971e02823a9f663059f6e18b8361a Author: Saravanakumar Arumugam <sarumuga> Date: Fri Oct 23 11:57:42 2015 +0530 features/changelog: record mknod if tier-dht linkto is set This is a series of patches which aims to fix geo-replication in a Tiering Volume. Problem: Consider, a file is placed in volume initially and then hot tier is attached. During any operation on the file, due to lookup a linkto file is created in hot tier. Now, any namespace operation carried out on the file is recorded in both cold and hot tier. There is a room for races when both changelogs are replayed. Solution: So, We are going to replay (namespace related)operations only in the hot tier. Why? a. If the file is directly placed in Hot tier, all fops will be recorded in HOT tier. b. If the file is already present in Cold tier, and if any fop is carried out, it creates linkto file in Hot tier. Now, operations like UNLINK, RENAME are captured in Hot tier(by means of linkto file). This way, we can get both tier's operation in HOT tier itself. But, We may miss initial Data sync immediately after creating the file as it is only recording MKNOD. So, if MKNOD encountered with sticky bit set, queue DATA operation for the corresponding gfid. ( This geo-rep related changes are addressed in this patch: http://review.gluster.org/12326/ ) So, If tier-dht linkto is set, we need to record the corresponding MKNOD. Earlier this was avoided as it was set as INTERNAL fop. (This is addressed here in this patch) Change-Id: I25514fe3e25f68592a8d6361507f8c8a4fcb70b1 BUG: 1275173 Reviewed-on: http://review.gluster.org/12417 Signed-off-by: Saravanakumar Arumugam <sarumuga> Reviewed-on: http://review.gluster.org/12428 Tested-by: Gluster Build System <jenkins.com> Tested-by: NetBSD Build System <jenkins.org> Reviewed-by: Venky Shankar <vshankar>
COMMIT: http://review.gluster.org/12427 committed in release-3.7 by Venky Shankar (vshankar) ------ commit 86b6d13e42c2e0de92a2a2099644fbb75308dd12 Author: Saravanakumar Arumugam <sarumuga> Date: Fri Oct 9 20:29:30 2015 +0530 geo-rep: Add data operation if mknod with tier attribute This is a series of patches which aims to fix geo-replication in a Tiering Volume. Problem: Consider, a file is placed in volume initially and then hot tier is attached. During any operation on the file, due to lookup a linkto file is created in hot tier. Now, any namespace operation carried out on the file is recorded in both cold and hot tier. There is a room for races when both changelogs are replayed. Solution: So, We are going to replay (namespace related)operations only in the hot tier. Why? a. If the file is directly placed in Hot tier, all fops will be recorded in HOT tier. b. If the file is already present in Cold tier, and if any fop is carried out, it creates linkto file in Hot tier. Now, operations like UNLINK, RENAME are captured in Hot tier(by means of linkto file). This way, we can get both tier's operation in HOT tier itself. But, We may miss initial Data sync immediately after creating the file as it is only recording MKNOD. So, if MKNOD encountered with sticky bit set, queue DATA operation for the corresponding gfid. (This is addressed here in this patch) So, If tier-gfid linkto is set, we need to record the corresponding MKNOD. Earlier this was avoided as it was set as INTERNAL fop. (This changelog related changes are addressed in the patch: - http://review.gluster.org/12417) Change-Id: I2fa84cfa2b0f86506c3d15d484138ab9651e4f83 BUG: 1275173 Signed-off-by: Saravanakumar Arumugam <sarumuga> Reviewed-on: http://review.gluster.org/12326 Tested-by: NetBSD Build System <jenkins.org> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Kotresh HR <khiremat> Reviewed-by: Aravinda VK <avishwan> (cherry picked from commit ffc39c9d8807464b5c78959bc43dc12b22f5a37b) Reviewed-on: http://review.gluster.org/12427 Reviewed-by: Venky Shankar <vshankar>
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#4) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#5) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#6) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#7) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#8) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#9) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#10) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#11) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#12) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#13) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#14) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#15) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
REVIEW: http://review.gluster.org/12429 (geo-rep: Avoid cold tier bricks during ENTRY operation) posted (#16) for review on release-3.7 by Saravanakumar Arumugam (sarumuga)
COMMIT: http://review.gluster.org/12429 committed in release-3.7 by Venky Shankar (vshankar) ------ commit 2eafd8a5c7fbcc23395c6e0f9c654e96e056698b Author: Saravanakumar Arumugam <sarumuga> Date: Wed Oct 14 11:49:49 2015 +0530 geo-rep: Avoid cold tier bricks during ENTRY operation This is a series of patch which aims to fix geo-replication in a Tiering Volume. Problem: Consider, a file is placed in volume initially and then hot tier is attached. During any operation on the file, due to lookup a linkto file is created in hot tier. Now, any namespace operation carried out on the file is recorded in both cold and hot tier. There is a room for races when both changelogs are replayed. Solution: So, We are going to replay (namespace related)operations only in the hot tier. Why? a. If the file is directly placed in Hot tier , all fops will be recorded in HOT tier. b. If the file is already present in Cold tier, and if any fop is carried out, it creates linkto file in Hot tier. Now, operations like UNLINK, RENAME are captured in Hot tier(by means of linkto file). This way, we can get both tier's operation in HOT tier itself. Now, once the file is demoted to COLD tier, any namespace operation carried out on the cold tier can be avoided as we directly RECORD the same in HOT tier. How? 1. Check whether the brick is cold tier and skip ENTRY operation. 2. Also, if it is cold tier brick, use Xsync(which is used during initial run). This will help in getting all cold tier bricks changes using File System crawl and helps in avoiding races with hot tier brick(which can happen if historychangelog used in cold tier brick). Dependent patches: 1. http://review.gluster.org/12239 2. http://review.gluster.org/12326 Change-Id: I7692b1dbb8813a7e253451bca02f8f09a5782dde BUG: 1275173 Signed-off-by: Saravanakumar Arumugam <sarumuga> Reviewed-on: http://review.gluster.org/12355 Tested-by: NetBSD Build System <jenkins.org> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Aravinda VK <avishwan> (cherry picked from commit 6188b5fcebc56b3d8af1956beeec9988f3e8f268) Reviewed-on: http://review.gluster.org/12429 Reviewed-by: Venky Shankar <vshankar>
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.7, please open a new bug report. glusterfs-3.7.7 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] https://www.gluster.org/pipermail/gluster-users/2016-February/025292.html [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user