Bug 1142423
Summary: | [DHT-REBALANCE]-DataLoss: The data appended to a file during its migration will be lost once the migration is done | |||
---|---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Shyamsundar <srangana> | |
Component: | distribute | Assignee: | Raghavendra G <rgowdapp> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | ||
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | mainline | CC: | asrivast, bugs, mzywusko, rhs-bugs, sankarshan, shmohan, smohan, srangana, storage-qa-internal | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | glusterfs-3.8rc2 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | 1140506 | |||
: | 1225809 (view as bug list) | Environment: | ||
Last Closed: | 2016-06-16 12:39:37 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: | 1140506, 1225809 |
Description
Shyamsundar
2014-09-16 18:03:50 UTC
REVIEW: http://review.gluster.org/8912 (cluster/dht: Fix stale subvol cache for files under migration) posted (#1) for review on master by Shyamsundar Ranganathan (srangana) REVIEW: http://review.gluster.org/8912 (cluster/dht: Fix stale subvol cache for files under migration) posted (#2) for review on master by Shyamsundar Ranganathan (srangana) REVIEW: http://review.gluster.org/8912 (cluster/dht: Fix stale subvol cache for files under migration) posted (#3) for review on master by Shyamsundar Ranganathan (srangana) REVIEW: http://review.gluster.org/8912 (cluster/dht: Fix stale subvol cache for files under migration) posted (#4) for review on master by Shyamsundar Ranganathan (srangana) REVIEW: http://review.gluster.org/8912 (cluster/dht: Fix stale subvol cache for files under migration) posted (#5) for review on master by Shyamsundar Ranganathan (srangana) REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#1) for review on master by N Balachandran (nbalacha) REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#2) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10805 (cluster/dht: Don't rely on linkto xattr to find destination subvol during phase 2 of migration.) posted (#2) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#1) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#3) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10805 (cluster/dht: Don't rely on linkto xattr to find destination subvol during phase 2 of migration.) posted (#3) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#2) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#3) for review on master by Raghavendra G (rgowdapp) COMMIT: http://review.gluster.org/10805 committed in master by Raghavendra G (rgowdapp) ------ commit 4df3ea9ab4d8a1aff98784460983b5f0cb4a9ee9 Author: Raghavendra G <rgowdapp> Date: Wed May 13 19:56:47 2015 +0530 cluster/dht: Don't rely on linkto xattr to find destination subvol during phase 2 of migration. linkto xattr on source file cannot be relied to find where the data file currently resides. This can happen if there are multiple migrations before phase 2 detection by a client. For eg., * migration (M1, node1, node2) starts. * application writes some data. DHT correctly stores the state in inode context that phase-1 of migration is in progress * migration M1 completes * migration (M2, node2, node3) is triggered and completed * application resumes writes to the file. DHT identifies it as phase-2 of migration. However, linkto xattr on node1 points to node2, but the file is on node3. A lookup correctly identifies node3 as cached subvol TBD: When we identify phase-2 of a previous migration (say M1), there might be a migration in progress - say (M3, node3, node4). In this case we need to send writes to both (node3, node4) not just node3. Also, the inode state needs to correctly indicate that its in phase-1 of migration. I'll send this as a different patch. Change-Id: I1a861f766258170af2f6c0935468edb6be687b95 BUG: 1142423 Signed-off-by: Raghavendra G <rgowdapp> Reviewed-on: http://review.gluster.org/10805 Tested-by: NetBSD Build System REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#4) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#4) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#5) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#5) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#6) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#6) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#7) for review on master by Niels de Vos (ndevos) REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#7) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#8) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10834 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#8) for review on master by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10943 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#9) for review on master by Raghavendra G (rgowdapp) COMMIT: http://review.gluster.org/10943 committed in master by Raghavendra G (rgowdapp) ------ commit b6eda067d2e2a0b56718ea71522f6c7b06a09f13 Author: Raghavendra G <rgowdapp> Date: Thu May 28 16:03:12 2015 +0530 cluster/dht: pass a destination subvol to fop2 variants to avoid races. The destination subvol used in the fop2 variants is either stored in inode-ctx1 or local->cached_subvol. However, it is not guaranteed that a value stored in these locations before invocation of fop2 is still present after the invocation as these locations are shared among different concurrent operations. So, to preserve the atomicity of "check dst-subvol and invoke fop2 variant if dst-subvol found", we pass down the dst-subvol to fop2 variant. This patch also fixes error handling in some fop2 variants. Change-Id: Icc226228a246d3f223e3463519736c4495b364d2 BUG: 1142423 Signed-off-by: Raghavendra G <rgowdapp> Reviewed-on: http://review.gluster.org/10943 Tested-by: NetBSD Build System <jenkins.org> Reviewed-by: N Balachandran <nbalacha> COMMIT: http://review.gluster.org/10834 committed in master by Raghavendra G (rgowdapp) ------ commit 9684b90526d03a15d451e341521d7df44adae73e Author: Nithya Balachandran <nbalacha> Date: Tue May 19 23:27:35 2015 +0530 cluster/dht: fix incorrect dst subvol info in inode_ctx Stashing additional information in the inode_ctx to help decide whether the migration information is stale, which could happen if a file was migrated several times but FOPs only detected the P1 migration phase. If no FOP detects the P2 phase, the inode ctx1 is never reset. We now save the src subvol as well as the dst subvol in the inode ctx. The src subvol is the subvol on which the FOP was sent when the mig info was set in the inode ctx. This information is considered stale if: 1. The subvol on which the current FOP is sent is the same as the dst subvol in the ctx 2. The subvol on which the current FOP is sent is not the same as the src subvol in the ctx This does not handle the case where the same file might have been renamed such that the src subvol is the same but the dst subvol is different. However, that is unlikely to happen very often. Change-Id: I05a2e9b107ee64750c7ca629aee03b03a02ef75f BUG: 1142423 Signed-off-by: Nithya Balachandran <nbalacha> Reviewed-on: http://review.gluster.org/10834 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Raghavendra G <rgowdapp> Tested-by: Raghavendra G <rgowdapp> REVIEW: http://review.gluster.org/11175 (cluster/dht Use additional dst_info in inode_ctx) posted (#1) for review on master by N Balachandran (nbalacha) REVIEW: http://review.gluster.org/11175 (cluster/dht Use additional dst_info in inode_ctx) posted (#2) for review on master by N Balachandran (nbalacha) 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.8.0, please open a new bug report. glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/ [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |