Bug 1415761
Summary: | [Remove-brick] Hardlink migration fails with "lookup failed (No such file or directory)" error messages in rebalance logs | |||
---|---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Nithya Balachandran <nbalacha> | |
Component: | distribute | Assignee: | Nithya Balachandran <nbalacha> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | ||
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | mainline | CC: | amukherj, bugs, tdesala | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | glusterfs-3.11.0 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | 1409474 | |||
: | 1419855 1420184 1420215 (view as bug list) | Environment: | ||
Last Closed: | 2017-05-30 18:39:31 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: | 1409474, 1419855, 1420184, 1420215 |
Description
Nithya Balachandran
2017-01-23 16:35:00 UTC
RCA: The remove-brick operation will migrate files with hardlinks (unlike a regular rebalance). The following steps are performed: 1. dht_setxattr (key = GF_XATTR_FILE_MIGRATE_KEY) sets the target/hashed subvolume for a migrate file operation in local->rebalance.target_node. 2. For a hardlink, dht_migrate_file () will use the hashed subvol of the first link to be migrated as the hashed subvolume. This might not match the value in local->rebalance.target_node for the other links. 3. dht_migrate_file returns 0 if __is_file_migratable () / __check_file_has_hardlink returns -2 (indicating that the file is a hardlink). 4. rebalance_task_completion updates the cached subvol in inode_ctx with the value of local->rebalance.target_node. This is incorrect and causes the lookup failures for successive hardlink lookups as the file does not exist on that subvol. Solution: Do not call dht_layout_preset in rebalance_task_completion as it will be done as part of the syncop_lookup called after a successful file migration in dht_migrate_file. Upstream patch: https://review.gluster.org/#/c/16457/1 REVIEW: https://review.gluster.org/16457 (cluster/dht: Don't update layout in rebalance_task_completion) posted (#3) for review on master by N Balachandran (nbalacha) COMMIT: https://review.gluster.org/16457 committed in master by Raghavendra G (rgowdapp) ------ commit ddf05f3d1e39cc920251c809e9ba42fe42b2c5f2 Author: N Balachandran <nbalacha> Date: Mon Jan 23 22:19:01 2017 +0530 cluster/dht: Don't update layout in rebalance_task_completion Updating the layout in the dht inode_ctx in rebalance_task_completion after the file is migrated is erroneous in case of files with hardlinks. This step can be skipped as the layout will be set in the syncop_lookup call post the migration in dht_migrate_file. Change-Id: I24ac798a919585d91a117d6a207e6a31b88486c6 BUG: 1415761 Signed-off-by: N Balachandran <nbalacha> Reviewed-on: https://review.gluster.org/16457 NetBSD-regression: NetBSD Build System <jenkins.org> Smoke: Gluster Build System <jenkins.org> CentOS-regression: Gluster Build System <jenkins.org> Reviewed-by: Raghavendra G <rgowdapp> Reviewed-by: Susant Palai <spalai> 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.11.0, please open a new bug report. glusterfs-3.11.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://lists.gluster.org/pipermail/announce/2017-May/000073.html [2] https://www.gluster.org/pipermail/gluster-users/ |