Kefu Chai [Tue, 1 Jan 2019 08:38:15 +0000 (16:38 +0800)]
crimson: workaround an ICE of GCC
this change works around the FTBFS on arm64:
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/crimson/common/config_proxy.h:74:13:
internal compiler error: in tsubst_decomp_names, at cp/pt.c:16537
for (auto& [obs, keys] : rev_obs) {
^~~
Please submit a full bug report,
with preprocessed source if appropriate.
it seems that this issue is a dup of
https://bugzilla.redhat.com/show_bug.cgi?id=1639019 .
Kefu Chai [Tue, 1 Jan 2019 07:49:05 +0000 (15:49 +0800)]
librbd: workaround an ICE of GCC
GCC is somehow annoyed at seeing the combination of decltype and
initializer_list in this place. i tried to remove the `if` clause, and
only left the `else` block, GCC was happy with that change. i also tried
to pass an empty `{}` to `decltype(reply.lockers)`, and GCC was also
happy with that. so i guess there are multiple factors taking effect in
this problem. probably any of them could be the last straw that breaks
GCC.
but we cannot have a minimal reproducer for this issue here without more
efforts. and `reply.lockers` is empty after `reply` is constructed, so
it would be simpler if we just add the locker info to it instead of
assigning a newly constructed `map` to it.
Sage Weil [Tue, 1 Jan 2019 04:31:18 +0000 (22:31 -0600)]
Merge PR #25597 into master
* refs/pull/25597/head:
mgr/hello: define some module options
pybind/mgr/mgr_module: normalize defaults to str when type is missing
mgr/telegraf: specify option types
mgr/telemetry: specify option types
mgr/zabbix: specify option types
mgr/localpool: document options and specify in native types
mgr/devicehealth: document options and specify in native types
mgr/balancer: document and specify options
common/options: make runtime vs not runtime explicit, not type-dependent
mon/MgrMonitor: mark module options with FLAG_MGR
mon/MgrMonitor: make find_module_option handle localized option names
pybind/mgr/mgr_module: set values as string
mgr: return options as appropriate python type
mgr/PythonCompat: python 3 cludges
pybind/mgr/mgr_module: make use of defined default value
mgr/PyModule: populate ModuleOptions and expose to mon
mon/ConfigMonitor: unify module options with built-in options
mon/MgrMonitor: populate options
mon/MgrMap: define ModuleOptions and include in map
common/options: expand type helpers and make them static
common/options: pin enums to values
Reviewed-by: Tim Serong <tserong@suse.com> Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Sage Weil [Tue, 1 Jan 2019 04:30:40 +0000 (22:30 -0600)]
Merge PR #25652 into master
* refs/pull/25652/head:
osd/OSDMap: disallow new upmaps on pgs that are pending merge
osd/PG: align past_intervals and last_epoch_clean for fabricated merge target
Kefu Chai [Sun, 30 Dec 2018 13:57:04 +0000 (21:57 +0800)]
osd: unlock osd_lock when tweaking osd settings
unlock osd_lock when serving "debug kick_recovery_wq" command
we need to unlock osd_lock temporarily when updating the osd settings,
otherwise we will run into assert failure. because
OSD::handle_conf_change() acquires the osd_lock which is not a recursive
lock.
Kefu Chai [Sun, 30 Dec 2018 13:46:55 +0000 (21:46 +0800)]
osd: use unlock_guard for unlock osd temporarily
when OSD::do_command() gets called, osd_lock is acquired. but when
serving some of these commands, we need to call methods which also
acquire the osd_lock by themselves. for instance,
OSD::handle_conf_change() gets called by cct->_conf.apply_changes().
to allow them to do so, we unlock osd_lock before calling those methods,
and re-lock it after done with them.
unlock_guard is introduced to unlock and re-lock the lock in a RAII style.
bluestore: silence Clang warning on possible uninitialize usuage
```
/home/wjw/ceph.head/ceph/src/os/bluestore/BlueStore.cc:5935:15: note: initialize the variable 'reserved' to silence this warning
int reserved;
^
= 0
1 warning generated.
```
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Patrick Donnelly [Sun, 23 Dec 2018 04:16:13 +0000 (20:16 -0800)]
Merge PR #25619 into master
* refs/pull/25619/head:
mds: use frag_vec_t for efficient frag storage
mds: do not copy session map accidentally
mds: use vector for subtree access
include/frag: use more efficient small vectors
StackStringStream: add strv method short-cut
include: add small_vector encode/decode/<<
mds: scope using directives
David Zafman [Fri, 21 Dec 2018 21:25:10 +0000 (13:25 -0800)]
test: Disable duplicate request command test during scrub testing
Scrub testing requires an orderly control of scrubbing. Most but not
all the time, the duplicate scrub request is ignored because the first
request hasn't finished. Teuthology enables this environment variable
in the workunit handling.
Fixes: https://tracker.ceph.com/issues/36525 Signed-off-by: David Zafman <dzafman@redhat.com>
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>
Sage Weil [Wed, 19 Dec 2018 22:59:09 +0000 (16:59 -0600)]
pybind/mgr/mgr_module: normalize defaults to str when type is missing
If the module doesn't specify a type for the option, it is probably
an older module. Make sure that the default value we provide is normalized
to a string, just in case the module declares something like
{
'name': 'my_option',
'default': True,
}
where the default is *not* a string, but an user-set value coming from
the config infrastructure would be a string.
Sage Weil [Wed, 19 Dec 2018 00:05:02 +0000 (18:05 -0600)]
mon/MgrMonitor: make find_module_option handle localized option names
If we get "mgr/$module/$instance/$option", normalize it to
"mgr/$module/$option" before looking it up. That's because a
'mgr/dashboard/x/server_port' in our database is really the
'mgr/dashboard/server_port' option.
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.