[Bugs] [Bug 1293827] New: fops-during-migration.t fails if hot and cold tiers are dist-rep
bugzilla at redhat.com
bugzilla at redhat.com
Wed Dec 23 08:15:05 UTC 2015
https://bugzilla.redhat.com/show_bug.cgi?id=1293827
Bug ID: 1293827
Summary: fops-during-migration.t fails if hot and cold tiers
are dist-rep
Product: GlusterFS
Version: 3.7.6
Component: replicate
Keywords: Triaged
Severity: high
Priority: high
Assignee: bugs at gluster.org
Reporter: nbalacha at redhat.com
CC: bugs at gluster.org, dlambrig at redhat.com,
gluster-bugs at redhat.com, nbalacha at redhat.com
Depends On: 1284823
Blocks: 1285783, 1285625
+++ 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-12-22 14:13:05 EST ---
COMMIT: http://review.gluster.org/12985 committed in master by Dan Lambright
(dlambrig at redhat.com)
------
commit 430ad405294993ebb16387232281cc5a4f854c75
Author: N Balachandran <nbalacha at redhat.com>
Date: Wed Dec 16 21:09:22 2015 +0530
cluster/dht : Ftruncate on migrating file fails with EINVAL
What:
If dht_open is called on a migrating file after the inode_ctx is set,
subsequent FOPs on that fd do not open the fd on the dst subvol.
This is seen when the open-ftruncate-close sequence is repeatedly
called on a migrating file.
A second call to the sequence described above causes dht_truncate_cbk
to call dht_truncate2 as the dht_inode_ctx was already set by the first
call. As dht_rebalance_in_progress_check is not called, the fd is not
opened on the dst subvol.
On a distributed-replicate volume, this causes AFR to
open the fd using afr_fix_open, but with the wrong flags, causing
posix_ftruncate to fail with EINVAL.
The fix: We require fd specific information to make a decision while
handling migrating files.
Set the fd_ctx to indicate the fd has been opened on the dst subvol
and check if it has been set while processing Phase1/Phase2 checks
in the FOP callback functions.
Change-Id: I43cdcd8017b4a11e18afdd210469de7cd9a5ef14
BUG: 1284823
Signed-off-by: N Balachandran <nbalacha at redhat.com>
Reviewed-on: http://review.gluster.org/12985
Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
Tested-by: Gluster Build System <jenkins at build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig at redhat.com>
Tested-by: Dan Lambright <dlambrig at redhat.com>
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1284823
[Bug 1284823] fops-during-migration.t fails if hot and cold tiers are
dist-rep
https://bugzilla.redhat.com/show_bug.cgi?id=1285625
[Bug 1285625] fops-during-migration.t fails if hot and cold tiers are
dist-rep
https://bugzilla.redhat.com/show_bug.cgi?id=1285783
[Bug 1285783] fops-during-migration.t fails if hot and cold tiers are
dist-rep
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list