Commit Graph

6123 Commits (mergify/bp/stable-8.0/pr-7620)
 

Author SHA1 Message Date
Guillaume Abrioux ae2ec3d275 library: add ceph_config module
This adds the module `ceph_config`

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux c342035fb6 library: add ceph_authtool module
This adds the module `ceph_authtool`.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux 08d80633f4 main playbook: final play refactor
we can simply run this play on the first monitor rather than delegating
to it.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux 58758bca28 cephadm-adopt: fix an issue in mgr adoption play
this drops variables in 'hosts' field of mgr adoption play.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux e6f1e51588 monitor bootstrap refactor
major mon bootstrap refactor so we don't need to rely on
the ceph.conf for this operation.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux 14b4abf7c0 migrate from ceph.conf to ceph config
keep the ceph.conf very simple.
manage the common options such as `public_network` with `ceph_config`
module.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux d6bc8e3b9a tests: use python 3.9
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux e433d2b955 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>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux 7909778d0e add CentOS stream 9 support
This adds the resquired changes in order to support
CentOS stream 9.

Also, this bumps the Ansible version support to 2.15

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-02-14 09:54:13 +01:00
Guillaume Abrioux a9d1ec844d doc: project deprecation
Mark the project as deprecated.

See https://docs.ceph.com/en/latest/cephadm/ for ``cephadm``
documentation.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-01-17 17:42:06 +01:00
Dmitriy Rabotyagov b610297554 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>
2023-12-06 19:13:39 +01:00
Teoman ONAY 490ca79ccc 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>
2023-09-26 10:37:14 +02:00
Teoman ONAY 72d4d207a0 Speed up the some facts settings by running them once
Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-09-26 10:37:14 +02:00
insatomcat 271fd82942 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>
2023-08-21 14:01:15 +02:00
Teoman ONAY db2f3e42dc 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>
2023-08-16 18:14:29 +02:00
Nathan Hoad dad116b445 Update zonegroup test.
Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
2023-08-08 07:52:21 +02:00
Nathan Hoad 8923931df4 Specify the zone when requesting zonegroup information.
Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
2023-08-08 07:52:21 +02:00
Konstantin Shalygin d1f85f5ad3 library: ceph_crush: set containerized param to false to respect docstrings
Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
2023-08-08 07:50:47 +02:00
Teoman ONAY 18cd35bad5 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>
2023-08-07 17:21:37 +02:00
Teoman ONAY bc54290718 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>
2023-08-07 17:21:37 +02:00
Teoman ONAY 8f3bdd8559 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>
2023-06-28 20:51:01 +02:00
Guillaume Abrioux 42f6bdb849 tests: updates functional tests with new image
let's use quay.io/ceph/daemon-base in every tests instead of
`ceph/daemon` since it's not supposed to be built anymore soon.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2023-06-02 14:22:20 +02:00
Seena Fallah f90d5d8b4c 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>
2023-06-01 10:00:04 +02:00
Guillaume Abrioux 23a8bbc6c5 purge: remove /var/lib/ceph
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.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 5cd692dcdc update: fix mgr upgrade issue
for some reason, this task has to be done in 2 steps otherwise it fails.
1/ stop and disable the service
2/ mask it

when done with with a single task, the module says the service has been
stopped while this isn't the case (Ansible systemd module bug?).

it possibly relates to https://github.com/ansible/ansible/issues/68680

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 15b91962e7 tests: test nfs-ganesha with stable repos
dev repos are broken, let's test with stable builds for now.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 896d82877f osd: drop filestore support
filestore objectstore will be gone in the next Ceph release.the
This drops the filestore support in ceph-ansible.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 0e086c4c61 tests: introduce `ceph_status` fixture
This avoids some duplicated code in various test_*_is_up() tests

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 027a3d7e3d iscsi: do not use ceph/daemon entrypoint
This changes the entrypoint used for the iscsigw containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 73395c19c5 rbdmirror: do not use ceph/daemon entrypoint
This changes the entrypoint used for rbdmirror containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 4402ac1e90 nfs: do not use ceph/daemon entrypoint
This changes the entrypoint used for nfs-ganesha containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux c33cfc000b rgw: do not use daemon
This changes the entrypoint used for radosgw containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 3b36a4e826 mds: do not use ceph/daemon entrypoint
This changes the entrypoint used for ceph-mds containerized daemons
in the systemd template.not

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 8df9791bd3 osd: do not use ceph/daemon entrypoint
This changes the entrypoint used for ceph-osd containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux b03de38f39 mgr: do not use ceph/daemon entrypoint
This changes the entrypoint used for ceph-mgr containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 0cdca9c188 mon: do not use ceph/daemon entrypoint
This changes the entrypoint used for ceph-mon containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 855f742486 library: fix a bug in ceph_key module
`name` is a mandatory parameter when `state` is either
`present` or `absent` or `update` or `info`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux 86ab93efbb Vagrantfile: address deprecation warning
```
==> mgr0: Libvirt Provider: volume_cache is deprecated. Use disk_driver
:cache => 'unsafe' instead.
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 23:07:13 +02:00
Guillaume Abrioux aaa9f1d291 ceph_key: drop unused result parameter
This parameter is not used anywhere in this function, so we can drop it.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-05-31 15:31:44 +02:00
Lukas Bezdicka 5622a033a9 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>
2023-04-24 14:21:24 +02:00
Guillaume Abrioux 99573c4bba tests: disable internal repos
they are broken at the moment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-03-20 11:04:07 +01:00
Seena Fallah 225ae38ee2 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>
2023-03-17 16:05:34 +01:00
Seena Fallah 80b1ed9d4a 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>
2023-03-17 16:05:34 +01:00
Teoman ONAY e8de8e29d6 Remove all vagrant boxes
Remove all existing vagrant boxes to prevent vagrant from using
older ones

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-17 08:48:15 +01:00
René Højbjerg Larsen 09590c0683 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>
2023-03-16 13:14:07 +01:00
Lorenz Bausch 2f5e21b631 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>
2023-03-15 16:14:44 +01:00
Teoman ONAY 49da07df68 shrink-osd fails when the OSD container is stopped
ceph-volume simple scan cannot be executed as it is meant to be
run inside the OSD container.

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

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-15 16:00:22 +01:00
Teoman ONAY d25fa6757c 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-15 15:51:00 +01:00
Teoman ONAY c1b541f69e Fixes selinux relabeling issue for nfs container
Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-13 20:03:21 +01:00
Teoman ONAY 0622cde67f 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-03 15:44:19 +01:00