Commit Graph

87511 Commits

Author SHA1 Message Date
Kefu Chai
4c0a2b9373 cmake: add WITH_GTEST_PARALLEL option
and remove src/test/gtest-parallel submodule, because gtest-parallel is
only useful for running tests. and not all end-users are interested in
running test not to mention running them in parallel. so, to avoid
including gtest-parallel scripts in the dist tarball. it'd be better to
make it optional, and an external project.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-15 15:55:15 +02:00
Erwan Velu
13bc625b5f src/test: Using gtest-parallel to speedup unittests
Unittests are run sequentially and could take a long while to run.

This commit is about using gtest-parallel on some of them which are
known to be very slow due to this sequentiality.

To enable the parallel features, the 'parallel' argument just have to be
added to the add_ceph_unittest() call like in :
    -add_ceph_unittest(unittest_throttle)
    +add_ceph_unittest(unittest_throttle parallel)

This commit impact the following tests :

Test name                          Before   After (in seconds)
unittest_erasure_code_shec_all:       212      43
unittest_throttle                      15       5
unittest_crush                          9       6
unittest_rbd_mirror                    79      21

Total                                 315      75

This commit saves 240 seconds (4 minutes) per build.

Note it exist several other long tests but can't be parallelized since
there is explicit dependencies in the order to run the subtests.
Those stay sequential.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-06-15 15:53:30 +02:00
Orit Wasserman
42ff13c776
Merge pull request #22390 from votdev/rgw_metadata_self
rgw: Get the user metadata of the user used to sign the request
2018-06-15 12:21:41 +03:00
Lenz Grimmer
ac8f5c75ec
Merge pull request #22459 from p-na/grafana-token-auth
mgr/dashboard: Add token authentication to Grafana proxy

Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-06-15 09:44:46 +02:00
Lenz Grimmer
85908e280f
Merge pull request #22014 from Devp00l/wip-task-wrapper
mgr/dashboard: Task wrapper service

Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-06-15 09:40:17 +02:00
Kefu Chai
3234db0649
Merge pull request #22524 from tchaikov/wip-history-les-bound
osd/PG: unset history_les_bound if local-les is used

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2018-06-15 10:08:20 +08:00
Kefu Chai
a20ca03042
Merge pull request #22472 from majianpeng/bluestore-misc-cleanup
os/bluestore: misc cleanup

Reviewed-by: Sage Weil <sage@redhat.com>
2018-06-15 10:07:12 +08:00
Kefu Chai
3071cb8997
Merge pull request #22538 from alimaredia/wip-vstart-cmake-cls-opt
cmake: Add cls_opt for vstart target

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-06-15 09:24:19 +08:00
Ali Maredia
f824161a3a cmake: Add cls_opt for vstart target
Adding a dependency on cls_opt for the radosgw so
that when the vstart target is made, `radosgw-admin
mfa` commands work.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2018-06-14 14:40:07 -04:00
Sage Weil
70ba58e9e8 Merge PR #22554 into master
* refs/pull/22554/head:
	qa/standalone/ceph-helpers.sh: Fixing comment for wait_for_health()
	tests: Protecting rados bench against endless loop
	qa/standalone/ceph-helpers.sh: Defining custom timeout for wait_for_clean()

Reviewed-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2018-06-14 13:04:56 -05:00
Kefu Chai
4040e2acad
Merge pull request #22491 from tchaikov/wip-seastar-msgr
crimson: port messenger to seastar

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-06-14 23:24:42 +08:00
Kefu Chai
ae5fde0240
Merge pull request #22547 from tchaikov/wip-spdk
spdk: update to latest spdk-18.05 branch

Tested-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
2018-06-14 23:23:01 +08:00
Stephan Müller
f62ab0ed5b mgr/dashboard: Executing messages for tasks
Signed-off-by: Stephan Müller <smueller@suse.com>
2018-06-14 16:46:35 +02:00
Stephan Müller
fbfdbdc0d9 mgr/dashboard: Use task wrapper in RBD list
Signed-off-by: Stephan Müller <smueller@suse.com>
2018-06-14 16:46:35 +02:00
Stephan Müller
260dad1729 mgr/dashboard: Use task wrapper in RBD form
Signed-off-by: Stephan Müller <smueller@suse.com>
2018-06-14 16:46:35 +02:00
Stephan Müller
3201ba6f7d mgr/dashboard: Task wrapper service
Has a method to wrap an API call into a task.

Fixes: https://tracker.ceph.com/issues/24134

Signed-off-by: Stephan Müller <smueller@suse.com>
2018-06-14 16:46:35 +02:00
Lenz Grimmer
d785010a35
Merge pull request #22303 from ricardoasmarques/wip-help-menu
mgr/dashboard: Add help menu entry

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-06-14 15:56:39 +02:00
Patrick Nawracay
add29e27f4 mgr/dashboard/cleanup: Remove unnecessary parentheses
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-06-14 13:54:33 +02:00
Patrick Nawracay
bd2196b6ca mgr/dashboard: Add token authentication to Grafana proxy
Enables token authentication for the Grafana proxy as additional option
to username/password authentication. The authentication method has to be
set, too.

    $ ceph dashboard set-grafana-api-token <token>	   # default: ''
    $ ceph dashboard set-grafana-api-auth-method <method>  # default: ''

Possible values for the authentication method are 'password' and
'token'.

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-06-14 13:54:00 +02:00
Lenz Grimmer
27f6012ff4
Merge pull request #21460 from s0nea/wip-dashboard-config-options
mgr/dashboard: Config options integration (read-only) depends on #22422

Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2018-06-14 12:59:47 +02:00
Kefu Chai
ff81eb924e
Merge pull request #22557 from tchaikov/wip-rbd-ggate
rbd-ggate: tag "level" with need_dynamic

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2018-06-14 17:17:31 +08:00
Erwan Velu
2ce480b8fd qa/standalone/ceph-helpers.sh: Fixing comment for wait_for_health()
wait_for_health doesn't check if the cluster is making progress. So
let's adjust the comment accordingly.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-06-14 11:06:52 +02:00
Erwan Velu
e6e10246c6 tests: Protecting rados bench against endless loop
If the cluster dies during the rados bench, the maximum running time is
no more considered and all emitted aios are pending.

rados bench never quits and the global testing timeout (3600 sec : 1
hour) have to be reach to get a failure.

This situation is dramatic for a background test or a CI run as it locks
the whole job for too long for an event that will never occurs.

This ideal solution would be having 'rados bench' considering a failure
once the timeout is reached when aios are pending.

A possible workaround here is to put use the system command 'timeout'
before calling rados bench and fail if rados didn't completed on time.

To avoid side effects, this patch is doubling rados timeout. If rados
didn't completed after twice the expected time, it have to fail to avoid
locking the whole testing job.

Please find below the way it worked on a real test case.
We can see no IO after t>2 but despite timeout=4 the bench continue.
Thanks to this patch, the bench is stopped at t=8 and return 1.

5: /home/erwan/ceph/src/test/smoke.sh:55: TEST_multimon:  timeout 8 rados -p foo bench 4 write -b 4096 --no-cleanup
5: hints = 1
5: Maintaining 16 concurrent writes of 4096 bytes to objects of size 4096 for up to 4 seconds or 0 objects
5: Object prefix: benchmark_data_mr-meeseeks_184960
5:   sec Cur ops   started  finished  avg MB/s  cur MB/s last lat(s)  avg lat(s)
5:     0       0         0         0         0         0           -           0
5:     1      16      1144      1128   4.40538   4.40625  0.00412965   0.0141116
5:     2      16      2147      2131   4.16134   3.91797  0.00985654   0.0109079
5:     3      16      2147      2131   2.77424         0           -   0.0109079
5:     4      16      2147      2131    2.0807         0           -   0.0109079
5:     5      16      2147      2131   1.66456         0           -   0.0109079
5:     6      16      2147      2131   1.38714         0           -   0.0109079
5:     7      16      2147      2131   1.18897         0           -   0.0109079
5: /home/erwan/ceph/src/test/smoke.sh:55: TEST_multimon:  return 1
5: /home/erwan/ceph/src/test/smoke.sh:18: run:  return 1

Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-06-14 11:06:52 +02:00
Erwan Velu
62d2646c30 qa/standalone/ceph-helpers.sh: Defining custom timeout for wait_for_clean()
The wait_for_clean() is using the default timeout aka 300sec = 5mn.

wait_for_clean() is trying to find a clean status within that timeout
_or_ reset its counter if any progress got made in between loops.

In a case where the cluster is sane, the recovery should be made in
shorter than 5mn but it the cluster died, waiting for 5mn for nothing is
unefficient.

This patch is about defining a custom timeout for a wait_for_clean() not
to wait much more that 1m30 (90sec). If no progress is made in that
period, there is very few chance this will read the a valid state
anyhow.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-06-14 11:06:52 +02:00
Lenz Grimmer
be406bf515
Merge pull request #22526 from Devp00l/wip-new-validators
mgr/dashboard: Added new validators

Reviewed-by: Volker Theile <vtheile@suse.com>
2018-06-14 11:05:26 +02:00
Kefu Chai
9065f4edae rbd-ggate: tag "level" with need_dynamic
otherwise compiler will fail to figure out the right should_gather()
variant to use.
see also 1a3e9357

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 10:41:20 +08:00
Kefu Chai
c2026b7473 cmake: update BuildSPDK for spdk-18.05
in spdk v18.05, libuuid is linked by libspdk_util.a, in which,
it is used by lib/util/uuid.c. and libspdk_vol.a uses the wrapper
function exposed by libspdk_util.a, so update the CMakefile script to
reflect the change.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 09:34:01 +08:00
Kefu Chai
8098e54964 spdk: update to latest spdk-18.05 branch
also bump dpdk to to spdk-18.05 branch. this should fix the build
failure on Fedora 28

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 09:34:01 +08:00
Josh Durgin
8b83d44c90
Merge pull request #22500 from thinkercui/bugfix
osd: fix memory leak in EC fast and error read

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
2018-06-13 16:57:57 -04:00
Jason Dillaman
ad89b795f0
Merge pull request #21969 from zhongyimao/interlock_fast-diff/object-map
rbd: interlock object-map/fast-diff features together

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-06-13 16:22:04 -04:00
Jason Dillaman
10edd56957
Merge pull request #22304 from vshankar/wip-scheduled-rebalancer
rbd-mirror: schedule rebalancer to level-load instances

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-06-13 16:21:12 -04:00
Kefu Chai
5da94738f6 test/crimson: add test_alien_echo
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 00:13:58 +08:00
Kefu Chai
994410d3e7 crimson/thread: add a condition var impl
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 00:13:58 +08:00
Kefu Chai
243eeee9dd crimson: add throttler
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 00:13:58 +08:00
Kefu Chai
a28559842b common/Throttle: extract ThrottleInterface
the Message classes are shared by OSD and other components of Ceph,
and the throttle in Policy class is different in seastar and
non-seastar world. we will have different implementations for the
seastar applications and non-seastar apps, to consolidate these
two implementations, we need to introduce a common interface for
them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 00:10:34 +08:00
Kefu Chai
2041989cc2 crimson/net: use std::map for tracking connections
* s/list/map/ for better lookup performance.
* and connection management related changes

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 00:10:32 +08:00
Kefu Chai
a4c7dcd192 crimson/net: support the lossless connection and auth
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 00:10:10 +08:00
Tatjana Dehler
9ebf5eb650 mgr/dashboard: add config options to documentation page
This commit adds the config options stored by the MON database to the
configuration documentation page.
One can filter for these config options by setting the 'Source' filter
to 'mon' on the configuration documentation page.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2018-06-13 15:39:24 +02:00
Tatjana Dehler
79c7c5aa18 mgr/dashboard: fix typo - remove unnecessary blank
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2018-06-13 15:23:42 +02:00
Venky Shankar
d491615f08 test: add rbd-mirror image map rebalancer unit test
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Fixes: http://tracker.ceph.com/issues/24161
2018-06-13 06:36:38 -04:00
Venky Shankar
d96cee13d7 rbd-mirror: schedule rebalancer to level-load instances
Policy implementation takes care of evenly balancing images
across rbd mirror instances. This is done when images are
added to the map and/or instances are added or removed with
the exception of image removal -- removing images does not
reshuffle other (mapped) images which can result in some of
the instances under loaded (in worst case, if one removes
images which all map to a particular instance, that instance
would remain idle until more images are added or a shuffle is
triggered).

We could possibly trigger map shuffle when images are removed,
but that would change the interface between Policy and ImageMap
class (in the form of changes to Policy::remove_images()). Also,
policy (and its implementations) would have to do more work when
the above class method is invoked.

Therefore, an interval based rebalancer is added to ImageMap for
periodic rebalancing of images only if the following conditions
are met:

    - policy has been idle for a configured time duration
    - no scheduled or in-transit operations

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2018-06-13 06:36:38 -04:00
Venky Shankar
895d69f226 rbd-mirror: fix state transition table for disassociation
The final state transition when disassociating (removing) images
does not purge the image state map for a given image. This can
also result in uneven balance of images across instances as the
policy implementation relies on this structure to figure out
total number of images tracked.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2018-06-13 06:36:38 -04:00
Venky Shankar
bd83d93453 rbd-mirror: fix state comparison in Policy::is_state_scheduled()
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2018-06-13 06:36:38 -04:00
Venky Shankar
65abcd4801 rbd-mirror: remove unneeded instance_ids parameter
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2018-06-13 06:36:38 -04:00
Lenz Grimmer
77f40ed408
Merge pull request #22284 from tspmelo/wip-unit-test-api
mgr/dashboard: Add unit test for frontend api services

Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-06-13 12:20:18 +02:00
Lenz Grimmer
77f3bce87d
Merge pull request #22422 from Devp00l/wip-stringify-array-objects
mgr/dashboard: Stringify object[] in KV-table

Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Sebastian Krah <skrah@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-06-13 10:55:15 +02:00
Kefu Chai
b00346c759 crimson: add poor man's md_config_t
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-13 14:09:22 +08:00
Kefu Chai
a8e3448fef src/msg: extract Policy into its own header
and templaterize it. as we need to share Policy between seastar app and
non-seastar apps. and the Throttle interface for seastar is different
from that for non-seastar, so we should templaterize the Policy and
PolicySet.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-13 14:09:22 +08:00
Kefu Chai
b3e0558f42 msg: SocketConnection use consumption_result_type
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-13 14:09:22 +08:00
Casey Bodley
c8011ed0c6 msg: SocketConnection reads message tags
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-06-13 14:09:22 +08:00