Bug 1305490
Summary: | [Tier]: Creation of hardlink on tiered volume failed with EXISTS | |||
---|---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Rahul Hinduja <rhinduja> | |
Component: | tier | Assignee: | Mohammed Rafi KC <rkavunga> | |
Status: | CLOSED WONTFIX | QA Contact: | Nag Pavan Chilakam <nchilaka> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rhgs-3.1 | CC: | hgowtham, nbalacha, rhs-bugs, rkavunga, sankarshan | |
Target Milestone: | --- | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | tier-fuse-nfs-samba | |||
Fixed In Version: | Doc Type: | Known Issue | ||
Doc Text: |
A race condition between tier migration and hard link creation results in the hard link operation failing with a 'File exists' error, and logging 'Stale file handle' messages on the client. This does not impact functionality, and file access works as expected.
This race occurs when a file is migrated to the cold tier after a hard link has been created on the cold tier, but before a hard link is created to the data on the hot tier. In this situation, the attempt to create a hard link on the hot tier fails. However, because the migration converts the hard link on the cold tier to a data file, and a hard link to the file already exists on the cold tier, the links exist and work as expected.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1316517 (view as bug list) | Environment: | ||
Last Closed: | 2018-11-08 19:20:36 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: | 1268895, 1316517 |
Description
Rahul Hinduja
2016-02-08 12:15:18 UTC
This looks like a race between tier migration and hardlink creation. If the file is in hot tier, then we create linkfile on cold tier first and then will create link on hot tier. If the file completely moved from hot tier to cold tier, just before the hardlink creation in hot tier, it will fail with ESTALE error, because the inode from brick side would have forgotten . Since we already created hardlink on the destination, it would have converted to the actual file, so everything will work as expected. Upstream patch : http://review.gluster.org/#/c/13672/ This patch will solve the race condition with linkfile creation When the file is in hot tier and linkfile in cold tier 1) Hardlink created on cold tier for linkfile 2) if Link creation on hot tier success then send success to application 3) else if Link creation on hot tier fails 4) Do a lookup on hot tier with source path. 5) if source is present 5.1 if (gfid differ) // File can recreate with different gfid 5.2.1 make link call success 5.2 else if same gfid 5.2.1 fail the link call 6) else if source is not present // Either migrated or deleted 6.1 Do lookup on dst loc in cold tier 6.2 if (dst is not present) 6.2.1 Created link was deleted. Fail the link call 6.3 else if dst is present 6.3.1 if it is linkto file // source could have deleted 6.3.1.1 if gfid is same 6.3.1.1.1 delete the linkfile 6.3.1.1.2 fail the link call 6.3.1.2 else if gfid differ 6.3.1.2.1 Fail the link call 6.3.2 else if it is a regular file 6.3.2.1 if gfid is same 6.3.2.1.1 Success the link call. 6.3.2.2 else if gfid is different 6.3.2.2.1 Fail the link call. 7) End This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions As tier is not being actively developed, I'm closing this bug. Feel free to open it if necessary. |