Bug 1285625

Summary: fops-during-migration.t fails if hot and cold tiers are dist-rep
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Nithya Balachandran <nbalacha>
Component: distributeAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED DUPLICATE QA Contact: storage-qa-internal <storage-qa-internal>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.1CC: bugs, dlambrig, gluster-bugs, nbalacha
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1284823 Environment:
Last Closed: 2015-11-30 05:18:28 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: 1284823, 1285783, 1293827    
Bug Blocks:    

Description Nithya Balachandran 2015-11-26 05:23:12 UTC
+++ This bug was initially created as a clone of Bug #1284823 +++

Description of problem:

tests/basic/tier/fop-during-migration.t was written using pure distribute hot and cold tiers
If the test is modified to have dist-rep cold and hot tiers, the following operation fails with EINVAL:

echo $TEST_STR > $M0/dir1/FILE1



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Modify tests/basic/tier/fop-during-migration.t to use dist-rep tiers
2. run tests/basic/tier/fop-during-migration.t
3.

Actual results:

Fails with EINVAL

Expected results:

The test should pass.

Additional info:

--- Additional comment from Nithya Balachandran on 2015-11-24 04:58:28 EST ---

Analysis:

echo $TEST_STR > $M0/dir1/FILE1

performs an ftruncate operation.

Investigation reveals that when a file is being migrated by the tier layer, the redirection of the ftruncate FOP to the dst subvol fails as posix_ftruncate fails in sys_ftruncate with op_errno EINVAL. This is because the fd being used has flags=0.

AFR calls afr_fix_open() to open the fd on the dst subvol but ends up using flags = 0 (instead of using the required flags). This causes the ftruncate to fail with EINVAL.

--- Additional comment from Vijay Bellur on 2015-11-25 10:50:27 EST ---

REVIEW: http://review.gluster.org/12750 (cluster/dht : Ftruncate on migrating file fails with EINVAL) posted (#1) for review on master by N Balachandran (nbalacha)

Comment 2 Nithya Balachandran 2015-11-30 05:18:28 UTC

*** This bug has been marked as a duplicate of bug 1285783 ***