Commit Graph

5984 Commits (539fee84a13763e049967902d7837cec8ade9951)
 

Author SHA1 Message Date
insatomcat 539fee84a1 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.

Signed-off-by: Florent CARLI <florent.carli@rte-france.com>
(cherry picked from commit 271fd82942)
2023-08-22 11:08:43 +02:00
Teoman ONAY 10c7fd72b1 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.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit db2f3e42dc)
2023-08-17 22:56:05 +02:00
Konstantin Shalygin 829eb28abb library: ceph_crush: set containerized param to false to respect docstrings
Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
(cherry picked from commit d1f85f5ad3)
2023-08-16 10:39:11 +02:00
Nathan Hoad 5601df8a93 Update zonegroup test.
Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
(cherry picked from commit dad116b445)
2023-08-16 10:37:38 +02:00
Nathan Hoad bd22ea2504 Specify the zone when requesting zonegroup information.
Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
(cherry picked from commit 8923931df4)
2023-08-16 10:37:38 +02:00
Teoman ONAY 0a9a91b662 cephadm-adopt: Fixes rbd-mirror regression
779523f86f introduced a regression
related to rbdmirrors tasks. They were executed while
ceph_rbd_mirror_remot_* variables were not set.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 18cd35bad5)
2023-08-16 10:36:34 +02:00
Teoman ONAY 0b2826132e cephadm-adopt: Add --networks parameter support to ceph orch apply rgw
When radosgw_address_block was defined, it was not taken into account
during rgw adoption process

depends on: https://tracker.ceph.com/issues/62185
fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2224351

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit bc54290718)
2023-08-16 10:36:34 +02:00
Teoman ONAY 91c57b662d Add ipv6 libvirt support scenario in vagrant
Addition of ipv6 support in vagrant/libvirt and an all_daemons_ipv6 scenario.
Some typo fixes

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 8f3bdd8559)
2023-06-29 15:02:10 +02:00
Seena Fallah dadddae8cd 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.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit f90d5d8b4c)
2023-06-01 15:00:42 +02:00
Teoman ONAY 1715e22af5 New RELEASE-NOTE for stable-7.0
Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-06-01 14:26:53 +02:00
Teoman ONAY 4b5c59b37d Fixes failing centos-non_container-rbdmirror test
Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-05-02 14:56:33 +02:00
Lukas Bezdicka d5e55516f4 Replace ip_version check with ansible test
Instead of checking ip_version variable we should check the input
address for ip version and select code path based on that.

This solves ceph adoption with mixed ipv6 and ipv4 networks.

Resolves: rhbz#2186226
Signed-off-by: Lukas Bezdicka <lbezdick@redhat.com>
(cherry picked from commit 5622a033a9)
2023-05-02 14:56:33 +02:00
Guillaume Abrioux b87f214a96 tests: force rpm pkg upgrade
Due to a bug with the rpm version present in the current stream8 vagrant image,
we have to make sure it is first upgraded to the latest version.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2023-03-24 09:50:07 +01:00
Guillaume Abrioux f171bf5745 tests: disable internal repos
they are broken at the moment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 99573c4bba)
2023-03-20 23:12:24 +01:00
Seena Fallah 35b8598b78 ceph-config: exclude already counted osds by lvm_volumes
Exclude lvm_volumes defined disks from existing osds while it has been counted by the "count number of osds for lvm scenario" task.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 225ae38ee2)
2023-03-17 20:43:33 +01:00
Seena Fallah 7206037c5d devices: allow using lvm_volumes with devices
* Exclude device from lvm_volumes while osd_auto_discovery is true
* Sum num_osds on both lvm_volumes and devices list

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 80b1ed9d4a)
2023-03-17 20:43:33 +01:00
Seena Fallah bd66017d46 devices: exclude db disks on osd_auto_discovery enabled
Exclude disks were defined in dedicated_devices and bluestore_wal_devices on osd_auto_discovery enabled.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 32b5678511)
2023-03-17 14:29:22 +01:00
Seena Fallah fcbb49c1ac 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.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 1f7b3ac5a3)
2023-03-17 14:23:07 +01:00
René Højbjerg Larsen 8d6fdbebd6 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).

Signed-off-by: René Højbjerg Larsen <rhl@jfm.dk>
(cherry picked from commit 09590c0683)
2023-03-17 14:17:00 +01:00
Teoman ONAY 23e05d372d Uses a more recent version of the CentOS stream 8 box
Uses the latest centos/streamX image available.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-16 22:00:17 +01:00
Teoman ONAY 6b900d8db0 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.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-16 22:00:17 +01:00
Teoman ONAY 557ae2695b Fixes selinux relabeling issue for nfs container
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit c1b541f69e)
2023-03-16 22:00:17 +01:00
Guillaume Abrioux f489acbf09 tests: use pacific image instead of quincy for initial deployment
update scenario should upgrade from pacific to quincy.
It is currently upgrading from quincy to quincy.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-03-16 22:00:17 +01:00
Teoman ONAY 16a50cedc2 Collocated mgr with mon fails to start on RHEL 8.7
With podman version podman-3:4.2.0-4.module+el8.7.0+17064+3b31f55c and
later, when mgr fails to start if mon is already running.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2169767

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 637ca81c9c)
2023-03-16 22:00:17 +01:00
Lorenz Bausch 3ce3dd6bcc mgr: fix a typo
This commit fixes a typo in `roles/ceph-mgr/defaults/main.yml`
(s/mpdules/modules)

Signed-off-by: Lorenz Bausch <info@lorenzbausch.de>
(cherry picked from commit 2f5e21b631)
2023-03-15 16:24:15 +01:00
Guillaume Abrioux b0fd037ce7 ceph-config: make sure rgw_instances is set
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.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2141604

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e47288ef6c)
2023-02-15 14:50:46 +01:00
Teoman ONAY 8997091574 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

[1]https://docs.ceph.com/en/latest/rbd/rados-rbd-cmds/#create-a-block-device-pool

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit c39bbc3dea)
2023-02-14 10:51:55 +01:00
Guillaume Abrioux 4bdccef534 tests: use quay.io instead of quay.ceph.io
This makes the CI use quay.io instead of quay.ceph.io

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e55ca01881)
2023-01-16 15:17:56 +01:00
Mario Codeniera aa9ad01b28 Check first the OSD storage file rather than after created
Signed-off-by: Mario Codeniera <M.Codeniera@massey.ac.nz>
(cherry picked from commit e5ad1953dc)
2023-01-16 14:27:26 +01:00
Guillaume Abrioux db3b8c271e cephadm-adopt: fix rbd-mirror adoption
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.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2140569

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c3fae04b8d)
2022-12-15 15:45:20 +01:00
Teoman ONAY d5c597df91 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.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2131150

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 590e57cc1b)
2022-10-27 10:29:24 +02:00
Guillaume Abrioux 85420051db dashboard: support --limit execution with rgw
When the following conditions are met:

- rgw is deployed,
- dashboard is deployed,
- playbook is called with --limit,
- a node being processed is collocated on either a mon or mgr.

The playbook fails because `rgw_instances` is undefined.
The idea here is to make sure this variable is always defined.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2063029

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 45c2f0a90a)
2022-10-20 13:59:21 +02:00
Guillaume Abrioux 2dc6490135 facts: follow up on aa0cc93
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.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2063029

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 93df3e53ab)
2022-10-20 13:59:21 +02:00
Guillaume Abrioux 0004891aad switch-to-containers: ignore errors when stopping service
There might be cases where it can break idempotency.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a158d0d53b)
2022-10-19 16:16:51 +02:00
Guillaume Abrioux b98d8b9535 switch-to-containers: fix rbd-mirror migration
`--state=enabled` isn't a valid filter so the unit from the packaging
never gets removed.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2134917

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7664da58da)
2022-10-17 10:52:03 +02:00
Seena Fallah fea7044f46 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

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 8b983cfdbf)
2022-10-12 10:49:03 +02:00
Seena Fallah 813e155351 ceph-config: fix overriding osd_memory_target
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.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 613773b2a3)
2022-10-12 10:49:03 +02:00
Seena Fallah 9b5cdbb069 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

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 57b0890aff)
2022-10-12 10:49:03 +02:00
Seena Fallah 5a36d3dbe5 ceph-config: always set _osd_memory_target
this should be set when rolling_update is true as well, otherwise, it will reset to default on the upgrade

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit ac4dfa7526)
2022-10-12 10:49:03 +02:00
John Karasev e7b7d503bb 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>
(cherry picked from commit 72ff93f685)
2022-10-12 10:48:36 +02:00
Guillaume Abrioux 320c01ece1 rbd-mirror: add rx peer only once
in order to avoid the following error:

```
multiple RX peers are not currently supported
```

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2037646

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit aa64747cd1)
2022-09-20 17:59:08 +02:00
Guillaume Abrioux 54fdb86805 rbd-mirror: fix multiple rbd-mirror daemon support
This `run_once: true` breaks multiple rbd-mirror daemons support
as it would make all rbd-mirror daemons use the same keyring.
Each rbd-mirror daemon needs its own keyring in order to start.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2037646

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 665601bf8a)
2022-09-13 10:39:41 +02:00
Seena Fallah 0baeac1949 ceph-crash: add missing \ in service file
regression by: d374e634ed

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 68d9973cf9)
2022-09-12 10:10:05 +02:00
Guillaume Abrioux fcbc5df605 ceph-config: allow overriding osd_memory_target
If `osd_memory_target` is set in group_vars, the default value (4Gb)
should be overridden.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2118544

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b40e4bfe60)
2022-09-08 09:32:30 +02:00
Seena Fallah 5d1ed62037 ceph-crash: add support cluster name
add cluster name to CEPH_ARGS env var to support custom cluster name
this can change as an arg to ceph-crash when https://github.com/ceph/ceph/pull/47836 released

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit d374e634ed)
2022-09-08 09:27:35 +02:00
Guillaume Abrioux a6ae67dc9c config: use osd_memory_target value from ceph_conf_overrides if defined
otherwise it's impossible to override `osd_memory_target`
via `ceph_conf_overrides`.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f19dcb266a)
2022-08-11 11:10:24 +02:00
Guillaume Abrioux fbeba9c394 config: do not always set _osd_memory_target
When 'osd_memory_target' is overridden in ceph_conf_overrides.
The task that sets the fact `osd_memory_target` in the ceph-config role
should be skipped.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675#c11

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e2076e439b)
2022-08-08 20:34:54 +02:00
Guillaume Abrioux 3eb0f50d34 tests: do not use dev repo
cephadm-adopt is using dev repositories where it should use
community ones.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 19:59:10 +02:00
Guillaume Abrioux 2699a484a2 rolling_update: fix rbd-mirror play
There's no service to stop/mask when the node being upgraded is
a 'primary node' only (1 way replication).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 82e0ae7e75)
2022-08-03 19:59:10 +02:00
Guillaume Abrioux 7c8bc62add tests: isolate ansible collections
When Ansible collections are installed, they should be isolated.
Otherwise, they will be shared in any scheduled job.
This might cause issues when running different branch versions for instance.
This also replace `ANSIBLE_CALLBACK_WHITELIST` with `ANSIBLE_CALLBACK_ENABLED` as it's
going to be deprecated in Ansible 2.15.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 50b7a12ad8)
2022-08-03 19:59:10 +02:00