Kefu Chai [Wed, 12 Feb 2020 08:12:38 +0000 (16:12 +0800)]
crimson/common: correct type of callback func
`md_config_obs_t` is defined as
```
using md_config_obs_t = ceph::md_config_obs_impl<ConfigProxy>;
```
in `common/config_obs.h`. it takes advantage of a fact that
somebody exposes the correct version of `ConfigProxy` to the global
namespace. this is intended to fulfill the needs of other components
which expects `md_config_obs_t`. otherwise we need to specify
`ceph::md_config_obs_impl<ceph::ConfigProxy>` or
`ceph::md_config_obs_impl<crimson::common::ConfigProxy>` depending on
if we are programming crimson or not.
but in this case, we are actually defining
`crimson::common::ConfigProxy`, so it'd be better to define
`md_config_obs_t` explicitly instead relying on "somebody" which exposes
`ConfigProxy`. and `ConfigObserver` is defined using the current
`ConfigProxy`, so it's more correct and more readable than using
`md_config_obs_t` defined in `common/config_obs.h`.
Kefu Chai [Wed, 12 Feb 2020 08:05:14 +0000 (16:05 +0800)]
cmake: disable concepts in boost::asio
GCC-10 and Clang choke when compiling a concept constrained with
its template parameter, which is in turn another concept. as a
workaround of the bug of boost::asio, we should disable concepts
support in it. but it's nice to enable it when the compiler is
able to use concepts to do some compile time checkings even the
concepts are not compliant to C++20.
Sage Weil [Tue, 11 Feb 2020 16:42:46 +0000 (10:42 -0600)]
Merge PR #33189 into master
* refs/pull/33189/head:
mgr/cephadm: fix redeploy (etc) of crash containers
cephadm: do not use special unit, naming for crash agent
cephadm: 'crash' is a ceph daemon
Reviewed-by: Michael Fritch <mfritch@suse.com> Reviewed-by: Sebastian Wagner <swagner@suse.com>
Sage Weil [Tue, 11 Feb 2020 14:28:43 +0000 (08:28 -0600)]
Merge PR #33027 into master
* refs/pull/33027/head:
os/bluestore/BlueFS: reclaim unused too-granular extents first
os/bluestore/BlueFS: track bluefs owned extents that are too granular
os/bluestore/BlueFS: verify that fnodes respect the bluefs alloc_size
os/bluestore/BlueFS: align bluefs' owned extents to alloc_size
Reviewed-by: Neha Ojha <nojha@redhat.com> Reviewed-by: Igor Fedotov <ifedotov@suse.com>
Kefu Chai [Tue, 11 Feb 2020 09:57:42 +0000 (17:57 +0800)]
crimson/common: more friendly to seastar::do_with()
so we don't need to do the box-unbox dance when callng
seastar::do_with() with multiple with'ed variables and
a continuation which returns `errator<...>::future`.
Sage Weil [Mon, 10 Feb 2020 16:05:29 +0000 (10:05 -0600)]
cephadm: do not use special unit, naming for crash agent
Use the normal unit file, with crash.$hostname as the name. This makes
the crash agent behave like all of the other services instead of being
special. The exception is that the crash agent is still implicitly
deployed alongside other containers.
Kefu Chai [Mon, 10 Feb 2020 15:30:34 +0000 (23:30 +0800)]
pybind/mgr: bump six to 1.14
otherwise some packages which uses six.ensure_text will fail, as it
was introduced by 1.12. and 1.14 is the latest stable version of
six. so let's use it instead.
Jason Dillaman [Mon, 10 Feb 2020 15:16:59 +0000 (10:16 -0500)]
test/pybind: fix expectations for mirror snapshots
When snapshot-based mirroring is enabled, the primary image
should always have at least one mirror-based snapshot to help
distinguish it from an incomplete non-primary image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Kefu Chai [Mon, 10 Feb 2020 14:06:24 +0000 (22:06 +0800)]
pybind: check arguments also when searching for "clang"
if "ccache" is used, compiler[0] would be "ccache", and compiler[1]
would be "clang", in this case, we should search for "clang" until
an argument starting with "-" is found. it signals be the first
cflag passed to the compiler.
Kefu Chai [Mon, 10 Feb 2020 11:13:47 +0000 (19:13 +0800)]
pybind: customize compiler before checking cflags
otherwise we are always looking at the default compiler on 'unix' --
'cc'. and will fail to filter cflags not supported by clang, if we
are compiling the python bindings using clang.
Kefu Chai [Mon, 10 Feb 2020 08:27:22 +0000 (16:27 +0800)]
ceph-monstore-tool: rename mon-ids in initial monmap
when ceph-mon starts, it checks to see if it's listed in the monmap, if
not it complains
```
no public_addr or public_network specified, and mon.a not present in
monmap or ceph.conf.
```
then bails out. normally, the monitor will try to rename its name in
monmap when performing "mkfs", but in our case, we are merely using the
"mkfs" monmap for passing the monmap built by ceph-monstore-tools, and
we don't actually go through the "mkfs" process. so, ceph-mon won't
rename when booting up.
in this change, user is allowed to specify the mon-ids in command line
when rebuilding mondb, the default mon-ids would be a,b,c,... if not
specified.
Josh Durgin [Sat, 1 Feb 2020 19:00:24 +0000 (14:00 -0500)]
mgr/pg_autoscaler: correct and simplify progress tracking
Reset the progress each time we make an adjustment, and track progress
from that initial state to that new target. Previously we were also
using the wrong target: the current pg_num_target, not the new value
(pg_num_final) that we set.
Look up the pool by name, not id, in _maybe_adjust(), since that is how it is
retrieved by osdmap.get_pools_by_name().
Dedupe some logic into PgAdjustmentProgress to simplify things.
Sage Weil [Sun, 9 Feb 2020 19:55:27 +0000 (13:55 -0600)]
Merge PR #33133 into master
* refs/pull/33133/head:
qa/workunits/cephadm/test_cephadm.sh: make monitoring tests faster
qa/workunits/cephadm/test_cephadm: 2 OSDs is enough
cephadm: disable node-exporter cpu/memory limits for the time being
Sage Weil [Sun, 9 Feb 2020 15:40:10 +0000 (09:40 -0600)]
Merge PR #33117 into master
* refs/pull/33117/head:
qa/suites/upgrade/nautilus-x-singleton: ensure hit sets behave across upgrade
osd/PrimaryLogPG: use legacy timestamp rendering for hit_set objects
include/utime: allow legacy rendering of timestamp
* refs/pull/32816/head:
mds: check inode type when deciding if filelock should be in EXCL state
mds: don't delegate inos when handling replayed requests
mds: process re-sent async dir operations at clientreplay stage
mds: consider async dirops when checking directory empty
mds: always suppress issuing caps in Locker::issue_new_caps()
mds: try reconnect cap only when replayed request creates new inode
mds: set cap id to 1 for newly created inode
Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Sage Weil [Sun, 9 Feb 2020 00:21:05 +0000 (18:21 -0600)]
cephadm: KillMode=none in unit file
The unit already has a ExecStop command that runs 'podman|docker stop',
so systemd should not *also* try to kill the process or else it may
screw up the container state
From https://www.redhat.com/sysadmin/podman-shareable-systemd-services
"Note: It’s important to set the kill mode to none. Otherwise, systemd
will start competing with Podman to stop and kill the container processes.
which can lead to various undesired side effects and invalid states."
Hopefully-fixes: https://tracker.ceph.com/issues/43883 Signed-off-by: Sage Weil <sage@redhat.com>