Add backward comptible acting set until all OSDs updated

Add configuration variable to override compatible acting set handling.
Later we'll check the osdmap that all OSDs are updated to use new acting sets.

Fixes: #6990

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 19cff890eb6083eefdb7b709773313b2c8acbcea)
osd: Fix assert which doesn't apply when compat_mode on

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit edaec9a8361396bd4c12814c16610669694b5b6c)
osd: conditionally disable dlclose of erasure code plugins

When profiling, tools such as valgrind --tool=callgrind require that the
dynamically loaded libraries are not dlclosed so they can collect usage
information.

The public ErasureCodePluginRegistry::disable_dlclose boolean is introduced
for this purpose.

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: better performances for the erasure code example

The XOR based example is ten times slower than it could because it uses
the buffer::ptr[] operator. Use a temporary char * instead. It performs
as well as jerasure Reed Solomon when decoding with a single erasure:

$ ceph_erasure_code_benchmark \
   --plugin example  --parameter erasure-code-directory=.libs \
   --parameter erasure-code-technique=example \
   --parameter erasure-code-k=2 --parameter erasure-code-m=1 \
   --erasure 1 --workload decode --iterations 5000
8.095007	5GB

$ ceph_erasure_code_benchmark \
   --plugin jerasure  --parameter erasure-code-directory=.libs \
   --parameter erasure-code-technique=reed_sol_van \
   --parameter erasure-code-k=10 --parameter erasure-code-m=6 \
   --erasure 1 --workload decode --iterations 5000
7.870990	5GB

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: set erasure code packet size default to 2048

As shown in
https://www.usenix.org/legacy/events/fast09/tech/full_papers/plank/plank_html/
under "Impact of the Packet Size", the optimal for is in the order of 1k
rather than the current default of 8. Benchmarks are required to find
the actual optimum.

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: erasure code benchmark tool

Implement the ceph_erasure_code_benchmark utility to:

* load an erasure code plugin

* loop over the encode/decode function using the parameters from the
  command line

* print the number of bytes encoded/decoded and the time to process

When decoding, random chunks ( as set with --erasures ) are lost on each
run.

For instance:

    $ ceph_erasure_code_benchmark \
       --plugin jerasure \
       --parameter erasure-code-directory=.libs \
       --parameter erasure-code-technique=reed_sol_van \
       --parameter erasure-code-k=2 \
       --parameter erasure-code-m=2 \
       --workload decode \
       --erasures 2 \
       --iterations 1000
    0.964759	1048576

shows 1GB is decoded in 1second.

It is intended to be used by other scripts to present a human readable
output or detect performance regressions.

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: erasure code benchmark workunit

Display benchmark results for the default erasure code plugins, in a tab
separated CSV file. The first two column contain the amount of KB
that were coded or decoded, for a given combination of parameters
displayed in the following fields.

seconds	KB	plugin	k	m	work.	iter.	size	eras.
1.2	10	example	2	1	encode	10	1024	0
0.5	10	example	2	1	decode	10	1024	1

It can be used as input for a human readable report. It is also intented
to be used to show if a given version of an erasure code plugin performs
better than another.

The last column ( not shown above for brievety ) is the exact command
that was run to produce the result so it can be copy / pasted to
reproduce them or to profile.

Only the jerasure techniques mentionned in
https://www.usenix.org/legacy/events/fast09/tech/full_papers/plank/plank_html/
are benchmarked, the others are assumed to be less interesting.

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: erasure code benchmark is installed is part of ceph-test

Add to the packaging for RPMs and DEBs

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: git ignore erasure code benchmark binary

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #933 from dachary/wip-erasure-code-benchmark

osd: erasure code benchmark tool

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
buffer: use int64_t instead of loff_t

Because portability.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Merge pull request #916 from ceph/port/buffer

buffer: use int64_t instead of loff_t

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #460 from toabctl/build-depends

Enable libs3 support for debian packages

Reviewed-by: Sage Weil <sage@inktank.com>
unittests: fail if one test fail

vstart_wrapped_tests must return on error if one of the tests
fail.

Signed-off-by: Loic Dachary <loic@dachary.org>
doc/release-notes: v0.67.5

Signed-off-by: Sage Weil <sage@inktank.com>
mon: pool create will not fail if the type differs

It looked like it worked because the wrapper hide the error. The failing
tests are commented out so that the other tests can be used.

Signed-off-by: Loic Dachary <loic@dachary.org>
Revert "Enable libs3 support for debian packages"

This reverts commit 8814265f0888f8091a7d83a900ffd6b65ae77f34.

Or not!  This adds a build-time dependency which none of the gitbuilders
have, so scrap it.
Merge pull request #818 from ceph/wip-rgw-standalone-2

Wip rgw standalone 2

Reviewed-by: Sage Weil <sage@inktank.com>
rgw: abstract RGWProcess

RGWProcess is a generic request handler that sends request to the
workqueue for processing.
Add RGWFCGXProcess specialization. Later we'll add a new frontend that
will leverage that.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add some debug output

Dump request environment when starting processing request. We used to do
it before, but it was recently dropped as part of a cleanup.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>