Repository navigation
erasure-code: query plugin for erasure-code-profile defaults - #4710
6 commits merged into
Conversation
There was a problem hiding this comment.
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;
}
There was a problem hiding this comment.
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.
|
@apeters1971 would you have time to review this series ? I hope you'll like it :-) |
./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 |
./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 |
./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/ 2015-05-30T00:02:12.871 INFO:tasks.rados.rados.0.plana22.stderr:unknown op write_excl |
|
@apeters1971 the automated tests seem to pass, this is a good sign |
|
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 |
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]>
|
@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. |
|
@dachary I |
|
@apeters1971 thanks ! |
…rofile erasure-code: query plugin for erasure-code-profile defaults Reviewed-by: Andreas Peters <[email protected]>
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.