Bug 1225809
| 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: | Raghavendra G <rgowdapp> |
| Component: | distribute | Assignee: | Raghavendra G <rgowdapp> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.7.0 | CC: | asrivast, bugs, gluster-bugs, mzywusko, nbalacha, nsathyan, rhs-bugs, shmohan, srangana, storage-qa-internal, vagarwal |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | glusterfs-3.7.2 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1142423 | Environment: | |
| Last Closed: | 2015-06-20 09:48:47 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: | 1142423 | ||
| Bug Blocks: | 1140506, 1227206 | ||
|
Description
Raghavendra G
2015-05-28 09:30:55 UTC
REVIEW: http://review.gluster.org/10966 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#1) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10967 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#1) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10966 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#2) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10965 (cluster/dht: Don't rely on linkto xattr to find destination subvol during phase 2 of migration.) posted (#2) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10966 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#3) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10967 (cluster/dht: fix incorrect dst subvol info in inode_ctx) posted (#3) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10965 (cluster/dht: Don't rely on linkto xattr to find destination subvol during phase 2 of migration.) posted (#3) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10966 (cluster/dht: pass a destination subvol to fop2 variants to avoid races.) posted (#4) for review on release-3.7 by Raghavendra G (rgowdapp) REVIEW: http://review.gluster.org/10965 (cluster/dht: Don't rely on linkto xattr to find destination subvol during phase 2 of migration.) posted (#4) for review on release-3.7 by Raghavendra G (rgowdapp) COMMIT: http://review.gluster.org/10965 committed in release-3.7 by Raghavendra G (rgowdapp) ------ commit 271ee96e5c8636ee512a06e0478982874c160a1a 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: 1225809 Signed-off-by: Raghavendra G <rgowdapp> Reviewed-on: http://review.gluster.org/10805 Reviewed-on: http://review.gluster.org/10965 Tested-by: Gluster Build System <jenkins.com> COMMIT: http://review.gluster.org/10967 committed in release-3.7 by Shyamsundar Ranganathan (srangana) ------ commit 7aa52673cc70011750ff019cefad8e0229f892ad 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: 1225809 Signed-off-by: Nithya Balachandran <nbalacha> Reviewed-on: http://review.gluster.org/10967 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Raghavendra G <rgowdapp> Tested-by: Raghavendra G <rgowdapp> Tested-by: NetBSD Build System <jenkins.org> 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.2, please reopen this bug report. glusterfs-3.7.2 has been announced on the Gluster Packaging mailinglist [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://www.gluster.org/pipermail/packaging/2015-June/000006.html [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |