Commit Graph

5954 Commits (76aef742f813ab070b7e130083e9ec2478d7ffe3)
 

Author SHA1 Message Date
Teoman ONAY 76aef742f8 vagrant-box atomic-host -> stream9
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit f1b67bd4d9)
2024-08-02 22:37:36 +02:00
Teoman ONAY c9f76d7c16 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:43 +02:00
Teoman ONAY 8c0e41ddde 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:43 +02:00
insatomcat 29fe5c8e9a 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:54 +02:00
Teoman ONAY 13e8b60cd3 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:55:52 +02:00
Konstantin Shalygin acea6ac6e4 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:38:59 +02:00
Nathan Hoad 41d96ac58f Update zonegroup test.
Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
(cherry picked from commit dad116b445)
2023-08-16 10:37:23 +02:00
Nathan Hoad 0cec4f301f 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:23 +02:00
Teoman ONAY 650d11d280 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:14 +02:00
Teoman ONAY 45de4e5143 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:14 +02:00
Teoman ONAY 96b0f8abcd 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:26 +02:00
Lukas Bezdicka bbaec6776c 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:23 +02:00
Guillaume Abrioux 9f44aa21b0 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>
(cherry picked from commit b87f214a96)
2023-04-11 12:36:39 +02:00
Seena Fallah b9049ba68f 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:47 +01:00
Seena Fallah 6bbed539a8 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:47 +01:00
René Højbjerg Larsen b98a92101b 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 15:54:16 +01:00
Teoman ONAY 598b271abb 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-17 07:54:27 +01:00
Teoman ONAY 1a8356dcc2 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>
(cherry picked from commit d25fa6757c)
2023-03-15 22:10:01 +01:00
Lorenz Bausch df87fe6e63 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:18:05 +01:00
Teoman ONAY 1a10e189cb Fixes selinux relabeling issue for nfs container
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit c1b541f69e)
2023-03-14 08:25:48 +01:00
Seena Fallah 47c1110f4d 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-07 15:54:11 +01:00
Seena Fallah edf2adda5f 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-03 16:17:48 +01:00
Teoman ONAY 03eb838716 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-02-21 13:47:06 +01:00
Teoman ONAY a5f589c8a9 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-02-14 10:52:14 +01:00
Wong Hoi Sing Edison bada32b4e0 library/ceph_key.py: rewrite for generate_ceph_cmd()
Also code lint with flake8

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2023-02-14 10:52:14 +01:00
Dimitri Savineau eadef1cec7 library: exit on user creation failure
When the ceph dashboard user creation fails then the issue is hidden
as we don't check the return code and don't print the error message
in the module output.

This ends up with a failure on the ceph dashboard set roles command saying
that the user doesn't exist.

By failing on the user creation, we will have an explicit explaination of
the issue (like weak password).

Closes: #6197

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 17784624e0)
2023-02-14 10:52:14 +01:00
Benoît Knecht d2b3fe44ea roles/ceph-rgw: Support CRUSH device class
The pools created by `ceph-rgw` (listed in `rgw_create_pools`) now support a
`ec_crush_device_class` option to specify which device class the EC pool should
use.

It default to being omitted, which means it will use OSDs from any device class
by default.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2023-02-14 10:52:14 +01:00
Benoît Knecht 0f4240bc4e library/ceph_ec_profile.py: Support CRUSH device class
The `crush_device_class` option of the `ceph_ec_profile` module was documented
but not implemented.

This commit adds it and ensures its value is updated on the corresponding EC
profile.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2023-02-14 10:52:14 +01:00
Wong Hoi Sing Edison 5938034e5e library: flake8 ceph-ansible modules
This commit ensure all ceph-ansible modules pass flake8 properly.

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
(cherry picked from commit beda1fe773)
2023-02-14 10:52:14 +01:00
Teoman ONAY 87c8e565ef Revert "library: flake8 ceph-ansible modules"
This reverts commit 35264b7381.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-02-14 10:52:14 +01:00
Teoman ONAY ad4dd21d68 Revert "library: exit on user creation failure"
This reverts commit 17884d9848.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-02-14 10:52:14 +01:00
Teoman ONAY 971171d9e6 Revert "Initialize rbd pool at pool creation"
This reverts commit 5a750aa955.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-02-14 10:52:14 +01:00
Teoman ONAY f33c2ccd34 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)

# Conflicts:
#	library/ceph_ec_profile.py
#	library/ceph_key.py
#	tests/library/test_ceph_key.py
2023-02-14 10:52:14 +01:00
Guillaume Abrioux 0ce0f6ab8e 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-14 10:51:41 +01:00
Mario Codeniera d3071d3a0f 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:35 +01:00
Guillaume Abrioux 3d8c6c17e2 tests: pin ubuntu 20.04 version in github action for pytest
3.6 has reached EOL and is no longer supported in newer ubuntu releases.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2023-01-16 10:30:33 +01:00
Guillaume Abrioux d464f82bad 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 10:30:33 +01:00
Guillaume Abrioux fb6098fa7c 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:34 +01:00
Teoman ONAY 470f63aebb 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:35 +02:00
Guillaume Abrioux 62f9804bd2 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:17:06 +02:00
Guillaume Abrioux 0a30a234af 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:16 +02:00
Seena Fallah d31e419e0e 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:27 +02:00
Seena Fallah 3d65113e26 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:27 +02:00
Seena Fallah fa69b8c754 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:27 +02:00
Seena Fallah 3f4aac94ce 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:27 +02:00
John Karasev 91e45256fa 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:48 +02:00
Guillaume Abrioux 8b4f68e39c 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:19 +02:00
Guillaume Abrioux 0ba46c906e 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:26 +02:00
Seena Fallah 759e414dd3 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:16 +02:00
Guillaume Abrioux 6374849f74 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:42 +02:00