Commit Graph

52193 Commits

Author SHA1 Message Date
Erwan Velu
d8f07c3ff6 tests: Killing daemons in parallel
The current code of kill_daemons() was killing daemons one after the
other and wait it to actually die before switching to the next one.

This patch makes the kill_daemons() loop being run in parallel to avoid
this bottleneck.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
0ac3ac71ec tests: Adding parallelism to check-generated.sh
This script had the following performance issue :
- 4 ceph-dencoders spawn sequentialy
- running twice the same dencoder command

This patch is adding parallelism around the 4 sequential calls but also
prevent from testing the deterministic feature twice.

On a recent laptop, this patch drops the running time from 7mn to 3m46
while keeping the loadavg < 2.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
d66c852b46 tests: Adding parallelism for sequential ceph-dencoder calls
The current code was running sequentially two ceph-dencoder calls.
This process is executed pretty fast but adding sequentiality and by the number
of loops to execute, it have a cost.

This patch is just making this two calls being run in parallel.

As a result, the test/encoding/readable.sh test is running in 4m50 instead of 6.
The associate loadavg isn't impacted as it stays at 6 while being run with
nproc=8.

This patch save 1/6th of building time without impact the loadavg.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
8b6be11a36 tests: Adding parallelism to encoding/readable.sh
When running make -j x check, we face a weird situation where the makefile
targets are spawn in parallel up to "x" but one of those target is very very
long and sequential.

The "readable.sh" test is trying to run ~7.9K tests where 5.3K are actually
executed.

The current code is taking 23mn on a recent laptop (Intel(R) Core(TM)
i7-4810MQ CPU @ 2.80GHz, 32GB of RAM & SSD).

This patch implements parallelism to speed up this process which is not really CPU and
neither IO bound.

By default, readable.sh is now using the number of logical processors to determine
the level of parallelism (by using nproc). If needed, defining the MAX_PARALLEL_JOBS
variable will override this default value.

On the same system, where nproc=8, the resulting execution time is 5m55 seconds :
4x faster than the original code.

The global 'make check' is therefore getting faster too and dropped from 30 to
16 minutes : 2x faster than the original code.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
db31cc6cbc tests: Adding parallelism helpers in ceph-helpers.sh
This commit introduce two new functions in ceph-helpers.sh to ease
parallelism in tests.

It's based on two functions : run_in_background() & wait_background()

The first one allow you to spawn processes or functions in background and saves
the associated pid in a variable passed as first argument.

The second one waits for thoses pids to complete and report their exit status.
If one or more failed then wait_background() reports a failure.

A typical usage looks like :

 pids1=""
 run_in_background pids1 bash -c 'sleep 5; exit 0'
 run_in_background pids1 bash -c 'sleep 1; exit 1'
 run_in_background pids1 my_bash_function
 wait_background pids1

The variable that contains pids is local making possible to do nested calls of
thoses two new functions.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Kefu Chai
93ace63ff8 cmake: fix the build of test_rados_api_list
the libglobal linkage was added in 769c0af, so add it to cmake
accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-04-05 14:22:03 +08:00
xie xingguo
524f8e6ca5 mds: unregister newly added commands correctly
These commands are registered in the set_up_admin_socket() method,
but don't get unregistered correctly in the clean_up_admin_socket(),
which is not very appropriate.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-05 12:47:14 +08:00
xie xingguo
da27c33b69 mds: avoid key renew storm on clock skew
Check 918c12c2ab (diff-fa6c2eba8356ae1442d1bf749beacfdf)
for detail information.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-05 12:47:14 +08:00
xie xingguo
7dae094c0f mds: drop message reference on error exit
From the call stack handle_core_message()->handle_mds_map(),
handle_core_message() expects that handle_mds_map() will definitely
take good care of the CEPH_MSG_MDS_MAP message and will drop
the message reference on returning.

However, in the belowing code path, it won't do such a tidy up thing.
Although this one is not necessary because we are going to shutdown
anyway, but it is a good habit to do the cleanup.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-05 12:42:11 +08:00
xie xingguo
1f54f73eb0 mds: fix message leak during handle_core_message()
On successfully handing a core message,  the handle_core_message()
method shall return true and is responsible for dropping the corresponding
message's reference to get it correctly released.

However, if we receive a CEPH_MSG_OSD_MAP message, we won't drop
its reference unless it is neither from a monitor nor an OSD, which means
in most cases we won't release this kind of message correctly.

This pr solves the above problem by dropping the message reference
appropriately.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-05 12:33:28 +08:00
Josh Durgin
cf5d2777b8 Merge pull request #8435 from dillaman/wip-15370
test: TestMirroringWatcher test cases were not closing images

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-04-04 18:11:48 -07:00
Jason Dillaman
b7a5f8bba7 test: TestMirroringWatcher test cases were not closing images
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-04-04 18:03:59 -04:00
Abhishek Lekshmanan
ae395172d9 rgw: fix a typo in error message
s/tennant/tenant

Signed-off-by: Abhishek Lekshmanan <alekshmanan@suse.com>
2016-04-04 23:47:19 +02:00
Sage Weil
8231208828 global/global_init: expand metavariables in setuser_match_path
Back in 8290536d7d we moved the
apply_changse (and, indirectly, config var expansion) to happen
after set do the drop privileges, but we need the metavar
expansion for setuser_match_path (which docs suggest setting to
/var/lib/ceph/$type/$cluster-$id).

Fixes: http://tracker.ceph.com/issues/15365
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 17:14:33 -04:00
Sage Weil
0f81ac5d87 Merge pull request #8378 from liewegas/wip-pgls-pgid
osdc/Objecter: use full pgid hash in PGNLS ops

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-04-04 16:53:51 -04:00
Samuel Just
72f18a26de Merge pull request #8069 from somnathr/wip-dyn-throttle-doc
Adding documentation on how to use new dynamic throttle scheme

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-04-04 12:54:32 -07:00
Sage Weil
ec8318df70 Merge pull request #8429 from ErwanAliasr1/evelu-broken-cephtool-test-mon
tests: Fixing broken test/cephtool-test-mon.sh test

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-04-04 15:48:10 -04:00
Orit Wasserman
9eca65f328 Merge pull request #8411 from theanalyst/rgw/unused-var
rgw_admin: remove unused parent_period arg
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2016-04-04 20:22:43 +02:00
John Coyle
1a6c686125 mds: Add cmapv to ESessions default constructor initializer list
Fixes uninitialized values in cmapv which cause ceph-dencoder tests to fail.

Signed-off-by: John Coyle <dx9err@gmail.com>
2016-04-04 13:59:51 -04:00
Josh Durgin
cce88dfdc5 Merge pull request #8426 from dillaman/wip-striper-logs
Striper: reduce assemble_result log level

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-04-04 10:01:52 -07:00
Wei Jin
dd167cf117 crush: fix error log
Signed-off-by: Wei Jin <wjin.cn@gmail.com>
2016-04-04 23:52:04 +08:00
Kefu Chai
24b9762355 Merge pull request #8421 from tchaikov/wip-noexcept
os/ObjectStore: add noexcept to ensure move ctor is used

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-04-04 23:44:43 +08:00
Sage Weil
356232391b librados: use Objecter::prepare_*_op helpers to set c->tid safely
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 11:03:25 -04:00
Sage Weil
cd167c0a9a osdc/Objecter: create more prepare_foo_op() helpers
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 11:03:06 -04:00
Erwan Velu
f47e06b907 tests: Fixing broken test/cephtool-test-mon.sh test
Since the merge of pr #7693, 'ceph command' to get the help is invalid.
As a result, 'test/cephtool-test-mon.sh' test was broken

This patch simply change the 'ceph command' by a 'ceph --help command'

Since this change the test is passing again.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-04 16:58:58 +02:00
Adam C. Emerson
8f9e7b0b1d rgw: Do not try to encode or decode time_t
time_t's width varies between machines. Also it fails to compile on 32
bit linux.

Fixes: http://tracker.ceph.com/issues/15330
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2016-04-04 10:56:49 -04:00
Adam C. Emerson
778506ed7d time: Change temporary variable types in time decode
Since we're decoding 32-bit integers, just use uint32_t and then cast them to
what utime_t expects.

Fixes: http://tracker.ceph.com/issues/15330
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2016-04-04 10:56:30 -04:00
Casey Bodley
77ccd20d90 Merge pull request #8422 from ceph/wip-fix-cmake
CMake: For CMake version <= 2.8.11, use LINK_PRIVATE
2016-04-04 10:35:20 -04:00
Sage Weil
4a88a7f1ce librados: fix narrow race with tid return value assignment
The completion should be done by the time op_submit returns.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 10:28:56 -04:00
Sage Weil
b7eb86fe30 osdc/Objecter: fix narrow race with tid assignment
The operation completion could finish and be freed before we
do the info->register_tid assignment.  Avoid this by doing the
assignment in _op_submit itself.

Fixes: #14364
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 10:28:56 -04:00
Casey Bodley
969d62827c Merge pull request #8410 from theanalyst/rgw/help-args
rgw: add a few more help options in admin interface
2016-04-04 10:28:38 -04:00
Sage Weil
77aee99835 Merge pull request #8393 from jcsp/wip-15309-2
qa: update rest test cephfs calls (part 2)

Reviewed-by: Sage Weil <sage@redhat.com>
2016-04-04 09:42:57 -04:00
Sage Weil
1de73d7ec8 qa/workunits/rest/test.py: fs flag set enable_multiple true
This lets us run against a vstart cluster.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 09:39:03 -04:00
Sage Weil
42e692a9ff ceph-rest-api: do not include single-option CephChoices in prefix
This breaks commands like

COMMAND("fs flag set name=flag_name,type=CephChoices,strings=enable_multiple "
        "name=val,type=CephString", \
	"Set a global CephFS flag", \
	"fs", "rw", "cli,rest")

with only one option:

PUT fs/flag/set?flag_name=enable_multiple&val=true:  400
FAILURE: url  http://localhost:5000/api/v0.1/fs/flag/set?flag_name=enable_multiple&val=true
expected 200, got 400
Response content:  <html><body><table border=1><th>Possible commands:</th><th>Method</th><th>Description</th><tr><td>fs/flag/set?flag_name=enable_multiple&amp;va
l=val(&lt;string&gt;)
</td><td>PUT</td><td>Set a global CephFS flag</td></tr>
</table></body></html>

...and I can't tell why it's there.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-04 09:38:26 -04:00
Sage Weil
5aedc215e7 Merge pull request #8402 from ilc/master
configure: Add -D_LARGEFILE64_SOURCE to Linux build.
2016-04-04 09:32:12 -04:00
Sage Weil
6d5855814b Merge pull request #8420 from dzafman/wip-15347
test: Fix test to run with btrfs which has snap_### dirs

Reviewed-by: Sage Weil <sage@redhat.com>
2016-04-04 08:56:23 -04:00
Sage Weil
79582b04f6 Merge pull request #8423 from wjin/fix
osdmap: rm nonused variable

Reviewed-by: Sage Weil <sage@redhat.com>
2016-04-04 08:55:53 -04:00
Sage Weil
f203d56cd1 qa/workunits/rbd: qemu tests need to wait for image to be createdReviewe
qa/workunits/rbd: qemu tests need to wait for image to be created

Reviewed-by: Sage Weil <sage@redhat.com>
2016-04-04 08:55:14 -04:00
Sage Weil
01a56dc81c Merge pull request #8427 from ghxandsky/master
set 128MB tcmalloc cache size by bytes
2016-04-04 08:54:11 -04:00
Star Guo
9565a50c58 set 128MB tcmalloc cache size by bytes
Signed-off-by: Star Guo <star.guo@mevoco.com>
2016-04-04 13:41:52 +08:00
Sage Weil
548fb8b2d4 Merge pull request #8314 from dx9/wip-unittest-erasure-code-plugin
unittest_erasure_code_plugin: fix deadlock (Alpine)
2016-04-03 18:13:28 -04:00
Sage Weil
dac9ad338d Merge pull request #7693 from aclamk/auto_complete_python
ceph: bash auto complete for CLI based on mon command descriptions

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-04-03 18:12:03 -04:00
Sage Weil
773d5ec167 Merge pull request #8366 from yangdongsheng/trival
build: fix compiling warnings

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-04-03 18:11:18 -04:00
Sage Weil
370e4f773a Merge remote-tracking branch 'gh/jewel' 2016-04-03 14:28:23 -04:00
Jason Dillaman
ff9843bb34 Striper: reduce assemble_result log level
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-04-03 10:52:10 -04:00
Jason Dillaman
f812199f72 qa/workunits/rbd: qemu tests need to wait for image to be created
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-04-03 10:29:38 -04:00
Sage Weil
f7137661a2 ceph_test_rados_api_tier: parse env
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-03 09:49:07 -04:00
Sage Weil
769c0affc4 ceph_test_rados_api_list: parse env
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-03 09:45:56 -04:00
Sage Weil
b9b07c13e4 osd/ReplicatedPG: tolerate pgls commands with full hash
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-03 09:45:56 -04:00
Sage Weil
5c612e82bb osd/ReplicatedPG: discard pgnls op that is outside pg bounds
This should only happen with a buggy client, but we should avoid crashing,
and send a polite error message back.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-03 09:45:56 -04:00