Commit Graph

6003 Commits (548a16fe4f184a3ea0e624d4861e5da968c0552c)
 

Author SHA1 Message Date
Teoman ONAY 548a16fe4f Fix cephadm-adopt test scenario
Fixes cephadm-adopt test scenario by configuring rbd application
on test and test2 pools. Otherwise cephadm-adopt failed at task
"Check pools have an application enabled"

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit ca191fad2a)
2024-05-16 11:33:37 +02:00
Guillaume Abrioux 97d4372e60 container-common: drop image fetching logic
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 1a97696d9b)
2024-03-11 15:48:19 +01:00
Guillaume Abrioux a20c6919cf tests: various fixes in tox.ini
- the collection path isn't right
- vagrant_up.sh fails because the path isn't passed down
- increase the number of retries and delay for pytest

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Seena Fallah 2b711f7601 ceph-handler: remove tempdir when all handlers are done
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-11 15:48:19 +01:00
Seena Fallah c2f6f0c621 ceph-handler: restart existed rgw daemons
This is needed for new instances are the restart might trigger before the deployment

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 7142321bc3)
2024-03-11 15:48:19 +01:00
Teoman ONAY 6ba0c733e6 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()

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 37a82225f7)
2024-03-11 15:48:19 +01:00
Guillaume Abrioux bc28ebd498 tests: do not use dev rpms in rbd-mirror scenario
this makes the scenario use devel rpms which is wrong.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Guillaume Abrioux 66e32b895c library/ceph_crush_rule: module refactor
This refactor makes the 'name' argument not mandatory because when
'state' is 'info' we shouldn't need to pass it.

The second change is just a duplicate code removal.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit e433d2b955)
2024-03-11 15:48:19 +01:00
Dmitriy Rabotyagov 310ce9e441 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.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
(cherry picked from commit b610297554)
2024-03-11 15:48:19 +01:00
Guillaume Abrioux b904d26982 tests: do not use ceph@main rpm
rbd-mirror tests are using devel packages while it should
use quincy.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Guillaume Abrioux eb8904e795 core: bump to ansible 2.15
2.12 is EOL since May 2023.

Let's bump to 2.15.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Guillaume Abrioux 13236d7d81 linter: only report errors
this is a dirty and temporary hack so we just list error and make
this job success anyway.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Guillaume Abrioux 68ce8e11f8 linter: address syntax errors
This fixes the following error:
```
syntax-check[specific]: The field 'hosts' has an invalid value, which
includes an undefined variable.
```

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Guillaume Abrioux f628068799 linter: bump to 6.16.0
typical error:

```
Error:     raise NotImplementedError('an AnsibleCollectionFinder has not been installed in this process')
NotImplementedError: an AnsibleCollectionFinder has not been installed in this process
```

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Guillaume Abrioux 0046ca0338 tests: bump to py3.10
let's bump the python version to 3.10 in python-based
github actions.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 66337a361b)
2024-03-11 15:48:19 +01:00
Guillaume Abrioux 90bd6650d0 Vagrantfile: support CEPH_*_SUBNET env vars
support passing `CEPH_PUBLIC_SUBNET` and `CEPH_CLUSTER_SUBNET`
environment variables.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-17 10:08:16 +01:00
Guillaume Abrioux 7a9f871d49 tests: run vagrant_up.sh from dirname
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-17 00:13:42 +01:00
Teoman ONAY b82a6ed1a7 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

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2232282

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 490ca79ccc)
2023-09-27 09:16:30 +02:00
Teoman ONAY 3f15340909 Speed up the some facts settings by running them once
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 72d4d207a0)
2023-09-27 09:16:30 +02:00
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