Skip to content

erasure-code: query plugin for erasure-code-profile defaults - #4710

Merged
6 commits merged into
masterfrom
unknown repository
Jun 1, 2015
Merged

6 commits merged into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented May 17, 2015

Copy link
Copy Markdown

http://tracker.ceph.com/issues/9589

In a nutshell it exposes the default values of an erasure coded profile to the user. For instance the failure domain used to build the crush ruleset.

@ghost ghost added feature core labels May 17, 2015
Comment thread src/erasure-code/ErasureCode.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could probably avoid calling find on a profile 3 times with something like:
ErasureCodeProfile::const_iterator it = profile.find(name);
std::string p;
if(it == profile.end() || it->second.size() == 0) {
profile[name] = p = default_value;
} else {
p = it->second;
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You are right. I would like to keep this change about implementing one useful functionality and refactoring. It would make it more complicated to review if there also were performance enhancements on top of it. And this code is rarely called so performances are not really an issue.

@ghost ghost changed the title DNM: erasure-code: query plugin for erasure-code-profile defaults erasure-code: query plugin for erasure-code-profile defaults May 26, 2015
@ghost

ghost commented May 26, 2015

Copy link
Copy Markdown
Author

@apeters1971 would you have time to review this series ? I hope you'll like it :-)

@ghost

ghost commented May 27, 2015

Copy link
Copy Markdown
Author
./virtualenv/bin/teuthology-suite --subset 1/5 --priority 1000 --suite rados/thrash-erasure-code --suite-branch master --machine-type plana,burnupi,mira --distro ubuntu --email [email protected] --ceph wip-9589-default-erasure-code-profile

One failure which is environmental: plana25 crashed http://pulpito.ceph.com/loic-2015-05-27_15:31:57-rados:thrash-erasure-code-wip-9589-default-erasure-code-profile---basic-multi/911223/

2015-05-29T01:04:20.974 ERROR:teuthology.nuke:Could not nuke the following targets:
targets:
  [email protected]: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC85wgMM7frtcFeCfatlKcc0Ru1HB4X/557M//6iIT2hQExLRtPADyOpfZdZmhP

@ghost

ghost commented May 27, 2015

Copy link
Copy Markdown
Author
./virtualenv/bin/teuthology-suite --filter-out=rhel,ext4,btrfs --priority 1000 --suite rados/thrash-erasure-code-isa --suite-branch master --machine-type plana,burnupi,mira --distro ubuntu --email [email protected] --ceph wip-9589-default-erasure-code-profile

all good

@ghost

ghost commented May 29, 2015

Copy link
Copy Markdown
Author
./virtualenv/bin/teuthology-suite --subset 4/18 --priority 1000 --suite rados --suite-branch master --machine-type plana,burnupi,mira --distro ubuntu --email [email protected] --ceph wip-9589-default-erasure-code-profile

http://pulpito.ceph.com/loic-2015-05-29_14:21:19-rados-wip-9589-default-erasure-code-profile---basic-multi/
lots of failures because it needs to be rebased against the latest master implementing write_excl and append_excl

2015-05-30T00:02:12.871 INFO:tasks.rados.rados.0.plana22.stderr:unknown op write_excl

@ghost

ghost commented May 29, 2015

Copy link
Copy Markdown
Author

@apeters1971 the automated tests seem to pass, this is a good sign

@ghost

ghost commented May 30, 2015

Copy link
Copy Markdown
Author

re-running all jobs because the suite changed in the meantime and --subset combined with --filter from the previous run does not select the intended jobs.

./virtualenv/bin/teuthology-suite --subset 4/18 --priority 1000 --suite rados --suite-branch master --machine-type plana,burnupi,mira --distro ubuntu --email [email protected] --ceph wip-9589-default-erasure-code-profile

http://pulpito.ceph.com/loic-2015-05-31_09:41:02-rados-wip-9589-default-erasure-code-profile---basic-multi/

ldachary added 6 commits May 31, 2015 00:01
The to_int, to_bool prototypes are modified and the default values are
changed to string instead of int. If a default value is set, the profile
is modified to contain the default value.

The to_string helper is added so it can be used to set the default value
of a string, in a way that is consistent with to_int and to_bool.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <[email protected]>
Update the ErasureCodeIsa::init function to use string default values
and update the profile accordingly.

Also fix a bug by which the plugin would incorrectly report using the
default technique when the reed_sol_van or cauchy techniques are the
only legitimate values.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <[email protected]>
Update the ErasureCodeJerasure::init function to use string default values
and update the profile accordingly.

The ErasureCodeJerasure::revert_to_default prototype is modified so it
can update the profile.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <[email protected]>
Instead of always returning 0

Signed-off-by: Loic Dachary <[email protected]>
Update the ErasureCodeLrc::init function to use string default values
and update the profile accordingly.

If the k,m,l values are set and generate mappings and layers entries,
those are not stored in the profile. The details of what k,m,l create
are private and not exposed to the caller.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <[email protected]>
Update the ErasureCodeShec::init function to use string default
values. The default profile values for technique, ruleset-root and
ruleset-failure-domain are set for the user to see.

The error message when an invalid technique is provided is written to
the error stream to be returned to the user instead of being written to
the OSD log.

Updating other values from the profile would require deeper changes and
is left for later.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <[email protected]>
@ghost

ghost commented Jun 1, 2015

Copy link
Copy Markdown
Author

@liewegas I would be grateful if you could take a quick look. It has been tested ( rados/thrash-erasure-code-* and a --subset 4/18 rados run in addition ). I'm confident it can be merged but an extra pair of eyes would be good. The reason for this change is to improve error reporting and validation for erasure code profiles at #4712 and #4713.

@apeters1971

Copy link
Copy Markdown
Contributor

@dachary I
Loic I read through the code and it looks fine to me!

@ghost ghost assigned apeters1971 Jun 1, 2015
@ghost

ghost commented Jun 1, 2015

Copy link
Copy Markdown
Author

@apeters1971 thanks !

ghost pushed a commit that referenced this pull request Jun 1, 2015
…rofile

erasure-code: query plugin for erasure-code-profile defaults

Reviewed-by: Andreas Peters <[email protected]>
@ghost
ghost merged commit 8b7a6fd into ceph:master Jun 1, 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.

4 participants