Commit Graph

6004 Commits (debug)
 

Author SHA1 Message Date
Guillaume Abrioux 5e1bc1d038 debug
debug

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-08-03 21:52:22 +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
Guillaume Abrioux 15b91cef90 osd: drop filestore support
filestore is about to be removed. This commit removes the filestore
support in ceph-ansible.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-03-03 15:00:29 +01:00
Seena Fallah 1f7b3ac5a3 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>
2023-02-28 14:50:49 +01:00
Seena Fallah 32b5678511 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>
2023-02-22 15:06:37 +01:00
Teoman ONAY 637ca81c9c 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>
2023-02-19 01:03:03 +01:00
Guillaume Abrioux e47288ef6c 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>
2023-02-07 10:56:06 +01:00
Teoman ONAY c39bbc3dea 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>
2023-01-18 14:13:03 +01:00
Mario Codeniera e5ad1953dc Check first the OSD storage file rather than after created
Signed-off-by: Mario Codeniera <M.Codeniera@massey.ac.nz>
2023-01-16 10:36:29 +01:00
Guillaume Abrioux e55ca01881 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>
2022-12-13 14:38:58 +01:00
Guillaume Abrioux c3fae04b8d 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>
2022-11-14 15:45:00 +01:00
Teoman ONAY 590e57cc1b 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>
2022-10-20 13:59:08 +02:00
Guillaume Abrioux 45c2f0a90a 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>
2022-10-20 10:40:49 +02:00
Guillaume Abrioux 93df3e53ab 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>
2022-10-20 10:40:49 +02:00
Guillaume Abrioux a158d0d53b 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>
2022-10-17 14:10:42 +02:00
Guillaume Abrioux 7664da58da 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>
2022-10-15 07:07:47 +02:00
John Karasev 72ff93f685 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>
2022-10-10 11:00:58 +02:00
Seena Fallah 8b983cfdbf 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>
2022-10-10 10:58:47 +02:00
Seena Fallah 613773b2a3 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>
2022-10-10 10:58:47 +02:00
Seena Fallah 57b0890aff 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>
2022-10-10 10:58:47 +02:00
Seena Fallah ac4dfa7526 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>
2022-10-10 10:58:47 +02:00