Kefu Chai [Wed, 17 Jun 2020 23:08:06 +0000 (07:08 +0800)]
cmake: use add_compile_options()
instead of appending compile flags to CMAKE_C_FLAGS, use
add_compile_options(), as COMPILE_OPTIONS is a list, it'd simpler to
append options to it and to access it in a structured way.
Kefu Chai [Thu, 18 Jun 2020 08:33:54 +0000 (16:33 +0800)]
cmake: use string(APPEND...) for appending cflags
* use string(APPEND...) for less repeatings
* `-rdynamic` is a linker option, so it should be added to
`CMAKE_EXE_LINKER_FLAGS` for adding symbols to dynamic
symbol tables so they can be consumed by plugins.
Kiefer Chang [Thu, 18 Jun 2020 07:42:50 +0000 (15:42 +0800)]
stop.sh: do not block script when there is no running cluster
A query for current fsid is called inside `do_killcephadm`. This blocks
the script when there is no running cluster. The fix avoids entering the
function if cephadm command fails or returns no daemons.
The change also hides the following output for non-cephadm environments:
```
Unable to locate any of ['podman', 'docker']
```
Xuehan Xu [Mon, 8 Jun 2020 06:41:06 +0000 (14:41 +0800)]
crimson: do not assert in start_backfill_ops
osd_recovery_max_single_start is not necessarily used up in start_recovery_ops, and
start_backfill_ops could be invoked even there's no need to backfill, so do not assert
here, just return.
Jason Dillaman [Tue, 16 Jun 2020 14:33:32 +0000 (10:33 -0400)]
mgr/prometheus: automatically discover RBD pools for stats gathering
To simplify configuration, the existing 'rbd_stats_pools' config option
now accepts '*' as a wildcard for the pool and/or namespace portion of
the <pool>[/<namespace>] spec.
Fixes: https://tracker.ceph.com/issues/46034 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Rishabh Dave [Tue, 26 May 2020 12:00:03 +0000 (17:30 +0530)]
test_cephfs_shell: run cephfs-shell with conf file
And set colors to False and debug to True in this conf file.
stdout captured by Python code in this testsuite can contain the colour
codes along with the expected string output. Setting colors to False in
cephfs-shell.conf should fix this.
Setting debug to False should help with analyzing test failures since
it enables printing messages that helps debugging (stacktrace for
cephfs-shell code, for example).
Kefu Chai [Wed, 17 Jun 2020 08:00:23 +0000 (16:00 +0800)]
install-deps.sh: do not enable unavailable repos
should be specific when enabling codeready-builder repos, there is
chance that some repos are just not available, while the required one
is. for instance, "codeready-builder-for-rhel-8-x86_64-eus-debug-rpms"
might not be available. and in that case, `install-deps.sh` just fails.
so in this change, only the required one is enabled. see also
https://fedoraproject.org/wiki/EPEL
Xiubo Li [Wed, 17 Jun 2020 02:59:22 +0000 (22:59 -0400)]
cephfs_features: add metric collection feature support
In client side we need to known whether mds support the metric
collection or not, or when mds server receieves the metric message
from client side and if it couldn't recognise, the mgr will close
the socket connection directly.
Fixes: https://tracker.ceph.com/issues/46041 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Patrick Donnelly [Wed, 17 Jun 2020 02:26:52 +0000 (19:26 -0700)]
Merge PR #32288 into master
* refs/pull/32288/head:
test_cephfs_shell: remove test_every_shell_cmd_at_invocation
test_cephfs_shell: catch specific exception instead of catching all
cephfs-shell: set return value before exiting
test_cephfs_shell: re-arrange TestCephFSShell's methods
cephfs-shell: re-arrange code under __main__
test_cephfs_shell: add new test for shell cmd at invocation
cephfs-shell: launch shell only if there are no args following
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Varsha Rao <varao@redhat.com>
xie xingguo [Sat, 13 Jun 2020 07:28:31 +0000 (15:28 +0800)]
osd/PeeringState: fix history.same_interval_since of merge target again
The symptom looks much like we see in
https://tracker.ceph.com/issues/37654.
The root cause is that both merge source and target could be
fabricated PGs (aka placeholders), hence merge target's
same_interval_since could remain 0 after merge.
Fix by adjusting history.same_interval_since to last_epoch_clean
reported by these PGs were found to be ready for merge.
This peer is going to be ignored/purged by primary anyway later
when peering is done.
Michael Fritch [Mon, 15 Jun 2020 21:22:08 +0000 (15:22 -0600)]
cephadm: sort the list of inferred fsids
$ cephadm shell
ERROR: Cannot infer an fsid, one must be specified: ['1d5df33f-eb94-4a4f-b192-1d5e770ed0e7', 'unknown']
$ cephadm shell
ERROR: Cannot infer an fsid, one must be specified: ['unknown', '1d5df33f-eb94-4a4f-b192-1d5e770ed0e7']
Instead of printing out a traceback if adding the host fails
during bootstrapping process, should now print error message
telling user host failed to be added
Fixes: https://tracker.ceph.com/issues/45097 Signed-off-by: Adam King <adking@redhat.com>
Kefu Chai [Sun, 14 Jun 2020 13:47:28 +0000 (21:47 +0800)]
crimson/os: disable alienized bluestore if using seastar allocator
before figuring out how to colocate alien store and seastar's builtin
allocator. we need to disable alienized bluestore, if
SEASTAR_DEFAULT_ALLOCATOR is not defined.
xie xingguo [Sat, 13 Jun 2020 07:41:04 +0000 (15:41 +0800)]
osd/PeeringState: fix info.stats.up[acting] of splitting child
In general a splitting child should have the same CRUSH
mapping result with its parent at the initialization stage.
However, since luminous mgr/balancer may change existing PGs'
original CRUSH mappings by explictly generating some
pg_upmap_items and feeding them to pg_to_up_acting_osds(),
hence the inconsistency of 'ceph pg ls' command output, i.e.,
because child is now reporting its parent's up set ([2,4,3])
rather than its own ([1,4,3]), which are actually different:
Fix by using child's own CRUSH mappings when filling in
the corresponding fields of info.stats (We already have that
kind of info in hand and it is accurate under all circumstances).
Jason Dillaman [Fri, 12 Jun 2020 02:07:15 +0000 (22:07 -0400)]
rbd-mirror: swapped ThreadPool/ContextWQ for AsioEngine
The majority of usage of ContextWQ has been switched to use the
ASIO ContextWQ adapter class. The journal remains the only
remaining use of dedicated ThreadPools in rbd-mirror.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 11 Jun 2020 22:06:19 +0000 (18:06 -0400)]
librbd: swapped ThreadPool/ContextWQ for AsioEngine
The majority of usage of ContextWQ has been switched to use the
ASIO ContextWQ adapter class. The journal, RWL cache, and image update
notifications remain the only remaining use of dedicated ThreadPools in
librbd.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 11 Jun 2020 19:45:25 +0000 (15:45 -0400)]
librbd: wrapper class for ContextWQ
Numerous state machines in librbd utilize ContextWQ for handling deferred
completion work. Now that we have an ASIO thread pool, we want to remove
the older ThreadPool/WorkQueue implementation. To avoid massive refactoring,
this ContextWQ will mimic the interface of the old ContextWQ class but
utilize ASIO for dispatching.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>