Ronen Friedman [Sat, 11 Jan 2020 07:42:49 +0000 (09:42 +0200)]
crimson: fix aarch64 ctest failure by removing some lambda attributes
There seems to be no "universally accepted" way to declare a lambda as
[[always_inline]]. "Universally accepted" here meaning: accepted with
no error or warning by gcc8, gcc9 and clang.
See for example: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60503
Ronen Friedman [Mon, 6 Jan 2020 07:46:49 +0000 (09:46 +0200)]
crimson: fix lambda captures of non-variables
One cannot just capture a structured binding "non-variable".
(From the C++ standard, $8.4.5.2:
"If a lambda-expression [...] captures a structured binding (explicitly or implicitly),
the program is ill-formed.")
Ronen Friedman [Sun, 5 Jan 2020 06:23:58 +0000 (08:23 +0200)]
crimson: fix non-standard C++ constructs in errorator.h
Fixing use patterns accepted by gcc, but frowned upon by Clang:
Put noexcept specifier after attributes specifiers (as
per the C++ standard $11.3.5)
Limit the use of a not-completely-defined class names to
within function bodies, per the standard ("A class is considered
a completely-defined object type (or complete type) at the
closing } of the class-specifier.
Within the class member-specification, the class is regarded as
complete within function bodies, default arguments, noexcept-specifiers,
and default member initializers (including such things in nested classes).
Otherwise it is regarded as incomplete within its own class member-specification.")
Sage Weil [Sun, 29 Dec 2019 02:31:33 +0000 (20:31 -0600)]
Merge PR #32415 into master
* refs/pull/32415/head:
include/cpp-btree: use inline variable to define btree_is_key_compare_to
include/cpp-btree: use std::conditional_t<>
include/cpp-btree: use static_assert()
include/interval_set: use interval_set when appropriate
include/interval_set: rename some types
include/cpp-btree: add emplace_hint()
Kefu Chai [Fri, 27 Dec 2019 15:40:53 +0000 (23:40 +0800)]
qa/tasks/vstart_runner: write string to StringIO
we use `six.StringIO` for stdout when writing output messages from
`self.subproc.communicate()`, and `six.StringIO` accepts strings, so we
need to decode the output before sending them to `six.StringIO`.
but the second test instance created by
`rgw_log_entry::generate_test_instances` is created using the default
constructor of `rgw_log_entry`. if any of the member variable is created
using random bits in the heap, there is chance that the test fails like:
lijaiwei1 [Tue, 24 Dec 2019 14:34:46 +0000 (22:34 +0800)]
common: skip interfaces starting with "lo" in find_ipv{4,6}_in_subnet()
This will solve the issue that the osd can't restart after seting a
virtual local loopback IP.
In find_ipv4_in_subnet() and find_ipv6_in_subnet(), I use
boost::starts_with(addrs->ifa_name, "lo") to ship the interfaces
starting with "lo".
Fixes: https://tracker.ceph.com/issues/43417 Signed-off-by: Jiawei Li <lijiawei1@chinatelecom.cn>
Paul Cuzner [Wed, 18 Dec 2019 23:15:40 +0000 (12:15 +1300)]
cephadm: support deployment of node-exporter
Patch to support cephadm deploying node-exporter
containers. The node-exporter daemon has no
configuration and just needs access to the hosts
filesystem to pull the necessary system metrics.
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.
Jason Dillaman [Mon, 23 Dec 2019 16:34:07 +0000 (11:34 -0500)]
librbd: diff iterate with fast-diff now correctly includes parent
When whole-object and include-parent options are enabled, the
diff will now include the parent image diffs. Previously, the
parent image diffs were not included when fast-diff was enabled
but was included when fast-diff was disabled.
Fixes: https://tracker.ceph.com/issues/42248 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
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.
Jason Dillaman [Sat, 21 Dec 2019 20:27:45 +0000 (15:27 -0500)]
rbd-mirror: consolidate prepare local/remote image steps to bootstrap
Now that the bootstrap state machine is simplier, it makes it cleaner to
move the prepare steps into the bootstrap state machine. Once snapshot
mirror support is added, these prepare state can be swapped out depending
on the mirroring type.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
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'.