]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoosd: cache tiering: fix the atime logic of the eviction 2815/head
Zhiqiang Wang [Tue, 28 Oct 2014 01:37:11 +0000 (09:37 +0800)]
osd: cache tiering: fix the atime logic of the eviction

Reported-by: Xinze Chi <xmdxcxz@gmail.com>
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
10 years agoMerge pull request #2783 from xanpeng/patch-1
Sage Weil [Fri, 24 Oct 2014 00:59:56 +0000 (17:59 -0700)]
Merge pull request #2783 from xanpeng/patch-1

Remove unnecessary expressions about conf_journal_sz

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2784 from xinxinsh/master
Sage Weil [Fri, 24 Oct 2014 00:54:56 +0000 (17:54 -0700)]
Merge pull request #2784 from xinxinsh/master

check rocksdb library when '--with-librocksdb' option is enabled

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'gh/giant'
Sage Weil [Thu, 23 Oct 2014 23:44:45 +0000 (16:44 -0700)]
Merge remote-tracking branch 'gh/giant'

10 years agoMerge pull request #2785 from athanatos/wip-9821
Sage Weil [Thu, 23 Oct 2014 20:45:26 +0000 (13:45 -0700)]
Merge pull request #2785 from athanatos/wip-9821

PG:: reset_interval_flush and in set_last_peering_reset

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2733 from dachary/wip-9372-injectargs
Dan Mick [Thu, 23 Oct 2014 19:32:37 +0000 (12:32 -0700)]
Merge pull request #2733 from dachary/wip-9372-injectargs

cli: do not parse injectargs arguments twice

Reviewed-by: Dan Mick <dan.mick@inktank.com>
10 years agoMerge pull request #2759 from dachary/wip-9836-test-mon-id
Loic Dachary [Thu, 23 Oct 2014 18:29:26 +0000 (11:29 -0700)]
Merge pull request #2759 from dachary/wip-9836-test-mon-id

tests: mon id is incorrectly skipped

10 years agoMerge pull request #2766 from dachary/wip-9408-buffer-alignment-giant
Samuel Just [Thu, 23 Oct 2014 16:52:00 +0000 (09:52 -0700)]
Merge pull request #2766 from dachary/wip-9408-buffer-alignment-giant

erasure-code: buffer alignment (giant)

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2781 from zhouyuan/lrc_layer_plugin_doc
Loic Dachary [Thu, 23 Oct 2014 15:26:40 +0000 (08:26 -0700)]
Merge pull request #2781 from zhouyuan/lrc_layer_plugin_doc

EC: document the LRC per layer plugin configuration

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoRemove unnecessary expressions about conf_journal_sz 2783/head
xan [Thu, 23 Oct 2014 11:05:32 +0000 (19:05 +0800)]
Remove unnecessary expressions about conf_journal_sz

Signed-off-by: Xan Peng xanpeng@gmail.com
10 years agoEC: document the LRC per layer plugin configuration 2781/head
Yuan Zhou [Thu, 23 Oct 2014 05:27:45 +0000 (13:27 +0800)]
EC: document the LRC per layer plugin configuration

LRC now uses Jerasure as the default EC backend. But it is actually
possible to switch to other backend like Isa using the low level
configuration. This commits Adds documents on how to specify the EC
backend in each LRC layer:

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
10 years agocheck rocksdb library when '--with-librocksdb' option is enabled 2784/head
xinxin shu [Thu, 23 Oct 2014 05:20:58 +0000 (13:20 +0800)]
check rocksdb library when '--with-librocksdb' option is enabled

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
10 years agoMerge pull request #2767 from derricks/more_verbose_error_output
Loic Dachary [Thu, 23 Oct 2014 00:22:12 +0000 (17:22 -0700)]
Merge pull request #2767 from derricks/more_verbose_error_output

Make better error reporting for client's call to rados.Rados

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoqa: use sudo when rsyncing /usr so we can read everything
Greg Farnum [Tue, 21 Oct 2014 17:55:06 +0000 (10:55 -0700)]
qa: use sudo when rsyncing /usr so we can read everything

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit fa07c04231db2d130de54647957ffab4a7a53733)

10 years agoqa: use sudo when rsyncing /usr so we can read everything
Greg Farnum [Tue, 21 Oct 2014 17:55:06 +0000 (10:55 -0700)]
qa: use sudo when rsyncing /usr so we can read everything

Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2777 from ceph/wip-9859
Sage Weil [Wed, 22 Oct 2014 18:36:07 +0000 (11:36 -0700)]
Merge pull request #2777 from ceph/wip-9859

mon: Monitor: MMonGetMap doesn't require caps

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: Monitor: MMonGetMap doesn't require caps 2777/head
Joao Eduardo Luis [Wed, 22 Oct 2014 18:30:08 +0000 (19:30 +0100)]
mon: Monitor: MMonGetMap doesn't require caps

We are dropping the requirement for MON_CAP_R for MMonGetMap.

Reason is simple enough: clients may need to contact the monitors and
obtain the latest monmap before authenticating.  This happens, for
instance, when a client calls MonClient::get_monmap_privately().  The
osd uses this function during mkfs, prior to initializing a keyring or
even so much as existing.

Fixes: #9859
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #2770 from ceph/wip-9857
Josh Durgin [Tue, 21 Oct 2014 23:53:27 +0000 (16:53 -0700)]
Merge pull request #2770 from ceph/wip-9857

rbd: Correct readahead divide by zero exception

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMake better error reporting for client's call to rados.Rados 2767/head
Derrick Schneider [Tue, 21 Oct 2014 18:56:10 +0000 (11:56 -0700)]
Make better error reporting for client's call to rados.Rados

Signed-off-by: Derrick Schneider derrick.schneider@gmail.com
10 years agoPG:: reset_interval_flush and in set_last_peering_reset 2785/head
Samuel Just [Mon, 20 Oct 2014 21:10:58 +0000 (14:10 -0700)]
PG:: reset_interval_flush and in set_last_peering_reset

If we have a change in the prior set, but not in the up/acting set, we go back
through Reset in order to reset peering state.  Previously, we would reset
last_peering_reset in the Reset constructor.  This did not, however, reset the
flush_interval, which caused the eventual flush event to be ignored and the
peering messages to not be sent.

Instead, we will always reset_interval_flush if we are actually changing the
last_peering_reset value.

Fixes: #9821
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge remote-tracking branch 'gh/giant'
Sage Weil [Tue, 21 Oct 2014 17:39:42 +0000 (10:39 -0700)]
Merge remote-tracking branch 'gh/giant'

10 years agoobjecter: Unlock in shutdown before waiting for timer thread
David Zafman [Tue, 21 Oct 2014 07:52:37 +0000 (00:52 -0700)]
objecter: Unlock in shutdown before waiting for timer thread

Fixes: #9845
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoerasure-code: use ErasureCode::SIMD_ALIGN in ceph_erasure_code_benchmark 2766/head
Loic Dachary [Mon, 13 Oct 2014 14:43:20 +0000 (16:43 +0200)]
erasure-code: use ErasureCode::SIMD_ALIGN in ceph_erasure_code_benchmark

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: add ErasureCode::encode unit test
Loic Dachary [Mon, 13 Oct 2014 12:48:27 +0000 (14:48 +0200)]
erasure-code: add ErasureCode::encode unit test

Re-create and describe the situation that is fixed by
91a7e18f60bbc9acab3045baaa1b6505474ec4a9 which reworks the buffer
preparation function provided by ErasureCode::encode.

http://tracker.ceph.com/issues/9408 Refs: #9408

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: expose ErasureCode::SIMD_ALIGN as a const
Loic Dachary [Mon, 13 Oct 2014 12:46:22 +0000 (14:46 +0200)]
erasure-code: expose ErasureCode::SIMD_ALIGN as a const

For test purposes and it will also be useful for plugins that must
ensure the chunk size is a multiple of SIMD_ALIGN.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoceph_erasure_code_benchmark: use 32-byte aligned input
Janne Grunau [Mon, 29 Sep 2014 12:34:32 +0000 (14:34 +0200)]
ceph_erasure_code_benchmark: use 32-byte aligned input

The benchmark is supposed to measure the encoding/decoding speed and
not the overhead of buffer realignments.

Signed-off-by: Janne Grunau <j@jannau.net>
10 years agoerasure code: use 32-byte aligned buffers
Janne Grunau [Mon, 29 Sep 2014 12:34:31 +0000 (14:34 +0200)]
erasure code: use 32-byte aligned buffers

Requiring page aligned buffers and realigning the input if necessary
creates measurable oberhead. ceph_erasure_code_benchmark is between
10-20% faster depending on the workload.

Also prevents a misaligned buffer when bufferlist::c_str(bufferlist)
has to allocate a new buffer to provide continuous one. See bug #9408

Signed-off-by: Janne Grunau <j@jannau.net>
10 years agoerasure code: use a function for the chunk mapping index
Janne Grunau [Mon, 29 Sep 2014 12:34:30 +0000 (14:34 +0200)]
erasure code: use a function for the chunk mapping index

10 years agocommon: add an aligned buffer with less alignment than a page
Loic Dachary [Mon, 13 Oct 2014 14:32:18 +0000 (16:32 +0200)]
common: add an aligned buffer with less alignment than a page

SIMD optimized erasure code computation needs aligned memory. Buffers
aligned to a page boundary are not needed though. The buffers used
for the erasure code computation are typical smaller than a page.

The typical alignment requirements SIMD operations are 16 bytes for
SSE2 and NEON and 32 bytes for AVX/AVX2.

Add new prototypes with an align argument, similar to the one enforcing
page alignment. The implementation is exactly the same, except for the
align parameter. The page alignment method are then implemented as calls
to the more generic methods.

The align parameter is an unsigned (same type as CEPH_PAGE_SIZE). The
CEPH_PAGE_MASK value ( ~(CEPH_PAGE_SIZE - 1) ) was only used as
~CEPH_PAGE_MASK, i.e. equivalent of (CEPH_PAGE_SIZE - 1) once the double
~~ is reduced. These occurrence are replaced with (align - 1). The type
of CEPH_PAGE_MASK is an unsigned long which probably because it was
~(CEPH_PAGE_SIZE). When using (align - 1) as a mask for both
CEPH_PAGE_SIZE and SIMD alignment there is no need to use an unsigned
long because there is no risk of overflowing the unsigned value.

The CYGWIN specific code is also modified but not tested.

Unit tests are added for the new methods.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocommon: remove dead code in buffer.cc
Loic Dachary [Mon, 13 Oct 2014 14:29:10 +0000 (16:29 +0200)]
common: remove dead code in buffer.cc

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2710 from yuyuyu101/keyvaluestore-clone-rmattr
Sage Weil [Tue, 21 Oct 2014 15:31:27 +0000 (08:31 -0700)]
Merge pull request #2710 from yuyuyu101/keyvaluestore-clone-rmattr

Fix Keyvaluestore clone rmattr

10 years agoMerge pull request #2761 from fgimenez/do-autogen-defaults-to-nss
Sage Weil [Tue, 21 Oct 2014 13:34:53 +0000 (06:34 -0700)]
Merge pull request #2761 from fgimenez/do-autogen-defaults-to-nss

do_autogen.sh: default configure with nss instead of cryptopp

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorbd: Correct readahead divide by zero exception 2770/head
Jason Dillaman [Tue, 21 Oct 2014 07:42:13 +0000 (03:42 -0400)]
rbd: Correct readahead divide by zero exception

When readahead is used on old-format RBD images, a divide
by zero signal will be thrown.  This was caused by initializing
the readahead alignments prior to initializing the stripe layout
of old-format RBD images.

Fixes: 9857
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoDefault configure with nss instead of cryptopp 2761/head
Federico Gimenez [Tue, 21 Oct 2014 06:44:43 +0000 (08:44 +0200)]
Default configure with nss instead of cryptopp

The -n option for nss has been changed to -c to give the
chance to pass cryptopp flag to configure

Signed-off-by: Federico Gimenez <fgimenez@coit.es>
10 years agocli: CEPH_ARGS must be before injectargs 2733/head
Loic Dachary [Thu, 16 Oct 2014 15:39:15 +0000 (08:39 -0700)]
cli: CEPH_ARGS must be before injectargs

It is incorrect to append the content of CEPH_ARGS to the argument list
when running injectargs. For instance if

  CEPH_ARGS='--log-file the.log' \
    ./ceph tell osd.0 injectargs --no-osd_debug_op_order

translates into

    ./ceph tell osd.0 injectargs --no-osd_debug_op_order \
                                 --log-file the.log

it ends up changing the log file of osd.0 which is probably unintended.
Instead CEPH_ARGS is inserted before injectargs and it translates into:

    ./ceph tell osd.0 --log-file the.log \
                      injectargs --no-osd_debug_op_order

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agodoc: update injectargs syntax
Loic Dachary [Thu, 16 Oct 2014 06:26:16 +0000 (23:26 -0700)]
doc: update injectargs syntax

Modify the examples to use the simpler syntax, not involving -- or
grouping with quotes.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocli: do not parse injectargs arguments twice
Loic Dachary [Thu, 16 Oct 2014 06:04:03 +0000 (23:04 -0700)]
cli: do not parse injectargs arguments twice

The arguments of injectargs being valid ceph arguments, they are.
consumed when the ceph cli calls rados.conf_parse_argv(). It can be
worked around by obsuring them as in:

   ceph tell osd.0 injectargs '--osd_debug_drop_ping_probability 444'

where '--osd_debug_drop_ping_probability 444' is a single argument that
does not match any known argument. The trick is that it will be
evaluated again once it reaches the OSD or the MON and translated into
the expected list of arguments. Although it is clear once explained, it
is obscure and leads to strange combinations such as:

   ceph tell osd.0 injectargs '--osd_debug_op_order '

(note the extra space at the end) to set boolean parameters. A better
workaround is to add a -- marking the end of the options as in:

   ceph tell osd.0 -- injectargs --osd_debug_op_order

this one is unfortunately much less documented and the user does not
usually know the exact semantic of --, let alone where it should be
placed.

The simpler solution is to split the argument list in two if
"injectargs" is found. The arguments that show after the "injectargs"
argument is removed from the list of arguments until parsing is
complete. It implements the more intuitive syntax:

   ceph tell osd.0 injectargs --osd_debug_op_order

and the other forms are still valid for backward compatibility.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocli: add verbose information related to argument parsing
Loic Dachary [Thu, 16 Oct 2014 05:32:05 +0000 (22:32 -0700)]
cli: add verbose information related to argument parsing

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2419 from sponce/wip-9356
Loic Dachary [Tue, 21 Oct 2014 05:45:08 +0000 (22:45 -0700)]
Merge pull request #2419 from sponce/wip-9356

Fixed seg fault described in bug 9356 by adding reference counting on an...

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoFix read performance regression in ObjectCacher
Adam Crume [Wed, 8 Oct 2014 00:45:53 +0000 (17:45 -0700)]
Fix read performance regression in ObjectCacher

The regression was introduced in commit
4fc9fffc494abedac0a9b1ce44706343f18466f1.  The problem is that the cache
thinks it's full (when it's not), so it defers the read.  This change
frees up cache space if necessary and only defers the read if enough
space cannot be freed.

Fixes: 9513
Signed-off-by: Adam Crume <adamcrume@gmail.com>
(cherry picked from commit 82175ec94acc89dc75da0154f86187fb2e4dbf5e)

10 years agotests: mon id is incorrectly skipped 2759/head
Loic Dachary [Mon, 20 Oct 2014 18:20:35 +0000 (11:20 -0700)]
tests: mon id is incorrectly skipped

The argument is shifted and $1 should be used to get the mon id instead
of $2.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2758 from ceph/wip-9820
Sage Weil [Mon, 20 Oct 2014 17:46:48 +0000 (10:46 -0700)]
Merge pull request #2758 from ceph/wip-9820

qa/workunits: cephtool: don't remove self's key on auth tests

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoqa/workunits: cephtool: don't remove self's key on auth tests 2758/head
Joao Eduardo Luis [Mon, 20 Oct 2014 17:00:15 +0000 (18:00 +0100)]
qa/workunits: cephtool: don't remove self's key on auth tests

Suites run with CEPH_TEST_CLI_DUP_COMMAND=1, which will send a duplicate
command for every command issued with the 'ceph' tool.  Behavior is to
get a reply from the command and then send a duplicate, looking for the
same outcome (guaranteeing idempotency of the operations).  However, it
so happens that if you remove the entity's own key from the keyring and
you happen to be unlucky enough so that the client's connection gets
failed (we also run tests with connection failure injections), the
'ceph' tool won't be able to reconnect to the cluster to send the
duplicate command (as it's entity no longer exists in the cluster's
keyring).

We rewrite the test instead of resorting to ugly hacks to work around
this behavior, simply having a new 'role-definer' added by the existing
'role-definer' (which we weren't testing anyway, so bonus points for
that) and then have one removing the other (to test the procedure) and
finally using 'client.admin' to remove the last 'role-definer'.

Fixes: #9820
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoAdded missing semaphore in libradosstriper AIO tests leading to potential memory... 2419/head
Sebastien Ponce [Thu, 9 Oct 2014 13:44:06 +0000 (15:44 +0200)]
Added missing semaphore in libradosstriper AIO tests leading to potential memory corruption and thus test failures

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoFixed remaining part of the seg fault described in bug 9356 by adding reference count...
Sebastien Ponce [Wed, 15 Oct 2014 14:05:00 +0000 (16:05 +0200)]
Fixed remaining part of the seg fault described in bug 9356 by adding reference counting to CompletionData

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoFixed part of the seg fault described in bug 9356 by adding reference counting on...
Sebastien Ponce [Mon, 8 Sep 2014 12:23:03 +0000 (14:23 +0200)]
Fixed part of the seg fault described in bug 9356 by adding reference counting on RadosReadCompletionData

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoFixed part of the seg fault described in bug 9356 by cleaning reference counting...
Sebastien Ponce [Thu, 16 Oct 2014 09:56:52 +0000 (11:56 +0200)]
Fixed part of the seg fault described in bug 9356 by cleaning reference counting on MultiAioCompletionImpl

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoCleanup up useless method release in MultiAioCompletionImpl. It was exactly equivalen...
Sebastien Ponce [Wed, 15 Oct 2014 13:50:35 +0000 (15:50 +0200)]
Cleanup up useless method release in MultiAioCompletionImpl. It was exactly equivalent to put

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoMerge pull request #2757 from fgimenez/update-pool-names-in-dev-guide
Sage Weil [Mon, 20 Oct 2014 15:34:45 +0000 (08:34 -0700)]
Merge pull request #2757 from fgimenez/update-pool-names-in-dev-guide

doc: updated names of default pools created at startup

10 years agoUpdated names of default pools created at startup 2757/head
fgimenez [Mon, 20 Oct 2014 11:43:56 +0000 (13:43 +0200)]
Updated names of default pools created at startup

10 years agoMerge pull request #2751 from dachary/wip-warnings
John Spray [Mon, 20 Oct 2014 08:42:37 +0000 (09:42 +0100)]
Merge pull request #2751 from dachary/wip-warnings

client: fix signed/unsigned compilation warnings

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoKeyValueStore: Add clone op detect to promote error 2710/head
Haomai Wang [Thu, 16 Oct 2014 02:03:42 +0000 (10:03 +0800)]
KeyValueStore: Add clone op detect to promote error

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
10 years agoclient: fix signed/unsigned compilation warnings 2751/head
Loic Dachary [Sun, 19 Oct 2014 16:04:02 +0000 (09:04 -0700)]
client: fix signed/unsigned compilation warnings

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2744 from ceph/wip-9794
Loic Dachary [Sat, 18 Oct 2014 15:43:40 +0000 (08:43 -0700)]
Merge pull request #2744 from ceph/wip-9794

mon: MDSMonitor: wait for osdmon to be writable when requesting proposal

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2746 from ceph/wip-adamcrume
Loic Dachary [Fri, 17 Oct 2014 22:13:28 +0000 (15:13 -0700)]
Merge pull request #2746 from ceph/wip-adamcrume

osdc: Fix compiler warning

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoosdc: Fix compiler warning 2746/head
Adam Crume [Fri, 17 Oct 2014 19:09:44 +0000 (12:09 -0700)]
osdc: Fix compiler warning

Was getting:

./osdc/ObjectCacher.h:169:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       uint64_t overlap_start = MAX(start, ex.start);
                                                   ^
./osdc/ObjectCacher.h:170:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       uint64_t overlap_end = MIN(end, ex.start + ex.length);
                                                           ^

Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agomon: MDSMonitor: wait for osdmon to be writable when requesting proposal 2744/head
Joao Eduardo Luis [Fri, 17 Oct 2014 18:08:20 +0000 (19:08 +0100)]
mon: MDSMonitor: wait for osdmon to be writable when requesting proposal

Otherwise we may end up requesting the osdmon to propose while it is
mid-proposal.  We can't simply return EAGAIN to the user either because
then we would have to expect the user to be able to successfully race
with the whole cluster in finding a window in which 'mds fs new' command
would succeed -- which is not a realistic expectation.  Having the
command to osdmon()->wait_for_writable() guarantees that the command
will be added to a queue and that we will, eventually, tend to it.

Fixes: #9794
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MDSMonitor: have management_command() returning int instead of bool
Joao Eduardo Luis [Fri, 17 Oct 2014 17:59:51 +0000 (18:59 +0100)]
mon: MDSMonitor: have management_command() returning int instead of bool

We can more easily differentiate between errors we get out of this
function, which makes the code a bit more versatile and readable.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #2708 from ceph/wip-9718
Samuel Just [Fri, 17 Oct 2014 17:38:43 +0000 (10:38 -0700)]
Merge pull request #2708 from ceph/wip-9718

osd/osd_types: consider CRUSH_ITEM_NONE in check_new_interval() min_size

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2711 from guangyy/wip-9614-followup
Samuel Just [Fri, 17 Oct 2014 17:38:30 +0000 (10:38 -0700)]
Merge pull request #2711 from guangyy/wip-9614-followup

Follow-up fix for 9614

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agomon: MDSMonitor: don't return -EINVAL if function is bool
Joao Eduardo Luis [Fri, 17 Oct 2014 17:01:05 +0000 (18:01 +0100)]
mon: MDSMonitor: don't return -EINVAL if function is bool

Returning -EINVAL on a function that expects bool and the error code to
be in a variable 'r' can only achieve one thing: if this path is ever
touched, instead of returning an error as it was supposed to, we're
returning 'true' with 'r = 0' and, for no apparent reason, the user will
think everything went smoothly but with no new fs created.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MDSMonitor: check all conditions are met *before* osdmon proposal
Joao Eduardo Luis [Fri, 17 Oct 2014 16:43:33 +0000 (17:43 +0100)]
mon: MDSMonitor: check all conditions are met *before* osdmon proposal

We should not allow ourselves to request the osdmon to propose before we
know for sure that we meet the required conditions to go through with
our own state change.  Even if we still can't guarantee that our
proposal is going to be committed, we shouldn't just change the osdmon's
state just because we can.  This way, at least, we make sure that our
checks hold up before doing anything with side-effects.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MDSMonitor: return if fs exists on 'fs new'
Joao Eduardo Luis [Fri, 17 Oct 2014 16:37:03 +0000 (17:37 +0100)]
mon: MDSMonitor: return if fs exists on 'fs new'

We were just setting return code to -EINVAL, while allowing the logic to
continue regardless.  If we are to return error, then we should abort
the operation as well and let the user know it went wrong instead of
continuing as if nothing had happened.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #2736 from dachary/wip-backfill-documentation
Loic Dachary [Fri, 17 Oct 2014 16:02:10 +0000 (09:02 -0700)]
Merge pull request #2736 from dachary/wip-backfill-documentation

doc: updates on Backfill Reservation

Reviewed-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
10 years agoMerge pull request #2740 from ceph/giant-unknown-locktype
Sage Weil [Fri, 17 Oct 2014 15:21:16 +0000 (08:21 -0700)]
Merge pull request #2740 from ceph/giant-unknown-locktype

mds: reply -EOPNOTSUPP for unknown lock type

10 years agoMerge pull request #2743 from ceph/wip-mds-coverity
Sage Weil [Fri, 17 Oct 2014 15:16:18 +0000 (08:16 -0700)]
Merge pull request #2743 from ceph/wip-mds-coverity

mds: fix null dereference

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2738 from majianpeng/fix1
Sage Weil [Fri, 17 Oct 2014 15:11:45 +0000 (08:11 -0700)]
Merge pull request #2738 from majianpeng/fix1

Fix1 compile warning

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomds: fix null dereference 2743/head
Yan, Zheng [Fri, 17 Oct 2014 14:07:33 +0000 (22:07 +0800)]
mds: fix null dereference

Server::handle_client_file_setlock() should return after calling
reply_request()

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agomds: reply -EOPNOTSUPP for unknown lock type 2740/head
Yan, Zheng [Tue, 14 Oct 2014 14:02:41 +0000 (22:02 +0800)]
mds: reply -EOPNOTSUPP for unknown lock type

Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 675392335c53ff7879031fb9184e4f35bcc90fe2)

10 years agotest: fix compile warning in bufferlist.cc 2738/head
Jianpeng Ma [Fri, 17 Oct 2014 06:04:40 +0000 (14:04 +0800)]
test: fix compile warning in bufferlist.cc

test/bufferlist.cc: In member function ‘virtual void
Buffer_constructors_Test::TestBody()’:
test/bufferlist.cc:154:36: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
     ::system("echo ABC > testfile");
                                    ^
test/bufferlist.cc: In member function ‘virtual void
TestRawPipe::SetUp()’:
test/bufferlist.cc:182:36: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
     ::system("echo ABC > testfile");
                                    ^
test/bufferlist.cc: In member function ‘virtual void
BufferList_read_file_Test::TestBody()’:
test/bufferlist.cc:1768:53: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("echo ABC > testfile ; chmod 0 testfile");
                                                     ^
test/bufferlist.cc:1770:32: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("chmod +r testfile");
                                ^
test/bufferlist.cc: In member function ‘virtual void
BufferList_read_fd_Test::TestBody()’:
test/bufferlist.cc:1781:34: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("echo ABC > testfile");

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agolibrbd: fix compile warning in librbd/internal.cc.
Jianpeng Ma [Fri, 17 Oct 2014 05:19:59 +0000 (13:19 +0800)]
librbd: fix compile warning in librbd/internal.cc.

librbd/internal.cc: In function 'void
librbd::readahead(librbd::ImageCtx*, const std::vector<std::pair<long
unsigned int, long unsigned int> >&, const md_config_t*)':
librbd/internal.cc:3150:38: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
       ictx->total_bytes_read > conf->rbd_readahead_disable_after_bytes;
                                      ^

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agodoc: updates on Backfill Reservation 2736/head
Loic Dachary [Thu, 16 Oct 2014 23:23:17 +0000 (16:23 -0700)]
doc: updates on Backfill Reservation

The logic was changed by:

0985ae71bce32c4d9e0e9e9f68bed38eb3c26897
osd: prioritize backfill based on *how* degraded

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge remote-tracking branch 'origin/wip-rbd-readahead'
Josh Durgin [Thu, 16 Oct 2014 21:33:42 +0000 (14:33 -0700)]
Merge remote-tracking branch 'origin/wip-rbd-readahead'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Conflicts:
src/client/Fh.h

10 years agoMerge pull request #2588 from xinxinsh/wip-9595
Josh Durgin [Thu, 16 Oct 2014 20:15:33 +0000 (13:15 -0700)]
Merge pull request #2588 from xinxinsh/wip-9595

Fix #9595

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMerge pull request #2628 from ceph/wip-client-flock
Gregory Farnum [Thu, 16 Oct 2014 13:57:34 +0000 (06:57 -0700)]
Merge pull request #2628 from ceph/wip-client-flock

Wip client flock

Add support for file locking to the userspace client, and improve blocked-lock cancellation so that it doesn't remove locks that succeeded when racing.

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2732 from dachary/wip-9526-crush-rename-bucket
Loic Dachary [Thu, 16 Oct 2014 03:22:02 +0000 (20:22 -0700)]
Merge pull request #2732 from dachary/wip-9526-crush-rename-bucket

ceph osd crush rename-bucket srcname dstname

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2731 from dachary/wip-9790-display-auid
Loic Dachary [Thu, 16 Oct 2014 03:15:29 +0000 (20:15 -0700)]
Merge pull request #2731 from dachary/wip-9790-display-auid

auth: add display of auid to auth get / list when it is not the default

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: unit tests for osd crush rename-bucket 2732/head
Loic Dachary [Thu, 16 Oct 2014 00:21:44 +0000 (17:21 -0700)]
mon: unit tests for osd crush rename-bucket

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomon: add the osd crush rename-bucket command
Loic Dachary [Thu, 16 Oct 2014 00:14:53 +0000 (17:14 -0700)]
mon: add the osd crush rename-bucket command

The synopsis is:

 osd crush rename-bucket name1 name2

It is made idempotent by interpreting -EALREADY as returned by
CrushWrapper::rename_bucket return as success.

The crush_rename_bucket method first checks for errors with
CrushWrapper::can_rename_bucket if there is no pending crush so that it
can return early and avoid the creation of a pending crush map.

If renaming is possible, CrushWrapper::rename_bucket is called on the
pending crush map (and creates it indirectly if it does not already
exists).

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: unit tests for CrushWrapper rename item/bucket methods
Loic Dachary [Thu, 16 Oct 2014 00:11:46 +0000 (17:11 -0700)]
crush: unit tests for CrushWrapper rename item/bucket methods

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: add CrushWrapper::rename_bucket and can_rename_bucket
Loic Dachary [Thu, 16 Oct 2014 00:08:13 +0000 (17:08 -0700)]
crush: add CrushWrapper::rename_bucket and can_rename_bucket

Rename a bucket and return -ENOTDIR if trying to rename an item. The
behavior is otherwise the same as rename_item and can_rename_item.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: add CrushWrapper::rename_item and can_rename_item
Loic Dachary [Thu, 16 Oct 2014 00:06:12 +0000 (17:06 -0700)]
crush: add CrushWrapper::rename_item and can_rename_item

The can_rename_item is a const method checking if renaming an item could
succeed. If not it returns a unique -errno code and a human readable
message message.

Trying to rename a non existent item into an existent item returns
-EALREADY which can be treated as success if renaming is to be
idempotent.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoadd unittest for Striper::get_num_objects 2588/head
xinxin shu [Wed, 15 Oct 2014 23:32:09 +0000 (07:32 +0800)]
add unittest for Striper::get_num_objects

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
10 years agocrush: improve constness of CrushWrapper methods
Loic Dachary [Thu, 16 Oct 2014 00:02:58 +0000 (17:02 -0700)]
crush: improve constness of CrushWrapper methods

A number of CrushWrapper get methods or predicates were not const
because they need to maintain transparently the rmaps. Make the rmaps
mutable and update the constness of the methods to match what the caller
would expect.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agowhen non-default striping is used, internal methods can operate on extra objects
xinxin shu [Sat, 27 Sep 2014 19:57:20 +0000 (03:57 +0800)]
when non-default striping is used, internal methods can operate on extra objects

Fixes: #9595
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
10 years agoMerge pull request #2712 from lpabon/bug-8766
Sage Weil [Wed, 15 Oct 2014 22:18:48 +0000 (15:18 -0700)]
Merge pull request #2712 from lpabon/bug-8766

Update vstart to setup users for s3-tests

10 years agoMerge pull request #2705 from xinxinsh/master
Sage Weil [Wed, 15 Oct 2014 22:16:00 +0000 (15:16 -0700)]
Merge pull request #2705 from xinxinsh/master

return value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY shou...

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoauth: unit tests for auid display 2731/head
Loic Dachary [Wed, 15 Oct 2014 20:15:34 +0000 (13:15 -0700)]
auth: unit tests for auid display

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoqa/workunits/rbd/import_export.sh: be case insensitive
Sage Weil [Wed, 15 Oct 2014 19:26:00 +0000 (12:26 -0700)]
qa/workunits/rbd/import_export.sh: be case insensitive

Stop tripping over this change (from dumpling).

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoauth: add display auid to KeyServer::encode_secrets
Loic Dachary [Wed, 15 Oct 2014 18:30:32 +0000 (11:30 -0700)]
auth: add display auid to KeyServer::encode_secrets

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoauth: add display auid to KeyRing::encode_formatted
Loic Dachary [Wed, 15 Oct 2014 18:07:19 +0000 (11:07 -0700)]
auth: add display auid to KeyRing::encode_formatted

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2702 from ceph/wip-9706
Yehuda Sadeh [Wed, 15 Oct 2014 15:58:16 +0000 (08:58 -0700)]
Merge pull request #2702 from ceph/wip-9706

objecter: fix session locking, use after frees (#9706)

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #2726 from CzBiX/wip-doc-radosgw-federated-config
Loic Dachary [Wed, 15 Oct 2014 13:50:50 +0000 (06:50 -0700)]
Merge pull request #2726 from CzBiX/wip-doc-radosgw-federated-config

doc: correct command of `config push`

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agodoc: correct command of `config push` 2726/head
VRan Liu [Wed, 15 Oct 2014 09:03:49 +0000 (17:03 +0800)]
doc: correct command of `config push`

Signed-off-by: VRan Liu <gliuwr@gmail.com>
10 years agoqa/workunits/fs/misc: Add a workunit for file lock interruption 2628/head
Yan, Zheng [Wed, 15 Oct 2014 04:00:58 +0000 (12:00 +0800)]
qa/workunits/fs/misc: Add a workunit for file lock interruption

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agomds: fix neighbor lock check
Yan, Zheng [Wed, 15 Oct 2014 04:03:46 +0000 (12:03 +0800)]
mds: fix neighbor lock check

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2721 from wyllys66/wip-8942
Sage Weil [Tue, 14 Oct 2014 21:49:43 +0000 (14:49 -0700)]
Merge pull request #2721 from wyllys66/wip-8942

librados: osd: Fixed JSON output for stray OSDs

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodoc/dev/sepia: notes about sepia email list and irc channels
Sage Weil [Tue, 14 Oct 2014 21:40:17 +0000 (14:40 -0700)]
doc/dev/sepia: notes about sepia email list and irc channels

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodoc/release-notes: v0.80.7
Sage Weil [Tue, 14 Oct 2014 21:40:03 +0000 (14:40 -0700)]
doc/release-notes: v0.80.7

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2719 from ceph/wip-inotable-init
Gregory Farnum [Tue, 14 Oct 2014 20:38:50 +0000 (13:38 -0700)]
Merge pull request #2719 from ceph/wip-inotable-init

mds: fix inotable initialization/reset

Reviewed-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>