mirror of
https://github.com/ceph/ceph
synced 2025-04-11 04:02:04 +00:00
Merge pull request #14807 from liewegas/wip-jewel-x
ceph_test_rados_api_tier: tolerate ENOENT from 'pg scrub' Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
add2015fe3
@ -530,11 +530,18 @@ TEST_F(LibRadosTwoPoolsPP, PromoteSnapScrub) {
|
|||||||
IoCtx cache_ioctx;
|
IoCtx cache_ioctx;
|
||||||
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
|
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
|
||||||
for (int i=0; i<10; ++i) {
|
for (int i=0; i<10; ++i) {
|
||||||
ostringstream ss;
|
do {
|
||||||
ss << "{\"prefix\": \"pg scrub\", \"pgid\": \""
|
ostringstream ss;
|
||||||
<< cache_ioctx.get_id() << "." << i
|
ss << "{\"prefix\": \"pg scrub\", \"pgid\": \""
|
||||||
<< "\"}";
|
<< cache_ioctx.get_id() << "." << i
|
||||||
cluster.mon_command(ss.str(), inbl, NULL, NULL);
|
<< "\"}";
|
||||||
|
int r = cluster.mon_command(ss.str(), inbl, NULL, NULL);
|
||||||
|
if (r == -ENOENT || // in case mgr osdmap is stale
|
||||||
|
r == -EAGAIN) {
|
||||||
|
sleep(5);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} while (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// give it a few seconds to go. this is sloppy but is usually enough time
|
// give it a few seconds to go. this is sloppy but is usually enough time
|
||||||
@ -3072,8 +3079,11 @@ TEST_F(LibRadosTwoPoolsECPP, PromoteSnap) {
|
|||||||
<< hash
|
<< hash
|
||||||
<< "\"}";
|
<< "\"}";
|
||||||
int r = cluster.mon_command(ss.str(), inbl, NULL, NULL);
|
int r = cluster.mon_command(ss.str(), inbl, NULL, NULL);
|
||||||
if (r == -EAGAIN)
|
if (r == -EAGAIN ||
|
||||||
|
r == -ENOENT) { // in case mgr osdmap is a bit stale
|
||||||
|
sleep(5);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
ASSERT_EQ(0, r);
|
ASSERT_EQ(0, r);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user