]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
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 agoceph-config: drop osd_memory_target from ceph_conf_overrides
Seena Fallah [Mon, 22 May 2023 20:44:46 +0000 (22:44 +0200)]
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 f90d5d8b4c01b1f7e398bbdc59adcfc00d12ed19)

2 years agoNew RELEASE-NOTE for stable-7.0
Teoman ONAY [Thu, 1 Jun 2023 08:48:39 +0000 (10:48 +0200)]
New RELEASE-NOTE for stable-7.0

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2 years agoFixes failing centos-non_container-rbdmirror test
Teoman ONAY [Tue, 2 May 2023 10:22:45 +0000 (12:22 +0200)]
Fixes failing centos-non_container-rbdmirror test

Signed-off-by: Teoman ONAY <tonay@ibm.com>
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>
2 years agotests: disable internal repos
Guillaume Abrioux [Thu, 16 Mar 2023 16:43:03 +0000 (17:43 +0100)]
tests: disable internal repos

they are broken at the moment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 99573c4bba5ec2def0cb76e62558a7f664025544)

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 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 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 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>
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 agotests: use pacific image instead of quincy for initial deployment
Guillaume Abrioux [Wed, 22 Feb 2023 11:50:56 +0000 (12:50 +0100)]
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>
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 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 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 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)

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 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 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 agodashboard: support --limit execution with rgw
Guillaume Abrioux [Wed, 13 Apr 2022 08:42:47 +0000 (10:42 +0200)]
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>
(cherry picked from commit 45c2f0a90a330332202a8abdca52fa45bb7e4ebd)

2 years agofacts: follow up on aa0cc93
Guillaume Abrioux [Thu, 21 Apr 2022 08:06:56 +0000 (10:06 +0200)]
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>
(cherry picked from commit 93df3e53ab02eb112468b7c896db10d97b754cf3)

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)