Patrick Donnelly [Sat, 22 Dec 2018 01:16:11 +0000 (17:16 -0800)]
Merge PR #25536 into master
* refs/pull/25536/head:
mds: don't wait for snapclient sync when handling reconnect
mds: extend reconnect period when mds is busy
mds: renew client session when receiving any message
mds: use mono_clock for reconnect timeout
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Thu, 20 Dec 2018 19:42:19 +0000 (11:42 -0800)]
MDSMonitor: allow beacons from stopping MDS that was laggy
Otherwise these get continually dropped.
Reproducing this manually:
o only have 2 MDS running (to prevent failover)
o max_mds=2
o create a lot of dirs with pins on rank 1 to make stopping take a while (as of this commit)
o max_mds=1
o immediately start dropping beacon packets to the mons from rank 1 using iptables
o wait ~30 seconds until the rank shows up as laggy
o remove the iptables rule
Now debug output shows after this commit:
2018-12-20 14:58:07.190 7fbe19f5d700 5 mon.a@0(leader).mds e148 preprocess_beacon mdsbeacon(34119/b up:stopping seq 155 v148) v7 from mds.1 127.0.0.1:6839/1223470631 compat={},rocompat={},incompat={1=base v0.20,2=client writeable ranges,3=default file layouts on dirs,4=dir inode in separate object,5=mds uses versioned encoding,6=dirfrag is stored in omap,8=no anchor table,9=file layout v2,10=snaprealm v2}
2018-12-20 14:58:07.190 7fbe19f5d700 10 mon.a@0(leader).mds e148 preprocess_beacon: GID exists in map: 34119
2018-12-20 14:58:07.190 7fbe19f5d700 5 mon.a@0(leader).mds e148 _note_beacon mdsbeacon(34119/b up:stopping seq 155 v148) v7 noting time
2018-12-20 14:58:07.190 7fbe19f5d700 7 mon.a@0(leader).mds e148 prepare_update mdsbeacon(34119/b up:stopping seq 155 v148) v7
2018-12-20 14:58:07.190 7fbe19f5d700 12 mon.a@0(leader).mds e148 prepare_beacon mdsbeacon(34119/b up:stopping seq 155 v148) v7 from mds.1 127.0.0.1:6839/1223470631
2018-12-20 14:58:07.190 7fbe19f5d700 15 mon.a@0(leader).mds e148 prepare_beacon got health from gid 34119 with 0 metrics.
2018-12-20 14:58:07.190 7fbe19f5d700 0 log_channel(cluster) log [INF] : MDS health message cleared (mds.1): 1 slow metadata IOs are blocked > 30 secs, oldest blocked for 30 secs
2018-12-20 14:58:07.190 7fbe19f5d700 1 -- 127.0.0.1:40495/0 --> 127.0.0.1:40495/0 -- log(1 entries from seq 129 at 2018-12-20 14:58:07.192368) v1 -- 0x5de9f11a80 con 0
2018-12-20 14:58:07.190 7fbe19f5d700 1 mon.a@0(leader).mds e148 prepare_beacon clearing laggy flag on 127.0.0.1:6839/1223470631
2018-12-20 14:58:07.190 7fbe19f5d700 5 mon.a@0(leader).mds e148 prepare_beacon mds.1 up:stopping -> up:stopping standby_for_rank=-1
Fixes: https://tracker.ceph.com/issues/37724 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Greg Farnum [Thu, 20 Dec 2018 18:33:38 +0000 (10:33 -0800)]
doc: Clean up the snapshot consistency note
The old note made it sound like we weren't crash-consistent, and had a
confusing section about needing to clone before mounting.
You *do* need to clone the snapshot before mounting it, but that has
nothing to do fs freezing or consistency.
Yingxin [Wed, 21 Nov 2018 20:39:37 +0000 (04:39 +0800)]
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.
Kefu Chai [Thu, 20 Dec 2018 10:49:43 +0000 (18:49 +0800)]
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) {
^~~
Kefu Chai [Thu, 20 Dec 2018 04:51:37 +0000 (12:51 +0800)]
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
Sage Weil [Thu, 20 Dec 2018 03:22:35 +0000 (21:22 -0600)]
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
Florian Haas [Mon, 12 Nov 2018 12:49:15 +0000 (13:49 +0100)]
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)
Jeff Layton [Wed, 19 Dec 2018 11:12:02 +0000 (06:12 -0500)]
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.
xie xingguo [Wed, 19 Dec 2018 09:01:23 +0000 (17:01 +0800)]
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.
Kefu Chai [Wed, 19 Dec 2018 08:37:55 +0000 (16:37 +0800)]
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.