Aashish Sharma [Tue, 7 Nov 2023 13:27:24 +0000 (18:57 +0530)]
mgr/dashboard: fix rgw multi-site import form helper
Before : To obtain the token, generate it from your primary Ceph cluster. This token includes encoded information about the secondary cluster's endpoint, access key, and secret key.
Fix: To obtain the token, generate it from your primary Ceph cluster. This token includes encoded information about the primary cluster's endpoint, access key, and secret key.
Matt Benjamin [Mon, 6 Nov 2023 20:11:58 +0000 (15:11 -0500)]
rgwlc: fix delete marker regression in currentversion lc expiration
Fixes a regression introduced in https://github.com/ceph/ceph/pull/50680,
which attempted to re-use an already created sal object handle as
an optimiztion. This change suppressed creation of delete markers in
current version expiration when buckets are versioned.
Fixes: https://tracker.ceph.com/issues/63458 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Casey Bodley [Mon, 6 Nov 2023 16:19:44 +0000 (11:19 -0500)]
common: admin socket catches exception by reference
probably not a real bug, but resolves a compiler warning:
src/common/admin_socket.cc: In member function ‘int RaiseHook::parse_signal(std::string&&, ceph::Formatter*, std::ostream&)’:
src/common/admin_socket.cc:869:21: warning: catching polymorphic type ‘class std::invalid_argument’ by value [-Wcatch-value=]
869 | } catch (std::invalid_argument) {
| ^~~~~~~~~~~~~~~~
John Mulligan [Sat, 21 Oct 2023 16:05:43 +0000 (12:05 -0400)]
cephadm: move logic to build pull command to container engines
Move the logic needed to build a pull command to a function in the
container_engines.py file. This continues the effort to improve the
locality of items with regards to specific options for container
engines. I had thought to move the whole pull function but the logging
and retry code made me change my mind. We can always move it later if it
makes sense.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sat, 21 Oct 2023 15:41:15 +0000 (11:41 -0400)]
cephadm: move option for setting unlimited pids into engine classes
Move the option for setting unlimited pids for the container engine
into the container engine classes. This continues the attempts to
improve the locality of items specific to certain classes to be
by making them part of the classes.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Fri, 20 Oct 2023 14:52:56 +0000 (10:52 -0400)]
cephadm: move daemon args assignment to a variable
Move the call to _get_daemon_args out of the function call.
This will aid with the next refactoring steps, were the content
of _get_daemon_args will be lifted into get_container.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Fri, 20 Oct 2023 14:30:16 +0000 (10:30 -0400)]
cephadm: ensure entrypoint is assigned a string
Ensure that the entrypoint variable is assigned a string. The
custom container class can have None and that can confuse future
refactoring.
The mypy command we're using does not notice this.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 19 Oct 2023 20:25:17 +0000 (16:25 -0400)]
cephadm: make get_daemon_args private
The get_daemon_args function now only has one caller. To double check
that and to prepare for this function's eventual removal we prefix the
name with an underscore to take it private.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 19 Oct 2023 20:22:37 +0000 (16:22 -0400)]
cephadm: use ceph specific get_daemon_args calls
Use the new Ceph class specific get_daemon_args method instead of the
generic get_daemon_args calls that check all sorts of daemon types when
we're running specialized mon containers, which we know for certain are
ceph based.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 19 Oct 2023 18:48:17 +0000 (14:48 -0400)]
cephadm: consolidate if-blocks in get_container function
Instead of having a number of separate if-statement blocks try to
reduce the number of sections so that you can look at one block
and see what the function is doing for that daemon type.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 19 Oct 2023 18:28:46 +0000 (14:28 -0400)]
cephadm: move all pids-limit logic to renamed function
Repurpose set_pids_limit_unlimited as _update_pids_limit, moving the
logic to decide if the daemon should have unlimited pids into the
function. This was the only caller of set_pids_limit_unlimited.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 19 Oct 2023 18:22:49 +0000 (14:22 -0400)]
cephadm: remove get_deployment_container
Remove get_deployment_container replacing all calls to it with calls to
to_deployment_container. Now, callers can inject modifications to the
container object between calls or even have to_deployment_container
update container objects that were constructed in some other way.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 19 Oct 2023 20:33:57 +0000 (16:33 -0400)]
cephadm: fix mistaken call to get_container_mounts_for_type
When this function was refactored two variants were created:
get_container_mounts_for_type and _get_container_mounts_for_type. The
latter doesn't append podman specific mounts so that it can be called
from other functions that do append podman specific mounts.
Unfortunately, I didn't call the correct function from
get_container_mounts and therefore it was redundantly doing the podman
mounts update. This corrects that error.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add Jinja2 and MarkupSafe dependencies to a requirements.txt style file.
This file tracks the dependencies needed to run the cephadm libs
in the unit test framework. The actual dependencies that get added
to the ziapp are managed by build.py but mirrored here.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Mon, 17 Jul 2023 13:24:14 +0000 (09:24 -0400)]
cephadm: add more thorough test coverage to unit file generation
Add tests that check the generation of the standard systemd unit
for cephadm services. This test ensures that non trivial changes
to the content of these files are noticed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Adam King [Tue, 10 Oct 2023 18:00:27 +0000 (14:00 -0400)]
cephadm: remove --cleanup-on-failure flag
As discussed in the orch weekly, instead of having the
two flags, we'll just have the --no-cleanup-on-failure
flag on its own. This commit does not change the behavior
at all. It will still do the cleanup if --no-cleanup-on-failure
is not provided and not do the cleanup if it was. This just
removes the additional flag.
John Mulligan [Wed, 1 Nov 2023 22:14:34 +0000 (18:14 -0400)]
cephadm: add tests for build.py script
Add tests that cover the four main distros that ceph is built on (in
the ceph infra). These tests should not be run by automation as they
are slow and have special requirements like a working podman.
Instead, these are provided to be run by a dev when build.py is updated.
Signed-off-by: John Mulligan <jmulligan@redhat.com>