Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/OSDMonitor: fix improper input/testing range of crush somke testing #17179

Merged
merged 1 commit into from Aug 24, 2017

Conversation

Projects
None yet
3 participants
@xiexingguo
Copy link
Member

commented Aug 23, 2017

CrushTester::test() will reset testing range to [0, 1023] whenever
min_x or max_x is negative and the constructor of CrushTester will
always default min_x and max_x to -1.

Thus to set the test range correctly, you have to specify both min_x and max_x.
Local test shows this patch shall decrease the time consumed by the crush
smoke testing to approximate 1/20 of those without this.

For example:
crush somke test duration: 0.668354 seconds ->
crush somke test duration: 0.012592 seconds

Signed-off-by: xie xingguo xie.xingguo@zte.com.cn

@tchaikov
Copy link
Contributor

left a comment

lgtm modulo the nit.

tester.set_max_x(50);
auto start = ceph_clock_now();

This comment has been minimized.

Copy link
@tchaikov

tchaikov Aug 23, 2017

Contributor

might want to use ceph::coarse_mono_clock::now() for this purpose.

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Aug 23, 2017

Author Member

Repushed. Thanks, kefu.

@tchaikov

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2017

this might help with the smoke test timeout issue http://tracker.ceph.com/issues/20909. so marking it "bug-fix" and "needs-backport".

@xiexingguo xiexingguo force-pushed the xiexingguo:wip-crush-smoke-test branch from 337884e to 5f384b6 Aug 23, 2017

if (r < 0) {
dout(10) << " tester.test_with_fork returns " << r
<< ": " << ess.str() << dendl;
ss << "crush smoke test failed with " << r << ": " << ess.str();
err = r;
goto reply;
}
dout(10) << " crush test result " << ess.str() << dendl;
dout(10) << __func__ << " crush somke test duration: "

This comment has been minimized.

Copy link
@tchaikov

tchaikov Aug 23, 2017

Contributor

can we dump ess.str() like before?

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Aug 23, 2017

Author Member

It does not output anything if the test succeeds, but it does no harm to keep it.

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Aug 23, 2017

Author Member

Updated

This comment has been minimized.

Copy link
@tchaikov

tchaikov Aug 23, 2017

Contributor

okay, cool.

@xiexingguo xiexingguo force-pushed the xiexingguo:wip-crush-smoke-test branch 2 times, most recently from 9c11f57 to e128a1e Aug 23, 2017

@tchaikov tchaikov added the needs-qa label Aug 23, 2017

mon/OSDMonitor: fix improper input/testing range of crush somke testing
CrushTester::test() will reset testing range to [0, 1023] whenever
min_x or max_x is negative and the constructor of CrushTester will
always default min_x and max_x to -1.

Thus to set the test range correctly, you have to specify both min_x and max_x.
Local test shows this patch shall decrease the time consumed by the crush
smoke testing to approximate 1/20 of those without this.

For exmaple:
crush somke test duration: 0.668354 seconds ->
crush somke test duration: 0.012592 seconds

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>

@tchaikov tchaikov merged commit 2df0815 into ceph:master Aug 24, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
@liewegas

This comment has been minimized.

Copy link
Member

commented Aug 24, 2017

fwiw this failed in luminous backport test: /a/sage-2017-08-24_17:38:40-rados-wip-sage-testing2-luminous-20170824a-distro-basic-smithi/1560312

2017-08-24T19:29:45.785 INFO:tasks.workunit.client.0.smithi017.stderr:+ ceph osd pool create fooo 123 123 erasure default
2017-08-24T19:29:45.787 INFO:tasks.workunit.client.0.smithi017.stderr:2017-08-24 19:29:45.073532 7f66b4337700 -1 WARNING: all dangerous and experimental features are enabled.
2017-08-24T19:29:45.807 INFO:tasks.workunit.client.0.smithi017.stderr:2017-08-24 19:29:45.143495 7f66b4337700 -1 WARNING: all dangerous and experimental features are enabled.
2017-08-24T19:29:50.489 INFO:tasks.ceph.mon.a.smithi017.stderr:: timed out (5 sec)
2017-08-24T19:29:53.568 INFO:tasks.workunit.client.0.smithi017.stderr:Error ETIMEDOUT: crush test failed with -110: timed out during smoke test (5 seconds)

@xiexingguo xiexingguo deleted the xiexingguo:wip-crush-smoke-test branch Aug 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.