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

test/ceph_test_objectstore: make settings update and restore less error prone #21145

Merged
merged 4 commits into from Apr 17, 2018

Conversation

ifed01
Copy link
Contributor

@ifed01 ifed01 commented Mar 30, 2018

StoreTextFixture provides stack to preserve previously settings and automatically restores them on text case tear down.

@ifed01 ifed01 force-pushed the wip-ifed-store-test-improve branch 2 times, most recently from 9946e3f to 545ad35 Compare April 4, 2018 13:35
@ifed01 ifed01 added the cleanup label Apr 4, 2018
@ifed01
Copy link
Contributor Author

ifed01 commented Apr 4, 2018

retest this please

1 similar comment
@ifed01
Copy link
Contributor Author

ifed01 commented Apr 6, 2018

retest this please

@ifed01 ifed01 requested a review from liewegas April 10, 2018 11:15
@ifed01
Copy link
Contributor Author

ifed01 commented Apr 10, 2018

@liewegas - mind reviewing?

// we keep this stuff 'unsafe' out of test case scope to be able to update ANY
// config settings. Hence setting it to 'safe' here to proceed with the test
// case
g_conf->set_safe_to_start_threads();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit confuses me.. if we set it here, then a SetVal() in the test case may not work, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liewegas - the idea and rationale of this stuff is to provide a way to adjust config settings that are prohibited in run-time, primarily bluestore_min_alloc_size.
Instead of introducing some additional flags/options to md_config_t I decided to rely on this flag. The idea is to clear it out of test case scope - see main() and TeadDown and set in SetUp. Once cleared it allows to set desired config parameters - that we tend to do prior to SetUp in relevant test cases, see StartDeferred() stuff. And setting it here forbids config updates from test case body as it was before. Moreover that didn't and wouldn't work anyway. And new SetVal allows to detect such issues by using set_value_or_die.
So long story short - this way we're able to update that 'protected' parameters out of test case only.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
prone.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
test case run.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
@ifed01 ifed01 force-pushed the wip-ifed-store-test-improve branch from 545ad35 to fe51200 Compare April 10, 2018 17:04
@ifed01
Copy link
Contributor Author

ifed01 commented Apr 11, 2018

retest this please

@liewegas liewegas added this to the mimic milestone Apr 12, 2018
@liewegas
Copy link
Member

retest this please

@liewegas liewegas merged commit 3d1e7ee into master Apr 17, 2018
@liewegas liewegas deleted the wip-ifed-store-test-improve branch April 17, 2018 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants