summaryrefslogtreecommitdiffstats
path: root/qa/standalone
diff options
context:
space:
mode:
authorRadoslaw Zarzynski <rzarzyns@redhat.com>2024-07-10 09:21:51 +0200
committerGitHub <noreply@github.com>2024-07-10 09:21:51 +0200
commitf25386f7bcbbb7433de5e4d809e6dc601bd7cee8 (patch)
treed0204d228092aa74c8ad8902c298909e6b821629 /qa/standalone
parentMerge pull request #58484 from mcv21/patch-2 (diff)
parentosd: improve debugs on EC paths that turned problematic in testing (diff)
downloadceph-f25386f7bcbbb7433de5e4d809e6dc601bd7cee8.tar.xz
ceph-f25386f7bcbbb7433de5e4d809e6dc601bd7cee8.zip
Merge pull request #55196 from rzarzynski/wip-osd-ec-partial-reads
osd: EC Partial Stripe Reads (Retry of #23138 and #52746) Reviewed-by: Samuel Just <sjust@redhat.com>
Diffstat (limited to 'qa/standalone')
-rwxr-xr-xqa/standalone/erasure-code/test-erasure-eio.sh32
1 files changed, 26 insertions, 6 deletions
diff --git a/qa/standalone/erasure-code/test-erasure-eio.sh b/qa/standalone/erasure-code/test-erasure-eio.sh
index 42c538eb918..4c23b4b4488 100755
--- a/qa/standalone/erasure-code/test-erasure-eio.sh
+++ b/qa/standalone/erasure-code/test-erasure-eio.sh
@@ -178,9 +178,19 @@ function rados_put_get_data() {
wait_for_clean || return 1
# Won't check for eio on get here -- recovery above might have fixed it
else
- shard_id=$(expr $shard_id + 1)
- inject_$inject ec data $poolname $objname $dir $shard_id || return 1
- rados_get $dir $poolname $objname fail || return 1
+ local another_shard_id=$(expr $shard_id + 1)
+ inject_$inject ec data $poolname $objname $dir $another_shard_id || return 1
+ if [ $shard_id -eq 1 -a $another_shard_id -eq 2 ];
+ then
+ # we're reading 4 kb long object while the stripe size is 8 kb.
+ # as we do partial reads and this request can be satisfied
+ # from the undamaged shard 0, we expect a success.
+ rados_get $dir $poolname $objname || return 1
+ else
+ # both shards 0 and 1 are demaged. there is no way no serve
+ # the requests, regardless of partial reads
+ rados_get $dir $poolname $objname fail || return 1
+ fi
rm $dir/ORIGINAL
fi
@@ -238,9 +248,19 @@ function rados_get_data_bad_size() {
rados_get $dir $poolname $objname || return 1
# Leave objname and modify another shard
- shard_id=$(expr $shard_id + 1)
- set_size $objname $dir $shard_id $bytes $mode || return 1
- rados_get $dir $poolname $objname fail || return 1
+ local another_shard_id=$(expr $shard_id + 1)
+ set_size $objname $dir $another_shard_id $bytes $mode || return 1
+ if [ $shard_id -eq 1 -a $another_shard_id -eq 2 ];
+ then
+ # we're reading 4 kb long object while the stripe size is 8 kb.
+ # as we do partial reads and this request can be satisfied
+ # from the undamaged shard 0, we expect a success.
+ rados_get $dir $poolname $objname || return 1
+ else
+ # both shards 0 and 1 are demaged. there is no way no serve
+ # the requests, regardless of partial reads
+ rados_get $dir $poolname $objname fail || return 1
+ fi
rm $dir/ORIGINAL
}