Skip to content

normalize and verify the erasure code profile - #4712

Merged
4 commits merged into
masterfrom
unknown repository
Jun 3, 2015
Merged

4 commits merged into
masterfrom
unknown repository

Conversation

@ghost

ghost commented Jun 1, 2015

Copy link
Copy Markdown
Author

@apeters1971 if you feel like it, this one is a lot simpler :-)

ldachary added 4 commits June 1, 2015 19:52
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]>
@ghost

ghost commented Jun 1, 2015

Copy link
Copy Markdown
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

http://pulpito.ceph.com/loic-2015-06-01_23:40:59-rados:thrash-erasure-code-wip-11663-verify-erasure-code-profile---basic-multi/

@ghost

ghost commented Jun 2, 2015

Copy link
Copy Markdown
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

http://pulpito.ceph.com/loic-2015-06-02_08:32:37-rados:thrash-erasure-code-big-wip-11663-verify-erasure-code-profile---basic-multi/
passes

@ghost ghost changed the title DNM: normalize and verify the erasure code profile normalize and verify the erasure code profile Jun 3, 2015
@ghost

ghost commented Jun 3, 2015

Copy link
Copy Markdown
Author

@apeters1971 it passed integration tests, except for shec which does not have them yet.

@apeters1971

Copy link
Copy Markdown
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 ...

@ghost

ghost commented Jun 3, 2015

Copy link
Copy Markdown
Author

@apeters1971 yeah, I did not invent this goto, they are all over the place. You get used to it though ;-)

@ghost ghost assigned apeters1971 Jun 3, 2015
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]>
@ghost
ghost merged commit 3ca1b50 into ceph:master Jun 3, 2015
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants