John Mulligan [Tue, 16 May 2023 17:48:58 +0000 (13:48 -0400)]
mgr/cephadm: convert extra_args to daemon_params dict
In serve.py we were creating various command line arguments
(and their values) to pass to cephadm. Now that we support
a single unified JSON-based input we can stop passing
these as CLI parameters and just pass it as a singular
JSONified dict.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 11 May 2023 15:07:53 +0000 (11:07 -0400)]
mgr/cephadm: deploy using deploy-from command
The new `deploy-from` command aims to be a cleaner, clearer way to pass
input to cephadm for service deployment. Make a minimal set of change to
use that new command.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 24 May 2023 18:11:52 +0000 (14:11 -0400)]
mgr/cephadm: allow passing a list as a compound command to _run_cephadm
As we're adding "namespaces" to the cephadm command it's easier to work
with a compound list of terms as the command. This also avoids an issue
where the function call injects args between the command and the "args"
passed to _run_cephadm.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 15 Jun 2023 19:34:15 +0000 (15:34 -0400)]
cephadm: update code to use fetch_custom_config_files
Update the code to use fetch_custom_config_files rather than
get_custom_config_files. Like other fetch_ functions recently added
to cephadm we don't LBYL for checking values on ctx, but rather
call the fetch function on ctx and then check if the result contains
actionable data.
get_custom_config_files gets removed as no remaining callers exist.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 15 Jun 2023 19:34:09 +0000 (15:34 -0400)]
cephadm: add fetch_custom_config_files function
This function works similarly to get_custom_config_files but doesn't
require the use of "ctx.config_json" and will prefer sourcing the
data from `config_blobs`.
This function also returns the list of dicts rather than return a dict
with exactly one key which maps to said list of dicts. There appeared
to be no benefit to that when the call sites of get_custom_config_files
was examined.
This function is `fetch_configs` evil twin.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Fri, 26 May 2023 19:06:40 +0000 (15:06 -0400)]
cephadm: add fetch_tcp_ports function for getting processed ports
The cephadm cli can pass ports as either a string containing space
separated port numbers or, in the newer method, a (JSON) list of ints.
The fetch_tcp_ports function abstracts away the handling of
these input forms.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 11 May 2023 15:05:07 +0000 (11:05 -0400)]
cephadm: add deploy-from command
Add the `deploy-from` command. This command is like `deploy` in
functionality but instead of sourcing input from a mixture of various
CLI arguments, CLI arguments that take JSON strings, and JSON data
provided on stdin - this command aims to take configuration from a
single unified JSON object provided on the commands stdin.
This change strives to be as reasonably backwards compatible with
`deploy` as possible and this leads to some awkward hoop-jumping,
including: needing to nest CLI arguments inside the JSON, because
that is what the manager constructs; duplicate sources of the fsid
(CLI and JSON); the strange behavior of CephadmContext when setting
values; and a few others I'm probably forgetting.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 11 May 2023 14:30:51 +0000 (10:30 -0400)]
cephadm: add fetch_configs function for reading configuration items from ctx
The CephadmContext holds much of cephadm's state, including values
from cli options and (soon) configuration file input. Add a
`fetch_configs` function that reads processed configuration items from `config_blobs`
(a dict mapping config name to arbitrary configuration content) or
falls back to using the `get_parm` function on `ctx.config_json`.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 11 May 2023 14:30:12 +0000 (10:30 -0400)]
cephadm: add fetch_meta function for reading metadata properties from ctx
The CephadmContext holds much of cephadm's state, including values from
cli options and (soon) configuration file input. Add a `fetch_meta`
function that reads processed metadata from `meta_properties` or parses
JSON stored on `meta_json`. Parsed JSON is saved to `meta_properties`.
Future code should always use fetch_meta for reading, and only ever
set `meta_properties` as a python dict, not round trip JSON through
meta_json.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 11 May 2023 14:25:38 +0000 (10:25 -0400)]
cephadm: split default_image decorator into two functions
Keep default_image as a decorator for functions that will only
ever need to update an image passed by the CLI. For other future
functions that want to execute code prior to assigning an image
from CLI parameters add `update_default_image` which takes a
CephadmContext and updates it and can be used by the caller
at an arbitrary point in the code flow.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 1 Jun 2023 15:16:13 +0000 (11:16 -0400)]
cephadm: change tests to assert using mock call not func.args
The Python docs [1] note that:
Changed in version 3.8: Added args and kwargs properties.
In order to run tests on python 3.6 (example: `tox -e py36`) we
change the tests to do the asserts using the older call(...)
comparison style, with mock.ANY used for args we don't care about.
Zac Dover [Mon, 12 Jun 2023 11:32:14 +0000 (21:32 +1000)]
doc/rados: add math markup to placement-groups.rst
Add some math markup to some of the mathematical expressions in
doc/rados/operations/placement-groups.rst.
This change has advantages as well as disadvantages. On the one hand,
the mathematical expressions look nicer and are easier to read. On the
other hand, the rendered mathematical expressions are not searchable as
a part of the text, which makes CTRL+F searches useless in finding them.
This PR is offered as an RFC on the matter of whether mathematical
expressions should be rendered with the :math: extension.
Xiubo Li [Tue, 23 May 2023 11:08:15 +0000 (19:08 +0800)]
xfstests_dev: install extra packages from powertools repo for xfsprogs
Centos Stream 8 has removed the 'device-mapper-devel', 'libedit-devel'
and 'userspace-rcu-devel' packages from the mirrors and we need to
install it from powertools repo.
Fixes: https://tracker.ceph.com/issues/59683 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Luis Domingues [Thu, 8 Jun 2023 08:09:06 +0000 (10:09 +0200)]
doc: Add missing custom container_image
While testing cephadm in order to migrate to it in the near
futur, I needed to use some custom images for haproxy
and keepalived. I needed to see into the code to see what
existed. So I put what I found on the code into documentation.
Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
Vedansh Bhartia [Wed, 7 Jun 2023 15:09:51 +0000 (20:39 +0530)]
rgw: pass boost intrusive_ptr to DataLogBackends flat_map
When emplacing a new backend, use an explicitly constructed
intrusive_ptr so that it gets destroyed if the emplace fails.
Though the destructor is already called, this behaviour cannot be relied
upon. std::map does not exhibit the same behaviour, and would have
leaked memory had it been used instead.
Nizamudeen A [Wed, 7 Jun 2023 08:17:56 +0000 (13:47 +0530)]
mgr/dashboard: add popover to cluster status card
Previous dashboard has a popover for the status when there are some
warnings in the Cluster Health. Introducing the same behaviour on the
new landing page
Fixes: https://tracker.ceph.com/issues/61611 Signed-off-by: Nizamudeen A <nia@redhat.com>