Commit Graph

30527 Commits

Author SHA1 Message Date
Joao Eduardo Luis
5756c05a22 ceph_osd: add EC to OSD's supported features used by the messenger
Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:20:01 +00:00
Joao Eduardo Luis
59ad6da43a osd: OSD: reflect OSDMap EC flag being set by setting on-disk feature
If OSDMap has the EC feature set, then update our superblock to
reflect as such, making our on-disk format incompatible with previous
OSDs without EC support.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:19:52 +00:00
Joao Eduardo Luis
8ac84db050 mon: OSDMonitor: handle osd features on boot
Add the osd's features to the osd's extra info field in the OSDMap
so we can track which OSDs are able to deal with Erasure Codes.

This will allow us to decide whether or not we are ready to set EC
whenever the user asks us to set EC on a pool -- which shall be
handled by a subsequent commit.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:19:47 +00:00
Joao Eduardo Luis
31743d50a1 osd: OSDMap: add 'features' bit mask field to osd_xinfo_t
And make sure we dump it on osd_xinfo_t::dump().

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:57 +00:00
Joao Eduardo Luis
73992d2ed4 osd: OSDMap: check for erasure pools when getting features
If we have a pool with type Erasure, then we consider we require
CEPH_FEATURE_OSD_ERASURE_CODES.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:57 +00:00
Joao Eduardo Luis
178f684179 osd: OSD: add binary compat feature for Erasure Codes
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:56 +00:00
Joao Eduardo Luis
bfc86a8243 include/ceph_features: add CEPH_FEATURES_OSD_ERASURE_CODES
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:56 +00:00
tamil
fe136845a8 added execute permission to the script
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-12-18 14:32:35 -08:00
tamil
d9e33ea739 rgw workunit to test bucket quota
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-12-18 14:23:54 -08:00
Yehuda Sadeh
c8890ab2d4 rgw: fix use-after-free when releasing completion handle
Backport: emperor, dumpling
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-18 13:11:08 -08:00
Yehuda Sadeh
d6a4f6adfa rgw: don't return data within the librados cb
Fixes: #7030
The callback is running within a single Finisher thread, thus we
shouldn't block there. Append read data to a list and flush it within
the iterate context.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-12-18 13:10:33 -08:00
Sage Weil
e6ad4d4a44 osd: make obc copyfrom blocking generic
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 11:30:18 -08:00
Sage Weil
8dec2b2735 librados, osd: add flags to COPY_FROM
If we initiate a COPY_FROM as part of a FLUSH operation, we will need to
set a flag so that the read-side of the copy and join the existing
in-progress operation without taknig additional locks.

Similarly, we need to pass flags from the client indicating whether we
should ignore overlay or cache logic while performing the copy.  These are
used by the promote and flush logic.

Note that none of these flags are exposed through librados (at least not
at this time).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 11:26:51 -08:00
Sage Weil
25db0de17f Merge pull request #926 from yuyuyu101/wip/6950
Move PerfCounter from ObjectStore.h to FileStore.h

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-18 10:42:40 -08:00
Sage Weil
e54489da06 Merge pull request #961 from dachary/wip-erasure-code-alignment
erasure-code: tests must use aligned buffers

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-18 10:41:31 -08:00
Gregory Farnum
f32a36d24f Merge pull request #967 from ceph/wip-7026
osd/ReplicatedPG: fix hit_set_setup() on_activate()
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-12-18 10:24:00 -08:00
Sage Weil
1bb46c0ec9 Merge pull request #955 from ceph/wip-crush-2
crush: make set_chooseleaf_tries work with firstn chooseleaf, too

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.com>
2013-12-18 10:00:55 -08:00
Loic Dachary
202d1f7b8d Merge pull request #964 from apeters1971/wip-arch-sse2
ARCH: add variable for sse2 register

Reviewed-by: Loic Dachary <loic@dachary.org>
2013-12-18 09:57:18 -08:00
Loic Dachary
e624e16690 crush: silence error messages in unit tests
The error messages are intentional when error conditions are
created. They will create false positive in the gitbuilder parser when
the string error is found.

The --debug-crush flag is detected to allow the caller to reset the
verbosity level.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-18 18:52:52 +01:00
Andreas Peters
9414970362 ARCH: adding SSE2 flag to arch-test 2013-12-18 18:05:17 +01:00
Sage Weil
fd5f40269e Merge pull request #965 from ksperis/rbdmap.upstart
upstart: add rbdmap script

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-18 08:57:29 -08:00
Sage Weil
7e0c84b84d mon/OSDMonitor: 'osd crush show-tunables'
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 08:35:25 -08:00
Sage Weil
88365c2953 crush: expand info about tunables that we dump
Include the tunables profile, and flags indicating whether it is optimal,
legacy, or requires certain features.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 08:35:25 -08:00
Sage Weil
d0f14dfa64 mon: warn if crush has non-optimal tunables
Allow warning to be disabled via ceph.conf.  Link to the docs from the
warning detail.  Add a section to the docs specifically about what to do
about the warning.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 08:35:24 -08:00
Sage Weil
d129e09e57 crush: add set_choose_local_[fallback_]tries steps
This alls all of the tunables to be overridden by a specific rule.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 08:35:24 -08:00
Loic Dachary
d76188d760 Merge pull request #952 from kri5/master
vstart: Update apache conf to run against apache 2.4

Reviewed-by: Loic Dachary <loic@dachary.org>
2013-12-18 07:00:42 -08:00
Christophe Courtaut
30f8aa1d7c vstart: Update apache conf to run against apache 2.4
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-12-18 15:54:53 +01:00
Laurent Barbe
b86d450ad4 upstart: add rbdmap script
Upstart script for mapping / unmapping rbd device based on /etc/ceph/rbdmap file.
It does not mount or unmount filesystem, this part should be performed by _netdev option in fstab.

Signed-off-by: Laurent Barbe <laurent@ksperis.com>
2013-12-18 14:20:24 +01:00
Andreas Peters
e4537d31d9 ARCH: add variable for sse2 register 2013-12-18 11:16:52 +01:00
Sage Weil
0d217cf9e9 qa/workunits/cephtool/test.sh: clean up our client.xx.keyring
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-17 18:18:46 -08:00
Sage Weil
7e4a800488 osd/ReplicatedPG: fix hit_set_setup() on_activate()
Didn't read that if carefully the first time around!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-17 15:58:21 -08:00
David Zafman
434dce1ffe Merge pull request #960 from ceph/wip-6990
Add backward comptible acting set until all OSDs updated

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-12-17 11:46:48 -08:00
David Zafman
19cff890eb 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>
2013-12-17 11:43:40 -08:00
Loic Dachary
b1530679a8 erasure-code: tests must use aligned buffers
The underlying code assumes the memory buffer is aligned on a long
boundary which is not always the case. Using buffer::create_page_aligned
which calls posix_memalign ensure the allocated buffer starts at an
address that is properly aligned.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-17 20:26:01 +01:00
Sage Weil
2e5a461e4a Merge pull request #953 from dachary/wip-qa-suite
use qa/workunits/cephtool/test.sh as a unittest

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-17 10:46:49 -08:00
Alexandre Oliva
f5d32a33d2 mds: drop unused find_ino_dir
Remove all traces of find_ino_dir, it is no longer used.

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
2013-12-17 09:03:37 -08:00
Alexandre Oliva
c60a3644eb Fix typo in #undef in ceph-dencoder
Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-17 09:02:55 -08:00
Loic Dachary
9e456555ff qa: add ../qa/workunits/cephtool/test.sh to unittests
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-17 17:53:02 +01:00
Sage Weil
526e2528cb Merge pull request #957 from ceph/wip-rbd-coverity
rbd: make coverity happy

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-17 08:51:32 -08:00
Loic Dachary
c1eb55c6b0 qa: vstart wrapper helper for unittests
Primarily useful to run scripts from qa/workunits as part of make check.

vstart_wrapper.sh starts a vstart.sh cluster, runs the command given in
argument and tearsdown cluster when it completes.

The vstart_wrapped_tests.sh script contains the list of scripts that
need the vstart_wrapper.sh to run. It would not be necessary if automake
allowed passing argument to tests scripts. It also adds markers to the
output to facilitate searching the output because it can be very verbose.

This wrapper is kept simple and will probably evolve into something more
sophisticated depending on the scripts being added to
vstart_wrapper_tests.sh. There are numerous options, ranging from
parsing the yaml from ceph-qa-suite to figure out the configuration
cluster to converting the same yaml into a puppet manifest that is
applied locally or even driving OpenStack instances to avoid messing
with the local machine. But this would probably be overkill at this
point.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-17 17:46:23 +01:00
Ilya Dryomov
0edbda204b rbd: make coverity happy
A recent coverity run found two "defects" in rbd.cc:

** CID 1138367:  Time of check time of use  (TOCTOU)
/rbd.cc: 2024 in do_kernel_rm(const char *)()

2019   const char *fname = "/sys/bus/rbd/remove_single_major";
2020   if (stat(fname, &sbuf)) {
2021     fname = "/sys/bus/rbd/remove";
2022   }
2023
2024   int fd = open(fname, O_WRONLY);
2025   if (fd < 0) {

** CID 1138368:  Time of check time of use  (TOCTOU)
/rbd.cc: 1735 in do_kernel_add(const char *, const char *, const char *)()

same as above, s/remove/add

There is nothing racey going on here, and this is not an instance of
TOCTOU, but, instead of silencing coverity with annotatations, redo
this with two open() calls.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2013-12-17 17:42:30 +02:00
Loic Dachary
d93881f3c8 vstart/stop: use pkill instead of killall
killall fails to kill all OSDs when called as a oneliner. Replace with a
loop using pkill that retries until there are no more process to kill by
the required name.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-17 13:48:18 +01:00
Loic Dachary
ae56cef396 qa: recursively remove .gcno and .gcda
Instead of removing them only in the current directory. Leftovers
prevent running make check-coverage properly because lcov fails
when stumbling on old .gcno files with

lcov -d . -c -i -o check-coverage_base_full.lcov
Processing os/BtrfsFileStoreBackend.gcno
geninfo: ERROR: ceph/src/os/BtrfsFileStoreBackend.gcno: reached
         unexpected end of file

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-17 13:47:48 +01:00
Sage Weil
b082c09453 crushtool: reorg test-map-* cli tests
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-16 21:46:20 -08:00
Sage Weil
41d5186f49 crush/CrushWrapper: minor cleanup on tunables helpers
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-16 21:35:19 -08:00
Sage Weil
685c6950ef crush/mapper: generalize descend_once
The legacy behavior is to make the normal number of tries for the
recursive chooseleaf call.  The descend_once tunable changed this to
making a single try and bail if we get a reject (note that it is
impossible to collide in the recursive case).

The new set_chooseleaf_tries lets you select the number of recursive
chooseleaf attempts for indep mode, or default to 1.  Use the same
behavior for firstn, except default to total_tries when the legacy
tunables are set (for compatibility).  This makes the rule step
override the (new) default of 1 recursive attempt, keeping behavior
consistent with indep mode.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-16 21:33:07 -08:00
Sage Weil
6f431200e3 ceph_test_rados_api_tier: fix HitSetTrim vs split, too
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-16 17:10:48 -08:00
Sage Weil
00f436c144 Merge pull request #904 from ceph/wip-mds-cluster2
Wip mds cluster2

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-16 17:03:27 -08:00
Sage Weil
c5bccfef88 ceph_test_rados_api_tier: fix HitSetRead test race with split
Recalculate the hash on each iteration in case we are racing with split.

Fixes: #7013
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-16 16:52:35 -08:00
Sage Weil
94da54ff95 Merge pull request #954 from ceph/wip-7009
mon: move supported_commands fields, methods into Monitor, and fix leak

Reviewed-by: Greg Farnum <greg@inktank.com>
2013-12-16 16:31:39 -08:00