Kefu Chai [Wed, 25 Dec 2019 07:26:39 +0000 (15:26 +0800)]
mgr/restful: jsonify lists instead of maps
in python3, `map()` returns a `map` instance which is iterable, while in
python2, `map()` returns a `list`, but `JSONEncoder.default()` expects a
list or whatever which inherits from `json.JSONEncoder`.
in this change, we just return a materized list instead of a map for
json encoder.
Sage Weil [Tue, 24 Dec 2019 14:17:35 +0000 (08:17 -0600)]
Merge PR #32232 into master
* refs/pull/32232/head:
qa: no need to exclude ceph-mgr-diskprediction-cloud from package list to be installed
qa/packages: do not install ceph-mgr-diskprediction-cloud by default
ceph.spec.in: add runtime deps for mgr-diskprediction-cloud
Sage Weil [Mon, 23 Dec 2019 23:54:30 +0000 (17:54 -0600)]
Merge PR #32377 into master
* refs/pull/32377/head:
qa/suites/rados/thrash-old-clients: configure mons in terms of addrvecs
qa/suites/rados/thrash-old-clients: hammer: fix package list
qa/tasks/cephadm: set .conf to cluster config object
qa/tasks/cephadm: archive /var/log/ceph logs too (not just cluster dir)
qa/tasks/cephadm: client keyring
qa/tasks/cephadm: setup thrashers ctx item
qa/tasks/ceph_manager: asok commands via cephadm shell
qa/suites/rados/thrash-old-clients: stick to el7
qa/tasks/cephadm: check cluster log; support log-whitelist
qa/suites/rados/thrash-old-clienets: python-foo to python3-foo
qa/suites/rados/thrash-old-clients: add new exclude_packages
qa/suites/rados/thrash-old-clients: use cephadm
mon/ConfigMonitor: make legacy mon addr/port parseable by legacy code
Kefu Chai [Mon, 23 Dec 2019 09:57:06 +0000 (17:57 +0800)]
crimson: do not use small_vector
if `std::is_nothrow_move_constructible<small_vector<peer_shard_t, 2>>`
also depends on if the allocator throws when moving from a small_vector
to a new one, as we need to allocate memory for the destination
small_vector.
so, in this change, the optimization for small_vector is dropped,
because the default allocator used by small_vector throws.
Sage Weil [Sun, 22 Dec 2019 15:31:00 +0000 (09:31 -0600)]
cephadm: create /var/run/ceph/$fsid as needed
The get_container_mounts method only passed this through if it already
exists so that shell etc commands will work even when this dir isn't
present yet. Normally the systemd unit creates it. This may not be the
case on initial bootstrap, of even later if a deploy happens but a unit
hasn't started yet.
Precreate it during bootstrap and other times before we do a deplot so
that the unit.run command has this passed through.
Sage Weil [Tue, 17 Dec 2019 13:54:15 +0000 (07:54 -0600)]
mgr/cephadm: fix remapping of hosts and services
This was nondeterministically remapping services to different hosts
depending on which hosts had stale caches because the 'hosts' list order
didn't match 'results' + 'in_cache'.
Sage Weil [Mon, 16 Dec 2019 21:46:25 +0000 (15:46 -0600)]
cephadm: move mon creation config bits into mgr/cephadm
There's no need for mgr/cephadm to pass --mon-* arguments to
/usr/bin/cephadm just so it can add bits to the config file when the
config file is also being passed in from mgr/cephadm.
test: Do not test unicode if boost::spirit >= 1.72
Testing with Boost 1.72 unittest_confutil crashes with:
```
[ RUN ] ConfUtils.ReadFiles2
Assertion failed: (strict_ischar(ch)), function isblank, file /usr/local/include/boost/spirit/home/support/char_encoding/standard.hpp, line 129.
Abort
```
Which is due to the fact that in Boost 1.72 most of the character
testing has been garded with an assert to make sure char holds an
ascii char.
Like:
```
static bool
isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch)
{
BOOST_ASSERT(strict_ischar(ch));
return (ch == ' ' || ch == '\t');
}
```
And ReadFile2 explicitly tests for strings with char value > 0x7f.
So that is certainly going to crash.
Now I can imagine that we would like to be able to have users use
different encodings for things like logfiles.
But for now that is not going to work with the boost:spirit parser
Fixes: https://tracker.ceph.com/issues/43406 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Sage Weil [Sun, 22 Dec 2019 01:59:37 +0000 (19:59 -0600)]
Merge PR #32261 into master
* refs/pull/32261/head:
mgr/orchestrator: use full device path for blinking lights (if available)
mgr: report device by-path paths too
common/blkdev: include by-path path for each device in metadata
common/blkdev: factor get_device_metadata out of mon, osd
Sage Weil [Sun, 22 Dec 2019 01:59:18 +0000 (19:59 -0600)]
Merge PR #32333 into master
* refs/pull/32333/head:
qa/quites/rados/singleton-flat/valgrind-leaks: specify centos8
qa/suites/rados: test cephadm on centos and ubuntu both
qa/workunits/cephadm/test_cephadm.sh: detect python3 and python2
Sage Weil [Fri, 20 Dec 2019 16:13:40 +0000 (10:13 -0600)]
qa/suites/rados/thrash-old-clients: use cephadm
- deploy cluster with cephadm so we can run a octopus+ cluster and also
install client packages that are ancient.
- move client.2 back onto the third node, since packages no longer
conflict.
- test on centos 7.x (i picked 6), since the old releases all built on
that release.
Sage Weil [Sat, 21 Dec 2019 02:38:45 +0000 (20:38 -0600)]
Merge PR #32327 into master
* refs/pull/32327/head:
mgr/cephadm: remove old remotes
mgr/cephadm: try various pythons for root mode _run_cephadm
mgr/cephadm: no need to _get_connection from _create_daemon
mgr/cephadm: include host name in check-host result
mgr/cephadm: remove 'cephadm prepare-host' command
Patrick Donnelly [Sat, 21 Dec 2019 02:16:11 +0000 (18:16 -0800)]
Merge PR #27866 into master
* refs/pull/27866/head:
mds: fix deadlock when xlocking policylock
mds: handle link request with zero depth filepath2
mds: enable lock cache for openc/unlink requests
mds: include linkage type in dentry lease
mds: cleanup Server::set_trace_dist()
mds: define lease mask bits
mds: delegete lock cache to client
mds: suppress frozen inode when locks of dir operation is cached.
mds: invalidate lock caches when freezing dirfrag/subtree
mds: invalidate lock caches if they hold conflicting locks
mds: initial code for lock cache
mds: adjust locking for subtree migration
mds: add 'path_locked' flag to MDCache::find_ino_peers()
mds: change MDCache::discover_path()'s wants_xlocked semantic
mds: introduce Server::rdlock_two_paths_xlock_destdn()
mds: make Server::rdlock_path_xlock_dentry take locks
mds: make Server::rdlock_path_pin_ref() take dentry rdlocks
mds: take snaplock and policylock during path traverse.
mds: let Locker::acquire_locks()'s caller choose locking order
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>