mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
test: add read balance mode test case
Signed-off-by: Zheng Yin <zhengyin@cmss.chinamobile.com>
This commit is contained in:
parent
d92be8b585
commit
18e683932e
11
qa/suites/rbd/qemu/features/readbalance.yaml
Normal file
11
qa/suites/rbd/qemu/features/readbalance.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
overrides:
|
||||||
|
ceph:
|
||||||
|
conf:
|
||||||
|
client:
|
||||||
|
rbd read from replica policy: balance
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- exec:
|
||||||
|
osd.0:
|
||||||
|
- ceph osd require-osd-release octopus
|
||||||
|
- ceph osd set-require-min-compat-client octopus
|
@ -98,6 +98,7 @@ struct MockImageCtx {
|
|||||||
blkin_trace_all(image_ctx.blkin_trace_all),
|
blkin_trace_all(image_ctx.blkin_trace_all),
|
||||||
enable_alloc_hint(image_ctx.enable_alloc_hint),
|
enable_alloc_hint(image_ctx.enable_alloc_hint),
|
||||||
alloc_hint_flags(image_ctx.alloc_hint_flags),
|
alloc_hint_flags(image_ctx.alloc_hint_flags),
|
||||||
|
read_flags(image_ctx.read_flags),
|
||||||
ignore_migrating(image_ctx.ignore_migrating),
|
ignore_migrating(image_ctx.ignore_migrating),
|
||||||
enable_sparse_copyup(image_ctx.enable_sparse_copyup),
|
enable_sparse_copyup(image_ctx.enable_sparse_copyup),
|
||||||
mtime_update_interval(image_ctx.mtime_update_interval),
|
mtime_update_interval(image_ctx.mtime_update_interval),
|
||||||
@ -305,6 +306,7 @@ struct MockImageCtx {
|
|||||||
bool blkin_trace_all;
|
bool blkin_trace_all;
|
||||||
bool enable_alloc_hint;
|
bool enable_alloc_hint;
|
||||||
uint32_t alloc_hint_flags;
|
uint32_t alloc_hint_flags;
|
||||||
|
uint32_t read_flags;
|
||||||
bool ignore_migrating;
|
bool ignore_migrating;
|
||||||
bool enable_sparse_copyup;
|
bool enable_sparse_copyup;
|
||||||
uint64_t mtime_update_interval;
|
uint64_t mtime_update_interval;
|
||||||
|
@ -1948,6 +1948,7 @@ TEST_F(TestLibRBD, TestIO)
|
|||||||
uint64_t size = 2 << 20;
|
uint64_t size = 2 << 20;
|
||||||
|
|
||||||
ASSERT_EQ(0, create_image(ioctx, name.c_str(), size, &order));
|
ASSERT_EQ(0, create_image(ioctx, name.c_str(), size, &order));
|
||||||
|
ASSERT_EQ(0, rados_conf_set(_cluster, "rbd_read_from_replica_policy", "balance"));
|
||||||
ASSERT_EQ(0, rbd_open(ioctx, name.c_str(), &image, NULL));
|
ASSERT_EQ(0, rbd_open(ioctx, name.c_str(), &image, NULL));
|
||||||
|
|
||||||
char test_data[TEST_IO_SIZE + 1];
|
char test_data[TEST_IO_SIZE + 1];
|
||||||
|
Loading…
Reference in New Issue
Block a user