Ilya Dryomov [Sat, 18 Jun 2022 11:00:34 +0000 (13:00 +0200)]
rbd-mirror: fix up PrepareReplayDisconnected test case
It was botched in commit 2bca9ee96c65 ("rbd-mirror: consolidate
prepare local/remote image steps to bootstrap") and went unnoticed
because currently no special handling is needed for disconnected
clients -- is_disconnected() check happens to be the last step
and it doesn't generate an error.
Ilya Dryomov [Mon, 20 Jun 2022 12:19:41 +0000 (14:19 +0200)]
rbd-mirror: generally skip replay/resync if remote image is not primary
Replay and resync should generally be skipped if the remote image is
not primary.
If this is not done for replay, snapshot-based mirroring can run into
a livelock if the primary image is demoted while a mirror snapshot is
being synced. On the demote site, rbd-mirror would pick up the just
demoted image, grab the exclusive lock on it and idle waiting for a new
mirror snapshot to be created. On the (still) non-primary site,
rbd-mirror would eventually finish syncing that mirror snapshot and
attempt to unlink from it on the demote site. These attempts would
fail with EROFS due to exclusive lock being held in the "refuse proxied
maintenance operations" mode, blocking forward progress (syncing of the
demotion snapshot so that the non-primary image can be orderly promoted
to primary, etc).
If this is not done for resync, data loss can ensue as the just demoted
image would be immediately trashed, underneath the non-primary site that
is still syncing.
Currently this is done in PrepareReplayRequest only for journal-based
mirroring. Note that it is conditional: if the local image is linked
to the remote image, proceeding is desirable.
Generalize this check, consolidate it with a related check in
PrepareRemoteImageRequest and move the result to BootstrapRequest to
cover both "local image does not exist" and "local image is unlinked"
cases for both modes.
Ilya Dryomov [Sat, 18 Jun 2022 10:35:51 +0000 (12:35 +0200)]
rbd-mirror: strengthen is_local_primary() and is_linked()
Initialize local_promotion_state and remote_promotion_state to UNKNOWN
instead of counterintuitive PRIMARY and NON_PRIMARY -- half the time the
final values are flipped. Then is_local_primary() and is_linked() can
be strengthened as a non-existent image should stay in UNKNOWN.
Xiubo Li [Wed, 6 Apr 2022 00:12:26 +0000 (08:12 +0800)]
ceph-fuse: add dedicated snap stag map for each directory
This will fix the fino colliding bug, which is caused when the
snapid is later than 0xffff.
From mds 'mds_max_snaps_per_dir' option, we can see that the max
snapshots for each directory is 4_K, and in ceph-fuse we have
around 64_K, which is from 0xffff - 2, stags could be used to make
the fake fuse inode numbers for each directory.
Fixes: https://tracker.ceph.com/issues/54653 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Xiubo Li [Thu, 24 Mar 2022 02:01:57 +0000 (10:01 +0800)]
ceph-fuse: return EINVAL if get invalid fino instead of assert
All the snap ids of the finos returned to libfuse from libcephfs
will be recorded in the map of 'stag_snap_map', and will never be
erased before unmounting. So if libfuse passes invalid fino the
ceph-fuse should return EINVAL errno instead of crash itself.
Fixes: https://tracker.ceph.com/issues/54653 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Xiubo Li [Wed, 23 Mar 2022 02:05:32 +0000 (10:05 +0800)]
mds-client: make the fake inos option unchangeable in runtime
If the flags is empty then in option.h in can_update_at_runtime()
it will return true. That means this opetion could be changed in
runtime, which is buggy. Because if this is false, ceph-fuse will
use its own fake inos instead of libcephfs'. If this is changed
during runtime, we will hit inos dosn't exist assert bugs.
Fixes: https://tracker.ceph.com/issues/54653 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Zac Dover [Mon, 13 Jun 2022 21:48:46 +0000 (07:48 +1000)]
doc/dev: s/master/main/ essentials.rst dev guide
This PR changes all reference to the "master" branch
to references to the "main" branch (because we renamed
"master" to main", and the docs now need to reflect that).
Nizamudeen A [Wed, 1 Jun 2022 07:40:14 +0000 (13:10 +0530)]
mgr/dashboard: fix drain e2e failure
Cypress sometimes fail to register the click and that causes the
deselect/select to not happen properly. Deselecting the row immediately
after performing the action makes it pass from cypress.
Fixes: https://tracker.ceph.com/issues/55741 Signed-off-by: Nizamudeen A <nia@redhat.com>
Omri Zeneva [Mon, 23 May 2022 15:50:05 +0000 (11:50 -0400)]
test: add unit tests
- added trace initialization
- opentelemetry linking when needed
- conditional ASSERT on SetBadAttribute, when we don't have opentelemetry (tracing sdk), we expect different result from the execute function.
Omri Zeneva [Wed, 11 May 2022 13:39:49 +0000 (09:39 -0400)]
rgw: add functionality of SetAttribute and AddEvent method in postRequest context
opentelemetry supports mainly string, int64, double and boolean for values of trace's Attributes,
so we should validate those types and static cast to the proper type, which is different than Lua types
SetAttribute Closure will be returned to lua only if the request's trace is real and not noop span or even null like what happens in preRequest Context
AddEvent method comes to give us the ability to record an event. the event can be a single string that represents the event, or event name and key-value pairs.
Zac Dover [Mon, 13 Jun 2022 04:34:36 +0000 (14:34 +1000)]
doc/start: rewrite hardware-recs networks section
This rewrites the first two-thirds of the "Networks"
section of the Hardware Recommendations page in the
Intro to Ceph document. I have tried to divide the
techincal content in this section into subsections
that foreground the various subjects covered.
Zac Dover [Wed, 8 Jun 2022 19:19:16 +0000 (05:19 +1000)]
doc/start: make OSD and MDS structures parallel
This PR makes the "Ceph OSDs" and "MDSs" bullet points
parallel by naming "object storage daemon" before referring
to the (admittedly more common and colloquial, but surely
unknown to people who genuinely require a document called
'Intro') acronym "OSD".
Zac Dover [Sun, 12 Jun 2022 23:41:28 +0000 (09:41 +1000)]
doc/start: rewrite CRUSH para
This PR supersedes https://github.com/ceph/ceph/pull/46584
and makes changes suggested by Anthony D'Atri that improve
the coherence and consistency of the paragraph that explains
the basics of the CRUSH algorithm.
We really want to have the ability to know how many
entries `PGLog::IndexedLog::dups` has inside.
The current ways are either invasive (stopping an OSD)
or indirect (examination of `dump_mempools`).
Laura Flores [Thu, 9 Jun 2022 18:55:48 +0000 (18:55 +0000)]
test/librados: modify LibRadosMiscConnectFailure.ConnectFailure to comply with new seconds unit
The unit type for `client_mount_timeout` was changed from "float" to "secs" in 983b10506dc8466a0e47ff0d320d480dd09999ec. To make this test comply with the new
seconds unit change, we need to change the value to an integer, as seconds
does not accept float values.
Fixes: https://tracker.ceph.com/issues/55971 Signed-off-by: Laura Flores <lflores@redhat.com>
Ilya Dryomov [Thu, 9 Jun 2022 11:42:01 +0000 (13:42 +0200)]
cmake: pass -Wno-error when building PMDK
It's hitting pacific with a nuisance -Werror=array-parameter= const
char * vs const char[37] mismatch. Follow commit 91a616b26e83 ("cmake:
pass RTE_DEVEL_BUILD=n when building dpdk") and just disable -Werror.
Tim Serong [Thu, 9 Jun 2022 05:20:10 +0000 (15:20 +1000)]
ceph.spec.in: turn jaeger off by default for SUSE distros
Building with jaeger by default pulls in opentelemetry, and
cmake/modules/BuildOpentelemetry.cmake tries to go get
https://github.com/ideepika/opentelemetry-cpp.git at build
time, which doesn't work on SUSE's build service (no internet
access at build time). Also, since WITH_JAEGER now defaults
to ON in CMakeLists.txt, we need to flip the logic when
setting -DWITH_JAEGER.
Fixes: 644c99826d73174e6609aa24b7297443358488b1 Fixes: 7be8be63501ba03da9b705238a9d3d3a518969ab Signed-off-by: Tim Serong <tserong@suse.com>
David Galloway [Wed, 8 Jun 2022 20:13:29 +0000 (16:13 -0400)]
schedule_subset.sh: Default to ceph.git
https://github.com/ceph/teuthology/pull/999 never got overridden in ceph.git. We've been using a years-old checkout of teuthology for the `teuthology` user.
With the master->main change, that checkout needed to go. Then when trying to schedule new nightlies, teuthology-suite was defaulting to ceph-ci.git which either has very old versions of the release branches (octopus, pacific, etc.) or they don't exist at all.
Signed-off-by: David Galloway <dgallowa@redhat.com>
Rishabh Dave [Mon, 30 May 2022 05:09:42 +0000 (10:39 +0530)]
doc/dev: move option -R to a different section of doc
It's incorrect to pass option "-R fail" to the teuthology-suite command
meant for triggering tests for first time. teuthology-suite command will
fail if "-R" is passed without "-r". Therefore, move this option and its
description from the section meant for triggering tests for first time
to the section dedicated to re-running of tests.