Seena Fallah [Wed, 6 Mar 2024 12:37:06 +0000 (13:37 +0100)]
site: install mgrs with mons if sharing the same host
If mgr is meant to be installed on the mon host it needs to be installed in the same playbook as restart handlers might failed because of non-existance mgr
Seena Fallah [Sun, 18 Feb 2024 02:41:41 +0000 (03:41 +0100)]
container: cleanup container systemd units
* Make common params of container args in a var to avoid duplication
* The /var/lib/ceph/crash mount was missing after 637ca81c9cf801e4d1d125dc8a2492b90fd78eea
* Add CEPH_USE_RANDOM_NONCE as it's needed when running inside container (can be removed for squid later)
* Add NODE_NAME as some part of ceph code relies on this var
* add default logging opts for
Teoman ONAY [Mon, 15 Jan 2024 21:27:17 +0000 (22:27 +0100)]
pytest-infra: fix failures
pytest-infra 10.0.0 release changed the get_variables() behavior which led to CI failures
(https://github.com/pytest-dev/pytest-testinfra/pull/724)
Starting of now all groups the host is part of and not only the direct parent groups are
returned by get_variables()
Do not pass NoneType as argument to ceph_crush_rule
With ansible-core 2.15 it is not possible to pass argument of unexpected
type, as otherwise module will fail with:
`'None' is not a string and conversion is not allowed`
With that we want to only get all existing crush rules, so we can simply
supply an empty string as a name argument, which would satisfy
requirements and have same behaviour for previous ansible versions.
Alternative approach would be to stop making `name` as a required
argument to the module and use empty string as default value
when info state is used.
dashboad: rgw frontends entries in ceph.conf are incorrect
There was multiple rgw frontends entries while there was just one
rgw instance on each host. The other entries were the details from
the other rgw hosts in the cluster
insatomcat [Wed, 16 Aug 2023 13:51:03 +0000 (15:51 +0200)]
do not use update debian cache or try to install packages when package-install is disabled
When deploying with --skip-tags=package-install (when there is no access to a repository), the playbook is still trying to update the package cache, or to install ceph-mgr packages, which makes the playbook fail.
This change prevents the playbook to try to update the cache or install ceph-mgr packages when the package-install tag is skipped.
Teoman ONAY [Wed, 16 Aug 2023 14:02:29 +0000 (16:02 +0200)]
cephadm-adopt: Fixes hosts addition to be managed by cephadm
The tasks "manage nodes with cephadm - ipv4/6" are skipped when
cephadm_mgmt_network contains more than one ip network which prevent
cephadm from managing the host.
Teoman ONAY [Fri, 4 Aug 2023 12:37:39 +0000 (14:37 +0200)]
cephadm-adopt: Fixes rbd-mirror regression
779523f86f4659283441ece8af2d4a4dbe8140b4 introduced a regression
related to rbdmirrors tasks. They were executed while
ceph_rbd_mirror_remot_* variables were not set.
Seena Fallah [Mon, 22 May 2023 20:44:46 +0000 (22:44 +0200)]
ceph-config: drop osd_memory_target from ceph_conf_overrides
As it's always being set in ceph.conf template, it leads to having duplicated osd_memory_target keys in rendered ceph conf while defining one in ceph_conf_overrides.
This directory should be removed when the cluster is purged.
most of the services are started with the `--security-opt label=disable`
option. If the directory is not removed, it can cause SElinux issues
when the cluster is redeployed.
ceph-mgr: Fix reference to copy_admin_key variable
Enabling installation of the admin key to mgr nodes by setting
"copy_admin_key: true" is broken. This is because the variable is not
referenced correctly (using inline Jinja2 templating).
Teoman ONAY [Tue, 14 Mar 2023 11:26:56 +0000 (12:26 +0100)]
Fix selinux label issues
Add --security-opt label=disable to all containers
accessing /var/lib/ceph. podman selinux relabeling behavious changed
since version podman-3:4.2.0-1 which prevent some containers to access
files in these subdirectories.
Seena Fallah [Mon, 13 Feb 2023 17:07:25 +0000 (18:07 +0100)]
devices: remove duplicated disks after the readlink resolve
If a disk has a symlink it will be re-added to the devices lists one with resolved path and the other with a defined path.
We can rebuild the list from the readlink output cause readlink always return the correct path for all disks.
We need to make sure `rgw_instances` is set before `ceph.conf` is
rendered. Otherwise, the `ceph-crash` play in the main playbook updates
(via ceph-handler) the `ceph.conf` on rgw nodes and removes rgw instances
sections.
Teoman ONAY [Tue, 29 Nov 2022 08:47:58 +0000 (09:47 +0100)]
Initialize rbd pool at pool creation
When creating a RBD pool it needs to be initialized as per documentation[1]
Modified (pre_)generate_ceph_cmd to make it usable with any command with
the same parameters as the ceph command
The recent rbdmirror refactor introduced a regression in the
cephadm-adopt playbook.
Given that the rbd-mirror peer addition is now done by using the monitor
config-key store method during the cluster deployment, we can drop this
play from the cephadm-adopt.yml playbook.
Teoman ONAY [Tue, 18 Oct 2022 13:28:54 +0000 (15:28 +0200)]
Setting fact _radosgw_address fail when RGW is on a different network
Changed the when condition to only execute that fact setting on RGW
nodes while before it was run on all nodes and failed if the node
was not on the same network range as the RGW.
when these variables are defined in the inventory host file,
all tasks are skipped then because the node being played isn't
aware about the values from the rgw nodes.
John Karasev [Wed, 28 Sep 2022 18:57:41 +0000 (11:57 -0700)]
library/radosgw_user.py: fix user update
Removes the case when display_name was defined prevously but
was not provided when modifying. Without this change the module
will change display_name to name even if display_name was not name
originally. See #7296
Signed-off-by: John Karasev <john.karasev@intel.com>
ceph-osd: remove unused ceph config set for osd_memory_target
As the conf is always being set in the config file there is no need to set it in with `ceph config`.
Also this will make it hard to run the playbook with the `ceph_update_config` tag as it won't run and will create an inconsistency between the config managements of the cluster
When the value is overriding in `ceph_conf_overrides`, there is no need to calculate and set `osd_memory_target` again as we wanted to override the conf by our desired value.
ceph-config: don't check for devices on existing osds
When osd_auto_discovery is true the `devices` var will be empty (as the disks have holders).
Also in general there is no need to check for devices to list the devices with ceph-volume as we have `default({})` on the stdout in `num_osds` set fact in the next task
quangln94 [Fri, 7 Oct 2022 14:23:47 +0000 (16:23 +0200)]
doc: update README-MULTISITE.md
I update the parameters according to this PR: #7315
In addition, where rgw_zonesecondary: True and rgw_zonemaster: False,
I change rgw_zonegroupmaster to be False as those lines below:
https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L396
https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L417
https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L520
https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L535
Add note at line 205 here https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L205