Rishabh Dave [Wed, 6 Sep 2023 22:16:39 +0000 (03:46 +0530)]
mon/FSCommands: fix variable names and function names in calls
PR #51942 today and PR #52409 was merged last week. Latter PR changed
"fs" to "fsp" and made mds_map and fscid private and introduced
get_mds_map() and get_fsicd() methods instead.
Combination of former and latter PR introduced compilation errors & made
it impossible to build the binaries on the latest main branch. This
commit attemps to fix this issue.
Fixes: https://tracker.ceph.com/issues/62729 Signed-off-by: Rishabh Dave <ridave@redhat.com>
The Windows build script uses static linking by default, the
reason being that some tests were failing to build otherwise,
mostly due to unspecified dependencies.
Now that the issue was addressed, we can enable dynamic linking
by default.
Worth mentioning that the Ceph MSI build script already uses
dynamic linking.
While at it, we'll drop some duplicate defaults from
"win32_deps_build.sh". For better clarity, we'll avoid exporting
some "win32_build.sh" variables, instead passing them explicitly
to "win32_deps_build.sh".
doc/man: remove docs about support for unix domain sockets
doc/man: support for unix domain sockets is not implemented, hence we
removed documentation about it.
(Note: the changes in this commit were the work of Rok Jaklič in
https://github.com/ceph/ceph/pull/48537. This pull request has been
raised because that pull request was for some mysterious reason causing
merge conflicts that were never resolved.)
Co-authored-by: Rok Jaklič rjaklic@gmail.com Signed-off-by: Zac Dover <zac.dover@proton.me>
Or Ozeri [Thu, 25 Nov 2021 19:03:02 +0000 (21:03 +0200)]
librbd: remove remap_to_* and image crypto layer
This commit removes the crypto image dispatch layer.
Instead, data offset calculation is taken from ImageCtx->encryption_format.
This change makes the remap_to_* api unnecessary, so it is removed.
Nizamudeen A [Wed, 30 Aug 2023 05:20:30 +0000 (10:50 +0530)]
mgr/dashboard: remove green tick on old password field
a green tick is showing to the field where we enter the old password in
login password change form. It starts showing green tick as soon as we
start typing on it. Removing that because its misleads the user.
Fixes: https://tracker.ceph.com/issues/62644 Signed-off-by: Nizamudeen A <nia@redhat.com>
Ali Masarwa [Mon, 4 Sep 2023 12:25:44 +0000 (15:25 +0300)]
Merge pull request #52964 from AliMasarweh/wip-alimasa-persistant-q-enhance
RGW: added a per topic configuration to control the notification persistency
Adding the configuration of persistency per topic that will override the global settings
qa: add "failover / failback loop" test for rbd-mirror
For snapshot-based mirroring, check that demote (or other mirror
snapshots) don't pile up. Nothing in particular to assert on for
journal-based mirroring but the test is still useful.
Ilya Dryomov [Sat, 26 Aug 2023 11:04:52 +0000 (13:04 +0200)]
librbd: make CreatePrimaryRequest remove any unlinked mirror snapshots
After commit ac552c9b4d65 ("librbd: localize snap_remove op for mirror
snapshots"), rbd-mirror daemon no longer removes mirror snapshots when
it's done syncing them -- instead it only unlinks from them. However,
CreatePrimaryRequest state machine was not adjusted to compensate and
hence two cases were missed:
- primary demotion snapshot (rbd-mirror daemon unlinks from primary
demotion snapshots just like it does from regular primary snapshots);
this comes up when an image is demoted but then promoted on the same
cluster
- non-primary demotion snapshot (unlike regular non-primary snapshots,
non-primary demotion snapshots store peer uuids and rbd-mirror daemon
does unlinking just like in the case of primary snapshots); this
comes up when an image is demoted and promoted on the other cluster
Related is the case of orphan snapshots. Since they are dummy to begin
with, CreatePrimaryRequest would now clean up the orphan snapshot after
the creation of the force promote snapshot.
Fixes: https://tracker.ceph.com/issues/61707 Co-authored-by: Christopher Hoffman <choffman@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Ilya Dryomov [Tue, 22 Aug 2023 15:27:50 +0000 (17:27 +0200)]
librbd: don't attempt to remove image state on orphan snapshots
Despite being mirror snapshots, orphan snapshots don't have image
state: see CreateNonPrimaryRequest::write_image_state() for a similar
is_orphan() check. Attempting to remove image state generates bogus
"failed to read image state object" and "failed to remove image state"
errors.
Adam Kupczyk [Fri, 11 Aug 2023 14:24:57 +0000 (14:24 +0000)]
tools/variable_load: Add generator of variable workload
The tool is dedicated to create highly variable workloads.
The intended audience is
1) scraper testing - tool to sniff on OSD ops
2) CoDel testing - bandwidth/latency optimization algorithm in BS
Initial commit.
John Mulligan [Thu, 17 Aug 2023 19:11:57 +0000 (15:11 -0400)]
cephadm: black format net_utils.py
This contains one small manual change reversing the black formatting.
According to the black docs [1], flake8's E203 is not pep8 compliant but
since flake8 is currently mandatory and black formatting is not we'll
leave it in a form that makes flake8 happy and attempt to resolve the
disagreement some time in the future.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Pair-programmed-with: Adam King <adking@redhat.com> Co-authored-by: Adam King <adking@redhat.com> Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 16 Aug 2023 20:44:55 +0000 (16:44 -0400)]
cephadm: black format file_utils.py
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Pair-programmed-with: Adam King <adking@redhat.com> Co-authored-by: Adam King <adking@redhat.com>
Pair-programmed-with: Adam King <adking@redhat.com> Co-authored-by: Adam King <adking@redhat.com>
John Mulligan [Wed, 16 Aug 2023 19:23:42 +0000 (15:23 -0400)]
cephadm: move command call functions to call_wrappers.py
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Pair-programmed-with: Adam King <adking@redhat.com> Co-authored-by: Adam King <adking@redhat.com> Signed-off-by: John Mulligan <jmulligan@redhat.com>
Boost stacktrace defines a few UUIDs that were recently added
to mingw as well [1], causing compilation errors [2]:
In file included from libs/stacktrace/build/../src/windbg.cpp:9:
./boost/stacktrace/detail/frame_msvc.ipp:31:5: error: redefinition of
'__mingw_uuidof_s<IDebugClient>'
__CRT_UUID_DECL(IDebugClient,0x27fe5639,...
We'll apply a fix that hasn't merged upsteam yet [3].
John Mulligan [Thu, 10 Aug 2023 13:46:27 +0000 (09:46 -0400)]
cephadm: prepare for using black code formatting for cephadmlib
Currently this is not checked/required but we'd like to use a consistent
formatting tool for the new files in cephadmlib. This let's us do so
incrementally.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Pair-programmed-with: Adam King <adking@redhat.com> Co-authored-by: Adam King <adking@redhat.com>
Lucian Petrut [Wed, 23 Aug 2023 14:21:12 +0000 (14:21 +0000)]
cmake: fix mingw-llvm shared linking
mingw-llvm can't handle the '--exclude-libs' linker flag, so
we'll have to skip it.
At the same time, cmake can't locate the boost shared libs as the
import libs are not generated when using mingw-llvm due to boost's
clang-linux.jam file. For now, we'll patch the cmake files, using
the dlls as import libs (which is allowed by mingw).
While at it, we'll avoid linking the static AND dynamic boost libs,
speeding the build.
Lucian Petrut [Mon, 8 May 2023 12:47:42 +0000 (12:47 +0000)]
common: use signedspan for monotonic ceph clocks
The monotonic clocks are commonly used for measuring time deltas,
which can be negative.
ceph::mono_clock and ceph::coarse_mono_clock currently use
unsigned duration types [1]. The difference operators are overloaded
in order to ensure that the result is signed [2][3].
However, we still have issues when unsigned timespans are compared.
For example, std::condition::wait_for can hang indefinitely due
to underflows [4][5]. It ends up using our unsigned type for a
negative timespan, which is then compared to
std::chrono::duration<Rep,Period>::zero.
In order to avoid such problems, we'll simply use a signed type
for monotonic clock durations.
With signed timespans, we can no longer assume that time_point::zero()
is equal to time_point::min(), so we're updating it accodingly.
Lucian Petrut [Thu, 4 May 2023 13:16:56 +0000 (13:16 +0000)]
test: add timer loop tests
We've been experiencing timer hangs with mingw-llvm.
std::condition_variable::wait_for was returning a few microseconds
before the requested time and then hanging when called with a
small interval (e.g. microseconds).
This was affecting the OSD periodic tick, which would hang after
a while (20m up to 2h).
The issue can be reproduced with a timer loop and a small interval
(e.g. 40us), in which case the timer is likely to hang after about
10s.
We're adding some tests, while the actual mingw-llvm issue will
be mitigated in a separate commit.
winpthreads is a library that emulates the pthreads API using
Windows primitives. It's also used by the mingw/gcc libstdc++
for std::thread.
The issue is that winpthreads isn't well maintained. There
have been numerous bugs that haven't been addressed in years.
Specifically, we've been hitting deadlocks because of the
winpthreads rw lock implementation.
This change will allow building Ceph for Windows using mingw/llvm,
which uses libc++ and doesn't rely on winpthreads.
We're checking a permission denied exception message that's
runtime specific:
/mnt/data/workspace/ceph_mingw_clang/src/test/dokan/dokan.cc:252: Failure
Expected equality of these values:
e.what()
Which is: "filesystem error: in remove: Permission denied
[\"Z:\\ro_success_b76223c4-c590-45e0-ab78-4d281ac512b5\"]"
exception_msg.c_str()
Which is: "filesystem error: cannot remove: No such device
[Z:\\ro_success_b76223c4-c590-45e0-ab78-4d281ac512b5]"
In order to support libc++, we'll drop the exception message
assertion and rely on the exception type.