]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
13 months agovagrant-box atomic-host -> stream9 stable-6.0
Teoman ONAY [Tue, 16 Jul 2024 12:54:37 +0000 (14:54 +0200)]
vagrant-box atomic-host -> stream9

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit f1b67bd4d94f3e40c01bd1fdac5b7dd96f06a020)

2 years agodashboad: rgw frontends entries in ceph.conf are incorrect
Teoman ONAY [Tue, 5 Sep 2023 10:39:15 +0000 (12:39 +0200)]
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 490ca79ccc5b1cf7270032a70be41500578f3ae8)

2 years agoSpeed up the some facts settings by running them once
Teoman ONAY [Tue, 5 Sep 2023 10:32:53 +0000 (12:32 +0200)]
Speed up the some facts settings by running them once

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 72d4d207a0cc3b5ec5f8b4538b8e4bc9771bf451)

2 years agodo not use update debian cache or try to install packages when package-install is...
insatomcat [Wed, 16 Aug 2023 13:51:03 +0000 (15:51 +0200)]
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 271fd8294296efe42f4e4d98032b4f8aac8ff654)

2 years agocephadm-adopt: Fixes hosts addition to be managed by cephadm
Teoman ONAY [Wed, 16 Aug 2023 14:02:29 +0000 (16:02 +0200)]
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 db2f3e42dc23d72cfae85ec942b6b2f43e482e81)

2 years agolibrary: ceph_crush: set containerized param to false to respect docstrings
Konstantin Shalygin [Fri, 19 Feb 2021 14:49:25 +0000 (17:49 +0300)]
library: ceph_crush: set containerized param to false to respect docstrings

Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
(cherry picked from commit d1f85f5ad3515076629e64eddec66c27987f88c8)

2 years agoUpdate zonegroup test.
Nathan Hoad [Wed, 28 Jun 2023 20:28:45 +0000 (16:28 -0400)]
Update zonegroup test.

Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
(cherry picked from commit dad116b4456862d94edebf00b006d6dda2aaaacf)

2 years agoSpecify the zone when requesting zonegroup information.
Nathan Hoad [Thu, 8 Jun 2023 17:41:53 +0000 (13:41 -0400)]
Specify the zone when requesting zonegroup information.

Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
(cherry picked from commit 8923931df441da1181f38ecdcd4e7d0d5394336d)

2 years agocephadm-adopt: Fixes rbd-mirror regression
Teoman ONAY [Fri, 4 Aug 2023 12:37:39 +0000 (14:37 +0200)]
cephadm-adopt: Fixes rbd-mirror regression

779523f86f4659283441ece8af2d4a4dbe8140b4 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 18cd35bad53231b9afdde8aec35c2b8a46c928e4)

2 years agocephadm-adopt: Add --networks parameter support to ceph orch apply rgw
Teoman ONAY [Fri, 4 Aug 2023 09:17:44 +0000 (11:17 +0200)]
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 bc54290718b9303c9eadc1f6c4e7c0e79e54e41c)

2 years agoAdd ipv6 libvirt support scenario in vagrant
Teoman ONAY [Wed, 7 Jun 2023 15:10:52 +0000 (17:10 +0200)]
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 8f3bdd855989b9d89cc89d764647cdeb97adaf8e)

2 years agoReplace ip_version check with ansible test
Lukas Bezdicka [Wed, 19 Apr 2023 11:16:49 +0000 (13:16 +0200)]
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 5622a033a9f8a5c32fdd9429f40599d6b37cd7ac)

2 years agotests: force rpm pkg upgrade
Guillaume Abrioux [Wed, 22 Mar 2023 15:29:46 +0000 (16:29 +0100)]
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 b87f214a96be5f834ba166014d54815d17ff6dd7)

2 years agoceph-config: exclude already counted osds by lvm_volumes
Seena Fallah [Sun, 26 Feb 2023 14:11:26 +0000 (15:11 +0100)]
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 225ae38ee2f74165e7d265817597fe451df3e919)

2 years agodevices: allow using lvm_volumes with devices
Seena Fallah [Sun, 26 Feb 2023 14:08:09 +0000 (15:08 +0100)]
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 80b1ed9d4a3b133cb54fb13783071674baa856e5)

2 years agoceph-mgr: Fix reference to copy_admin_key variable
René Højbjerg Larsen [Fri, 3 Mar 2023 14:15:16 +0000 (15:15 +0100)]
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 09590c0683f3bff21a1b06de7f4378a2f8447e99)

2 years agoUses a more recent version of the CentOS stream 8 box
Teoman ONAY [Tue, 7 Feb 2023 13:30:52 +0000 (14:30 +0100)]
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>
2 years agoFix selinux label issues
Teoman ONAY [Tue, 14 Mar 2023 11:26:56 +0000 (12:26 +0100)]
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 d25fa6757c93af556c71c3e148835f591bf5b7be)

2 years agomgr: fix a typo
Lorenz Bausch [Thu, 9 Mar 2023 10:18:48 +0000 (11:18 +0100)]
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 2f5e21b631107df87eea3529716ec55803aa9341)

2 years agoFixes selinux relabeling issue for nfs container
Teoman ONAY [Thu, 2 Mar 2023 22:01:48 +0000 (23:01 +0100)]
Fixes selinux relabeling issue for nfs container

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit c1b541f69e02f0d6d5cedfc706d332bf017f16eb)

2 years agodevices: remove duplicated disks after the readlink resolve
Seena Fallah [Mon, 13 Feb 2023 17:07:25 +0000 (18:07 +0100)]
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 1f7b3ac5a387485b0e36994cb00c28eac8ee7572)

2 years agodevices: exclude db disks on osd_auto_discovery enabled
Seena Fallah [Mon, 13 Feb 2023 16:12:41 +0000 (17:12 +0100)]
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 32b56785116eb47297df282bab1543507fc62b43)

2 years agoCollocated mgr with mon fails to start on RHEL 8.7
Teoman ONAY [Tue, 7 Feb 2023 13:53:39 +0000 (14:53 +0100)]
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 637ca81c9cf801e4d1d125dc8a2492b90fd78eea)

2 years agoInitialize rbd pool at pool creation
Teoman ONAY [Tue, 29 Nov 2022 08:47:58 +0000 (09:47 +0100)]
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>
2 years agolibrary/ceph_key.py: rewrite for generate_ceph_cmd()
Wong Hoi Sing Edison [Thu, 17 Jun 2021 15:43:13 +0000 (23:43 +0800)]
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>
2 years agolibrary: exit on user creation failure
Dimitri Savineau [Wed, 28 Jul 2021 16:27:00 +0000 (12:27 -0400)]
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 17784624e0fb02080e14d15b4105ef92a78ec8c4)

2 years agoroles/ceph-rgw: Support CRUSH device class
Benoît Knecht [Tue, 26 Oct 2021 14:00:05 +0000 (16:00 +0200)]
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>
2 years agolibrary/ceph_ec_profile.py: Support CRUSH device class
Benoît Knecht [Tue, 26 Oct 2021 13:49:33 +0000 (15:49 +0200)]
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>
2 years agolibrary: flake8 ceph-ansible modules
Wong Hoi Sing Edison [Thu, 17 Jun 2021 16:18:07 +0000 (00:18 +0800)]
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 beda1fe77381fbacb40fb75e5c06f36fbbad4a4a)

2 years agoRevert "library: flake8 ceph-ansible modules"
Teoman ONAY [Wed, 18 Jan 2023 21:45:32 +0000 (22:45 +0100)]
Revert "library: flake8 ceph-ansible modules"

This reverts commit 35264b7381d5fe66d459ae2cacf20d61f4959c89.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2 years agoRevert "library: exit on user creation failure"
Teoman ONAY [Wed, 18 Jan 2023 21:45:07 +0000 (22:45 +0100)]
Revert "library: exit on user creation failure"

This reverts commit 17884d984870e83763878f0e503e0443ce4d5b1f.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2 years agoRevert "Initialize rbd pool at pool creation"
Teoman ONAY [Wed, 18 Jan 2023 21:44:01 +0000 (22:44 +0100)]
Revert "Initialize rbd pool at pool creation"

This reverts commit 5a750aa955b67187c58d4034517b9d24b60daaff.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2 years agoInitialize rbd pool at pool creation
Teoman ONAY [Tue, 29 Nov 2022 08:47:58 +0000 (09:47 +0100)]
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 c39bbc3deaf7a02d36daa39d752e91e94afb3c3e)

# Conflicts:
# library/ceph_ec_profile.py
# library/ceph_key.py
# tests/library/test_ceph_key.py

2 years agoceph-config: make sure rgw_instances is set
Guillaume Abrioux [Tue, 7 Feb 2023 00:52:43 +0000 (01:52 +0100)]
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 e47288ef6c23820c4fa50835574169233cd06b12)

2 years agoCheck first the OSD storage file rather than after created
Mario Codeniera [Tue, 6 Dec 2022 08:18:03 +0000 (21:18 +1300)]
Check first the OSD storage file rather than after created

Signed-off-by: Mario Codeniera <M.Codeniera@massey.ac.nz>
(cherry picked from commit e5ad1953dccf7463507b932b04a00a17f3c8d81e)

2 years agotests: pin ubuntu 20.04 version in github action for pytest
Guillaume Abrioux [Mon, 16 Jan 2023 09:26:24 +0000 (10:26 +0100)]
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>
2 years agotests: use quay.io instead of quay.ceph.io
Guillaume Abrioux [Tue, 6 Dec 2022 12:14:07 +0000 (13:14 +0100)]
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 e55ca0188190173320ca77c62d2a908e9e8f5c61)

2 years agocephadm-adopt: fix rbd-mirror adoption
Guillaume Abrioux [Mon, 14 Nov 2022 11:29:37 +0000 (12:29 +0100)]
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 c3fae04b8d234c84e4a5c7ca4a390ecfa3d1c1d5)

2 years agoSetting fact _radosgw_address fail when RGW is on a different network
Teoman ONAY [Tue, 18 Oct 2022 13:28:54 +0000 (15:28 +0200)]
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 590e57cc1b9a79ced7a9208db8bf8eaf43d3f320)

2 years agoswitch-to-containers: ignore errors when stopping service
Guillaume Abrioux [Mon, 17 Oct 2022 08:20:21 +0000 (10:20 +0200)]
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 a158d0d53bf8758c5c0fbbd269a3c885615b5461)

2 years agoswitch-to-containers: fix rbd-mirror migration
Guillaume Abrioux [Fri, 14 Oct 2022 17:33:26 +0000 (19:33 +0200)]
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 7664da58da56d871a9304ea6bec8d0e30ba9b02a)

2 years agoceph-osd: remove unused ceph config set for osd_memory_target
Seena Fallah [Sat, 24 Sep 2022 17:49:09 +0000 (19:49 +0200)]
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 8b983cfdbf77a8aada81b32dcbd2881025b0bfdb)

2 years agoceph-config: fix overriding osd_memory_target
Seena Fallah [Sat, 24 Sep 2022 17:46:20 +0000 (19:46 +0200)]
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 613773b2a3efcf7e9ccd562969bf8bca8c242377)

2 years agoceph-config: don't check for devices on existing osds
Seena Fallah [Sat, 24 Sep 2022 17:21:41 +0000 (19:21 +0200)]
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 57b0890aff91412fbdccbe0ec250ec06f4015f80)

2 years agoceph-config: always set _osd_memory_target
Seena Fallah [Sat, 24 Sep 2022 17:07:36 +0000 (19:07 +0200)]
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 ac4dfa7526eccdf05b8019ee761538d9b5b0642b)

2 years agolibrary/radosgw_user.py: fix user update
John Karasev [Wed, 28 Sep 2022 18:57:41 +0000 (11:57 -0700)]
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 72ff93f685ee7a11490b1c9cce15aba564fb10d0)