Commit Graph

93441 Commits

Author SHA1 Message Date
Yingxin
1643f95791 crimson/net: don't execute_open() if exception is thrown
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
2018-12-21 03:09:05 +08:00
Yingxin
b22cf59c83 crimson/net: encapsulate protocol implementations with open state
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
2018-12-21 03:09:05 +08:00
Yingxin
60d5dd0c24 crimson/net: remove unecessary future dependencies for accept/dispatch
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
2018-12-21 03:09:05 +08:00
Yingxin
0142e5440d crimson/net: dispatch events in SocketConnection
* move dispatch(), and exception handling logics in accept() and
  connect() from SocketMessenger into SocketConnection, so we can manage
  the state transition in the same class and at the same abstraction
  level.
* gate the dangling futures in SocketConnection, because the
  connection's smart_ptr won't be hold by messenger any more during
  exception handling.
* don't return close() inside SocketConnection to prevent recursive
  gating -- dead lock.

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
2018-12-21 03:08:55 +08:00
Kefu Chai
35185b9e71
Merge pull request #25647 from tchaikov/wip-ftbfs-aarch64-gcc-8.1
test/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2018-12-20 23:42:38 +08:00
Sage Weil
b79442efce osd/PG: align past_intervals and last_epoch_clean for fabricated merge target
When we are fabricating a merge target, we have to construct a
meaningful pg_history_t and PastIntervals.  We do this with
pieces of the source PG and the last_epoch_clean and
last_epoch_started values from the pg_pool_t.  This usually
works, except when

 - source and target become clean, and we decrement pg_num
 - OSD mapping changes (for source and target)
 - source repeers, but target does not
 - OSD with source only tries to merge

In this case, the source will have a past_intervals start that is
later than the last_epoch_clean implied in the pg_pool_t.

This situation is harmless because we do not allow the actual
mappings of source and target to diverge during the merge window,
so if the source's past intervals was adjusted we can still use
it.  Avoid logging errors by adjusting the start epoch backwards.

Fixes: http://tracker.ceph.com/issues/37511
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-20 08:59:55 -06:00
Kefu Chai
7b99e65fad
Merge pull request #25641 from tchaikov/cmake-rbd-tracing
cmake: let rbd_api depend on librbd-tp

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-12-20 22:16:07 +08:00
Sebastian Wagner
4eb9fdad65
Merge pull request #25340 from sebastian-philipp/orchestrator-json-output
mgr/orchestrator: Add JSON output to CLI commands

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
2018-12-20 15:14:01 +01:00
Sage Weil
49907ea497 Merge PR #25630 into master
* refs/pull/25630/head:
	osd/OSDMap: cancel mapping if target osd is out

Reviewed-by: Sage Weil <sage@redhat.com>
2018-12-20 06:48:41 -06:00
Sage Weil
8bd90b1d0c Merge PR #25598 into master
* refs/pull/25598/head:
	common: avoid bl::get_current_ptr()-driven ref counting in denc.h.

Reviewed-by: Sage Weil <sage@redhat.com>
2018-12-20 06:48:24 -06:00
Kefu Chai
1189e2e3ea
Merge pull request #25585 from SUSE/wip-remove-cython-subinterpreter-check
cmake,deb,rpm: remove cython 0.29's subinterpreter check, re-enable build with cython 0.29+

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-12-20 19:30:08 +08:00
Wei Qiaomiao
e2b2f29457 client: add latency statistics for a read/fsync operation
Since read and fsync are citical operation in IO performance test, it is necessary to add lantency statistics for them.

Signed-off-by: Wei Qiaomiao <wei.qiaomiao@zte.com.cn>
2018-12-20 19:10:23 +08:00
Kefu Chai
fdd8d2e95e test/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64
this should address the GCC bug which causes following failure:

/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/test/crimson/test_perfcounters.cc:35:9:
internal compiler error: in tsubst_decomp_names, at cp/pt.c:16537
         for (const auto &[path, perf_counter_ref] : by_path) {
         ^~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-12-20 18:50:17 +08:00
Sebastian Wagner
3164551e3f ceph-volume: Add venv to vstart cmake target
Adds new add_custom_target `ceph-volume-venv-setup`
that creates a virtual environment, and
calls `python setup.py develop`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-12-20 10:57:02 +01:00
Sebastian Wagner
933b2cfc28 mgr/orchestrator: Add test orchestrator
1. To be able to run the cli without an external orchestrator.
2. Run the CLI in Teuthology.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-12-20 10:56:49 +01:00
Mykola Golub
19d63aca40 doc/mgr/prometheus: document rbd stats options
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-12-20 08:38:54 +00:00
Mykola Golub
e5ee3c88a6 pybind/mgr/prometheus: rbd stats namespace support
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-12-20 08:30:55 +00:00
Sebastian Wagner
ca2af7625c mgr/ansible: Python 3 fix
Also: Some minor cleanup.
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-12-20 09:15:53 +01:00
Kefu Chai
9309c24504 cmake: let rbd_api depend on librbd-tp
whoever includes tracing/librbd.h should depends on librbd-tp.

this fix the FTBFS of:

ceph/src/librbd/librbd.cc:50:10: fatal error: tracing/librbd.h: No such
file or directory
 #include "tracing/librbd.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
src/librbd/CMakeFiles/rbd_api.dir/build.make:62: recipe for target
'src/librbd/CMakeFiles/rbd_api.dir/librbd.cc.o' failed

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-12-20 13:38:30 +08:00
Sage Weil
3a2b090623 Merge PR #25622 into master
* refs/pull/25622/head:
	Objecter.cc: make op resend logic more readable

Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2018-12-19 21:23:26 -06:00
Sage Weil
9f3cf00b79 Merge PR #25360 into master
* refs/pull/25360/head:
	qa/workunits/mon/pg_autoscaler: clean up pools afterwards
	qa/suites/rados/singletone/all/pg-autoscaler: whitelist health warnings
	qa/tasks/ceph: wait for splits/merges before final scrub
	mon/OSDMonitor: be tidy with target_size_ratio and pre-nautilus code
	mgr/pg_autoscaler: simplify conditions
	qa/suites/rados: add simple pg-autoscaler test
	qa/workunits/cephtool/test.sh: pg_autoscale_mode=off while testing pg_num etc
	doc/rados/operations: document autoscaler and its health warnings
	mgr/pg_autoscaler: add pg autoscaler module
	pybind/mgr/mgr_util: move format_ helpers out of status module
	mon/OSDMonitor: accept optional target_size_{bytes,ratio} to 'osd pool create'
	mon/OSDMonitor: remove max_split_count configurable
	osd/osd_types: pool_opts_t: int -> int64_t
	osd/osd_types: pool_opts: fix whitespace
	osd/osd_types: pool_opts_t: make encoding feature-dependent
	mgr/devicehealth: pg_num_min 1 for device_health_metrics pool
	mon/OSDMonitor: accept optional pg_num_min to 'osd pool create'
	mon/OSDMonitor: apply osd_pool_default_pg_autoscale_mode to new pools
	pybind/mgr/mgr_module: some accessors
	mon/MgrMonitor: enable progress module by default
	osd/osd_types: add pool pg_autoscale_mode, pg_num_min, target_size_{bytes,ratio} properties
	osdc/Objecter: revise get_latest_version locking
	os/memstore: ignore OP_COLL_SET_BITS
	qa: generalise REQUIRE_MEMSTORE
	mgr: drop GIL in get_config
	mon: add 'size' arg to `osd pool create`
	mon: use pg_num_target for checks during creation
	mgr: revise locking in getter paths
	common/options: add `mon_target_pg_per_osd`
	mgr: expose OSDMap.pool_raw_used_rate

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2018-12-19 21:22:35 -06:00
xie xingguo
4518c40525 mgr/DaemonServer: merge pg upmap check into status check too
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2018-12-20 09:07:02 +08:00
xie xingguo
2d9642c3fc osd/OSD: clean up the pg-merge code a bit
Note that the __cur__ spg_t should already be included in the children set
and hence we could safely move that insertion.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2018-12-20 09:07:00 +08:00
xie xingguo
3f945585e9 mgr/DaemonServer: allow merge only if merge participants are active+clean
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2018-12-20 09:06:57 +08:00
Sage Weil
b255e49259 qa/workunits/mon/pg_autoscaler: clean up pools afterwards
This avoids a huge pg merge from 100s to 4, which takes a long time and
makes the teuthology scrub cleanup time out.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-19 14:37:01 -06:00
Sage Weil
b8d45b262c qa/suites/rados/singletone/all/pg-autoscaler: whitelist health warnings
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-19 14:37:01 -06:00
Sage Weil
6f06e394e4 qa/tasks/ceph: wait for splits/merges before final scrub
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-19 14:37:01 -06:00
Yehuda Sadeh
b6b2e7f71a
Merge pull request #25056 from fghaas/doc-rgw-openstack
doc: Improve OpenStack integration and multitenancy docs for radosgw

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Reviewed-by: Abhishek Lekshmanan <abhishek@suse.com>
Reviewed-by: Kai Wagner <kwagner@suse.com>
Reviewed-by: Maxime Guyot <maxime@root314.com>
2018-12-19 12:28:55 -08:00
jtlayton
8dd93330e4
Merge pull request #25610 from jtlayton/wip-orchestrator
mgr/orchestrator: fix _list_services display
2018-12-19 14:11:46 -05:00
Sage Weil
b6822c8a36 Merge PR #25614 into master
* refs/pull/25614/head:
	cls/rgw: update rgw_cls_usage_log_trim_op encode version

Reviewed-by: Sage Weil <sage@redhat.com>
2018-12-19 11:45:29 -06:00
Igor Fedotov
a15efa1621 os/bluestore: more robust handling for lack of per-pool stats cases.
Fixes: https://tracker.ceph.com/issues/37652

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
2018-12-19 20:03:48 +03:00
Florian Haas
d730820a48 Improve OpenStack integration and multitenancy docs for radosgw
Add explanatory information on:

* "rgw swift account in url" (including the Swift account in the Swift
  API url and Keystone endpoint)
* "rgw swift versioning enabled" (enabling Swift object versioning)
* "rgw s3 auth use keystone" (enabling S3 authentication against
  Keystone)
* "rgw keystone implicit tenants" (multi-tenancy via Keystone, including
  its implications for the Swift and S3 APIs)

Fixes: http://tracker.ceph.com/issues/36765
Signed-off-by: Florian Haas <florian@citynetwork.eu>
2018-12-19 17:46:56 +01:00
Mykola Golub
5b6037aeb4 mgr: fix crash due to multiple sessions from daemons with same name
Don't assume perf counter instances are stable. If there are
multiple sessions from daemons reporting the same name (e.g. rgws),
the instances are cleared in DaemonServer::handle_open.
If the daemons have different counter names (for counters like
"objecter-0x55b6f4f1a630.op_active") it will throw out_of_range in
DaemonPerfCounters::update when accessing the instance removed by
another session.

The regression was introduced when adding avgcount support.

Fixes: https://tracker.ceph.com/issues/36244
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-12-19 15:55:15 +02:00
Kefu Chai
98860b8bf0
Merge pull request #25629 from tchaikov/wip-37707
install-deps.sh: disable centos-sclo-rh-source

Reviewed-by: Sage Weil <sage@redhat.com>
2018-12-19 20:46:23 +08:00
Lenz Grimmer
44bd1a0aa7
Merge pull request #25628 from rhcs-dashboard/masthead-changes
mgr/dashboard: Changed background color of Masthead to brand gray

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-12-19 13:30:31 +01:00
Yehuda Sadeh
c5079bd4f6 test: add a json tester
specifically test issue #37706

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-12-19 03:36:49 -08:00
Yehuda Sadeh
d3e2d9bf06 ceph_json: parser sets data on all types when parsing
Fixes: http://tracker.ceph.com/issues/37706

This was changed in e47a228a86, but breaks existing usage.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-12-19 03:36:49 -08:00
Jeff Layton
da6ae669df mgr/orchestrator: fix _list_services display
I see this error when using "ceph orchestrator service ls":

Error EINVAL: Traceback (most recent call last):
  File "/usr/lib64/ceph/mgr/orchestrator_cli/module.py", line 318, in handle_command
    return self._handle_command(inbuf, cmd)
  File "/usr/lib64/ceph/mgr/orchestrator_cli/module.py", line 330, in _handle_command
    return self._list_services(cmd)
  File "/usr/lib64/ceph/mgr/orchestrator_cli/module.py", line 165, in _list_services
    s.config_location))
AttributeError: 'ServiceDescription' object has no attribute 'config_location'

The config_locations field should be rados_config_location.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2018-12-19 06:17:59 -05:00
xie xingguo
d06b65a0ab osd/OSDMap: cancel mapping if target osd is out
Suppose we have a bad pg_upmap_item, say:
```
pg_upmap_items 2.0 [0,8,5,4,6,12]
```
which maps osd.6 to osd.12 that is currently marked as out.

It turns out **maybe_remove_pg_upmaps** can not handle the
above case well because **_apply_upmap** will silently discard
any bad mappings whenver they try to target at some current
__out__ OSDs. So if you call **pg_to_raw_up(2.0)**, you'll probably
get something like: ```up [8,4,6] ``` (e.g., the last mapping pair 6->12
is simply ignored by **_apply_upmap**).

Make **clean_pg_upmaps** do the tidy-up check instead, since it
already has __bare__ access to those pg_upmaps and pg_upmap_items.

Fixes: http://tracker.ceph.com/issues/37501
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: ningtao <ningtao@sangfor.com.cn>
2018-12-19 18:03:53 +08:00
Kefu Chai
aa2b9e9a64 install-deps.sh: skip unavailable repos
as centos-sclo-rh-source leads us to 404 at this moment. and we are not
using the source repo for building ceph. so we can just skip any
unavailable repo.

Fixes: http://tracker.ceph.com/issues/37707
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2018-12-19 17:06:35 +08:00
Neha Gupta
4dcf76b175
mgr/dashboard: Changed background color of Masthead to brand gray
Fixes: http://tracker.ceph.com/issues/35690
Signed-off-by: Neha Gupta <gnehapk@gmail.com>
2018-12-19 17:35:25 +09:00
xie xingguo
515c0fa0f8 mgr/DaemonServer: *merge* pg-merge source and target status check
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2018-12-19 15:19:41 +08:00
xie xingguo
9545a15b07 mgr/DaemonServer: cancel upmap for merge source and target simultaneously
Which is more effective...

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2018-12-19 15:19:40 +08:00
xie xingguo
3ffd9c2033 mgr/balancer: skip auto-balancing for pools with pending pg-merge
This is racy and can lead to some corner cases which are hard to
take care of...

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2018-12-19 15:19:32 +08:00
Sage Weil
e998991a09 mon/OSDMonitor: be tidy with target_size_ratio and pre-nautilus code
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-18 21:41:26 -06:00
Song Shun
2428f50ee8 Objecter.cc: make op resend logic more readable
make op resend logic more readable
  according to discussion at https://github.com/ceph/ceph/pull/25243

Signed-off-by: Song Shun <song.shun3@zte.com.cn>
2018-12-19 10:55:43 +08:00
Sage Weil
1f3e9d4811 mgr/PyModule: populate ModuleOptions and expose to mon
Populate the ModuleOptions from MODULE_OPTIONS fields and pass it to the
mon for inclusion in the MgrMap.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-18 17:42:59 -06:00
Sage Weil
ff09eb6715 mon/ConfigMonitor: unify module options with built-in options
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-18 17:42:59 -06:00
Sage Weil
2b47f3db14 mon/MgrMonitor: populate options
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-18 17:42:59 -06:00
Sage Weil
280c23ba20 mon/MgrMap: define ModuleOptions and include in map
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-18 17:21:55 -06:00