Samuel Just [Wed, 17 Jun 2020 18:46:26 +0000 (11:46 -0700)]
crimson/os/seastore: embed the root pointers directly in the root delta
Previously, I set it up so that there was a "magic" ROOT_LOCATION delta
associated with no block type which would point at the root block. As
long as replaying the journal yielded at least one of those, we'd
therefore be able to find the most recent root block. However, in
practice, the entire root block is unlikely to ever weigh in at more
than 100 bytes or so. Thus, this patch does a few things:
- ROOT_LOCATION deltas are removed
- ROOT deltas contain an encoding of the entire root block
- ROOT blocks are never actually written down except in these deltas
- ROOT blocks do not have a physical address
- ROOT blocks never show up in the transaction fresh or mutated lists
nor do they show up in the cache extent set or dirty list
This adds a little bit of special handling, but the root was already
special due to a need for cache interface users to discover it without
knowing the physical address.
Previously, it appears that I meant for the caller to insert to
invoke duplicate_for_write prior to calling insert(). I think
I chose that convention to avoid chained callbacks within a method
not on *this. However, there are two scenarios where this is
necessary: leaf and split/merge. The split/merge criteria are a
little involved and were only buggily considered.
This patch moves responsibilty for duplicate_for_write on *this
into insert/update. Callers should assume that the callee will
handle it, and should not assume that they can call back into the
same node.
Samuel Just [Thu, 11 Jun 2020 21:02:08 +0000 (14:02 -0700)]
crimson/os/seatore/cache: add get_extent_by_type
For now, just have a single static mechanism for resolving concrete
extent types. If this becomes unwieldy, we can let users register
handlers with cache/transaction_manager.
Samuel Just [Thu, 11 Jun 2020 18:53:56 +0000 (11:53 -0700)]
src/test/crimson: unify the two TestBlock implemenations
cache.cc is going to need a way to generate an appopriately
typed extent from a delta or on disk block based on the
type tag. Thus, there can only be one TestBlock for now
unless it becomes at some point worth making it dynamic.
Jeff Layton [Wed, 17 Jun 2020 16:11:51 +0000 (12:11 -0400)]
vstart: handle multiple ganesha's more sanely
Currently, if you have more than one ganesha daemon, it clobbers the
log, config and pidfiles from the previous daemons. Give them each
their own files.
While we're in here, move the log and pidfile to the out/ directory
with all of the other logfiles/pidfiles.
Fixes: https://tracker.ceph.com/issues/46079 Signed-off-by: Jeff Layton <jlayton@redhat.com>
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']