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

common: recursive implementation of config::expand_meta … #1046

Merged
merged 4 commits into from Jan 7, 2014
Merged

common: recursive implementation of config::expand_meta … #1046

merged 4 commits into from Jan 7, 2014

Conversation

ghost
Copy link

@ghost ghost commented Jan 5, 2014

Using a recursive implementation of variable expansions make it easier
to protect against loops and provide human readable messages when they
happen.

It also enables one variable to be substituted multiple times in the
same configuration option instead of just once because it is confused
with a variable expansion loop.

Loic Dachary added 4 commits January 5, 2014 16:11
Signed-off-by: Loic Dachary <loic@dachary.org>
Using a recursive implementation of variable expansions make it easier
to protect against loops and provide human readable messages when they
happen.

It also enables one variable to be substituted multiple times in the
same configuration option instead of just once because it is confused
with a variable expansion loop.

http://tracker.ceph.com/issues/7103 fixes: #7103

Signed-off-by: Loic Dachary <loic@dachary.org>
Part of the config.cc tests are in test/confutils.cc but they do not
cover meta variable expansion. Create unittest_config for config.{h,cc}
specific tests.

The test_md_config_t is made a friend of md_config_t to allow testing
private and protected methods.

test/cli/ceph-conf/show-config-value.t is used to check that the human
readable message message shows as expected when there is an expansion
loop.

Signed-off-by: Loic Dachary <loic@dachary.org>
liewegas pushed a commit that referenced this pull request Jan 7, 2014
common: recursive implementation of config::expand_meta …

Reviewed-by: Sage Weil <sage@inktank.com>
@liewegas liewegas merged commit ffc9d72 into ceph:master Jan 7, 2014
liewegas pushed a commit that referenced this pull request Dec 14, 2016
cephfs: test readahead is working

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant