The three rules created by build_simple are identical. They are replaced
by a single rule named replicated_rule which is set to be used by the
data, rbd and metadata pools.
Instead of hardcoding the ruleset number to zero, it is read from
osd_pool_default_crush_ruleset which defaults to zero.
The CEPH_DEFAULT_CRUSH_REPLICATED_RULESET enum is moved from osd_type.h to
config.h because it may be needed when osd_type.h is not included.
Signed-off-by: Loic Dachary <loic@dachary.org>
Assuming firstn is for replica and indep is for erasure. This is a
strong constraint but it is unlikely to make the resulting ruleset unfit
to be used in most cases.
Signed-off-by: Loic Dachary <loic@dachary.org>
Creating an erasure pool will crash the OSD because OSD::_make_pg
asserts if the type is not replicated. The tests related to erasure
coded pool creation are removed from qa/workunits/cephtool/test.sh.
The osd-create-pool.sh unit test covers the cases removed from test.sh
more extensively. The intent is to check the interactions with the MON
only, therefore it does not run an OSD and the absence of erasure code
placement group backend implementation is not an issue.
Signed-off-by: Loic Dachary <loic@dachary.org>
Looping forever on kill does not serve any useful purpose.
Reduce the verbosity of the exit trap to help diagnose error
conditions.
Signed-off-by: Loic Dachary <loic@dachary.org>
The MDS assumes pool 0 and 1 are suitable for data and metadata
respectively. Instead of relying on the CEPH_DATA_RULE and
CEPH_METADATA_RULE constants that only match by chance, set a hardcoded
value specific to MDS to reduce the fragility of the hardcoded
assumption.
Signed-off-by: Loic Dachary <loic@dachary.org>
The deprecated attribute argument was introduced in gcc 4.5
http://gcc.gnu.org/gcc-4.5/changes.html and centos6 has a lower version.
Signed-off-by: Loic Dachary <loic@dachary.org>
(currently only in some librados operations)
First create the op, only then lock and submit so that we reduce lock
contention.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Use the newly-discovered (for me) deprecated attribute to mark the old
get_version() method and point users toward get_version64(). And fix a
couple of users in the kvstore code!
Signed-off-by: Sage Weil <sage@inktank.com>
The parent is always a snapshot. We may want to treat it differently
than other snaps by virtue of it (likely) being a more highly-shared
image.
By default, localize parent reads.
Signed-off-by: Sage Weil <sage@inktank.com>
It may be the case that stop.sh can't stop a process for reasons
unrelated to vstart.sh. Because apache runs independantly, for
instance. Instead of trying forever, try twice in a raw ( should be
enough 99% of the case ) and try three more times, sleeping one second
between each try should be more than enough.
Signed-off-by: Loic Dachary <loic@dachary.org>
Pass the features in explicitly so that we can use messages we've just
decoded in resend_routed_requests().
Keep the features in struct RoutedRequest.
Renamed conn_features -> con_features while we are here.
Signed-off-by: Sage Weil <sage@inktank.com>
- whitespace in crush.h
- format is_out() definition and call site to 80 columns
- whitespace around local_fallback_tries in crush_choose_firstn()
All of this is to shrink the diff with the kernel implementation.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
kernel-doc syntax is "@arg: desc", not "@param arg desc". In addition,
these comments are usually placed around function definitions instead
of function declarations. Follow these guidelines to shrink the diff.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Kernel implementation is located in net/, and use of "unsigned int" is
preferred to bare "unsigned" in net tree (as proven by several net/
cleanups). Follow this guideline to shrink the diff.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
The --pidfile option of pkill is not supported by all versions. Use kill
instead for compatibility. Instead of looping on : loop on sleep 1 so an
inifinite loop does is slower at filling the disk.
Signed-off-by: Loic Dachary <loic@dachary.org>
We are relying on connection features to track OSD supported
features. However, we were not forwarding connection features
when we forwarded a message from a peon to the leader. That
was breaking the OSD feature tracking.
Fixes: 7051
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
It is inconvenient to run such tests in the
qa/workunits/cephtool/test.sh because they require that the mon is
restarted to test errors in the format of the default erasure code
properties and check the appropriate error message is output.
osd-pool-create.sh runs a single mon from sources using command
line options and a temporary directory, the same way vstart.sh does but
lightweight.
Signed-off-by: Loic Dachary <loic@dachary.org>
If no properties are set when creating an erasure coded pool, default to
using the jerasure plugin with the cauchy_good technique which is the
fastest.
The defaults are set with osd_pool_default_erasure_code_properties.
The erasure code plugins are loaded from the directory specified in the
erasure-code-directory property. Contrary to the other properties it
will most commonly be the same throughout the cluster. The default is
set to /usr/lib/ceph/erasure-code with
osd_pool_default_erasure_code_directory
Signed-off-by: Loic Dachary <loic@dachary.org>