Repository navigation
normalize and verify the erasure code profile - #4712
Merged
4 commits merged intoJun 3, 2015
Merged
4 commits merged into
4 commits merged into
Conversation
Author
|
@apeters1971 if you feel like it, this one is a lot simpler :-) |
Add the get_profile method to the interface and make it a pure virtual. Each plugin is expected to return the profile currently in use. Although the profile is also stored in the OSDMap, it provides a convenient introspection method to validate that the profile being set is indeed the profile being used. Signed-off-by: Loic Dachary <[email protected]>
The ErasureCode::init function is implemented to store the profile and is called by the init method of each plugin. The ErasureCode::get_profile function is implemented to return the profile that was stored. A specialized ostream<< function is implemented to facilitate the display of the profile. Signed-off-by: Loic Dachary <[email protected]>
An erasure-code profile set by the user may be modified by the erasure code plugin, most of the time to add default values for domain failure, techniques etc. Whenever the monitor gets an erasure code profile from the user or the configuration file, it uses it to initialize the corresponding erasure code plugin and: * validate the profile and get an error if it is invalid * get a normalized profile The normalized profile is stored in the OSDMap. Should the user try to set the same erasure code profile with the different values that lead to the same normalized form, the modification will be accepted as a noop, as if the same values were given. For instance: ceph osd erasure-code-profile set myprofile k=2 ceph osd erasure-code-profile set myprofile k=2 m=1 are the same because the default value for m is 1 for the default jerasure plugin. If the normalized form is not used for storage and comparison, the second call with m=1 will fail and require --force to override myprofile, although the user can read from the documentation that it matches the default value. Signed-off-by: Loic Dachary <[email protected]>
The profile stored by the plugin may be different from the one set by the user: it includes defaults. When the plugin is initialized, the profile is modified to include the default values. Verify that the modified profile matches what the get_profile() method returns, to guard against inconsistencies from the erasure code plugin implementation. http://tracker.ceph.com/issues/11663 Fixes: #11663 Signed-off-by: Loic Dachary <[email protected]>
Author
./virtualenv/bin/teuthology-suite --subset $(expr $RANDOM % 18)/18 --priority 101 --suite rados/thrash-erasure-code --suite-branch master --machine-type plana,burnupi,mira --distro ubuntu --email [email protected] --ceph wip-11663-verify-erasure-code-profile 2015-06-01 23:40:59,860.860 INFO:teuthology.suite:Passed subset=0/18 |
Author
|
verify LRC separately because it's not merged in ceph-qa-suite yet ./virtualenv/bin/teuthology-suite --subset $(expr $RANDOM % 18)/18 --priority 101 --suite rados/thrash-erasure-code-big --suite-branch wip-11666-erasure-code-lrc --machine-type plana,burnupi,mira --distro ubuntu --email [email protected] --ceph wip-11663-verify-erasure-code-profile 2015-06-02 08:32:37,242.242 INFO:teuthology.suite:Passed subset=9/18 |
Author
|
@apeters1971 it passed integration tests, except for shec which does not have them yet. |
Contributor
|
Hi Loic, looks ok. The only ugly part is that "goto reply" and "goto wait" in the OSDMonitor code, but they were there probably before ... |
Author
|
@apeters1971 yeah, I did not invent this goto, they are all over the place. You get used to it though ;-) |
ghost
pushed a commit
that referenced
this pull request
Jun 3, 2015
…rofile normalize and verify the erasure code profile Reviewed-by: Andreas Peters <[email protected]>
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
http://tracker.ceph.com/issues/11663