]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
18 months agosite: install mgrs with mons if sharing the same host
Seena Fallah [Wed, 6 Mar 2024 12:37:06 +0000 (13:37 +0100)]
site: install mgrs with mons if sharing the same host

If mgr is meant to be installed on the mon host it needs to be installed in the same playbook as restart handlers might failed because of non-existance mgr

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agoceph-volume: disable dmcrypt by default
Seena Fallah [Wed, 6 Mar 2024 12:33:59 +0000 (13:33 +0100)]
ceph-volume: disable dmcrypt by default

regression by dcdb1710cbaf7946cf8161b4395697d4898680d3

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agoceph-facts: make set_radosgw_address optional
Seena Fallah [Fri, 23 Feb 2024 23:58:53 +0000 (00:58 +0100)]
ceph-facts: make set_radosgw_address optional

This can help to define custom rgw_instances with custom names and ports and addresses.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agoWelcome Back :tada:
Seena Fallah [Mon, 19 Feb 2024 22:38:02 +0000 (23:38 +0100)]
Welcome Back :tada:

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agotox: enable diff for ansible runs
Seena Fallah [Sun, 18 Feb 2024 10:50:29 +0000 (11:50 +0100)]
tox: enable diff for ansible runs

Diff option can help in CI when a task fail because of a corrupted render in previous tasks.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agocontainer: cleanup container systemd units
Seena Fallah [Sun, 18 Feb 2024 02:41:41 +0000 (03:41 +0100)]
container: cleanup container systemd units

* Make common params of container args in a var to avoid duplication
* The /var/lib/ceph/crash mount was missing after 637ca81c9cf801e4d1d125dc8a2492b90fd78eea
* Add CEPH_USE_RANDOM_NONCE as it's needed when running inside container (can be removed for squid later)
* Add NODE_NAME as some part of ceph code relies on this var
* add default logging opts for

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agorefactor: remove multisite leftovers
Seena Fallah [Sat, 17 Feb 2024 14:21:24 +0000 (15:21 +0100)]
refactor: remove multisite leftovers

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agoceph-handler: restart existed rgw daemons
Seena Fallah [Fri, 16 Feb 2024 13:58:10 +0000 (14:58 +0100)]
ceph-handler: restart existed rgw daemons

This is needed for new instances are the restart might trigger before the deployment

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agoceph-handler: remove tempdir when all handlers are done
Seena Fallah [Fri, 16 Feb 2024 10:30:07 +0000 (11:30 +0100)]
ceph-handler: remove tempdir when all handlers are done

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agoceph-config: make rgw config to be in file
Seena Fallah [Wed, 14 Feb 2024 20:47:35 +0000 (21:47 +0100)]
ceph-config: make rgw config to be in file

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agoceph-config: introduce dedicated cluster config flow
Seena Fallah [Wed, 14 Feb 2024 14:29:03 +0000 (15:29 +0100)]
ceph-config: introduce dedicated cluster config flow

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
18 months agodrop rhcs references
Guillaume Abrioux [Fri, 16 Feb 2024 09:07:50 +0000 (10:07 +0100)]
drop rhcs references

RHCS moved away from ceph-ansible. All RHCS references should be
removed.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
18 months agodrop iscsigw support
Guillaume Abrioux [Fri, 16 Feb 2024 00:16:55 +0000 (01:16 +0100)]
drop iscsigw support

This service is no longer maintained.
Let's drop its support within ceph-ansible.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
18 months agoaddress Ansible linter errors
Guillaume Abrioux [Wed, 14 Feb 2024 10:14:02 +0000 (11:14 +0100)]
address Ansible linter errors

This addresses all errors reported by the Ansible linter.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
18 months agodrop rgw multisite deployment support
Guillaume Abrioux [Wed, 14 Feb 2024 09:36:19 +0000 (10:36 +0100)]
drop rgw multisite deployment support

The current approach is extremely complex and introduced a lot
of spaghetti code. This doesn't offer a good user experience at all.

It's time to think to another approach (dedicated playbook) and drop
the current implementation in order to clean up the code.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agotests: set ANSIBLE_COLLECTIONS_PATH for rbdmirror scenario
Guillaume Abrioux [Tue, 13 Feb 2024 16:49:20 +0000 (17:49 +0100)]
tests: set ANSIBLE_COLLECTIONS_PATH for rbdmirror scenario

This is missing so the job fails.
Typical error:
```
ERROR! couldn't resolve module/action 'community.general.dnf_config_manager'.
```

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agofacts: remove legacy tasks
Guillaume Abrioux [Tue, 13 Feb 2024 15:01:38 +0000 (16:01 +0100)]
facts: remove legacy tasks

these tasks were there only for backward compatibility concerns.
It's time to drop them.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agobump ansible-core to 2.16
Teoman ONAY [Tue, 16 Jan 2024 10:40:07 +0000 (11:40 +0100)]
bump ansible-core to 2.16

- Remove python3 shebangs
- command module warn parameter is deprecated since 2.11 and removed
  from 2.14

Signed-off-by: Teoman ONAY <tonay@ibm.com>
19 months agotests: bump to py3.10
Guillaume Abrioux [Tue, 13 Feb 2024 09:53:16 +0000 (10:53 +0100)]
tests: bump to py3.10

let's bump the python version to 3.10 in python-based
github actions.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agopytest-infra: fix failures
Teoman ONAY [Mon, 15 Jan 2024 21:27:17 +0000 (22:27 +0100)]
pytest-infra: fix failures

pytest-infra 10.0.0 release changed the get_variables() behavior which led to CI failures
(https://github.com/pytest-dev/pytest-testinfra/pull/724)
Starting of now all groups the host is part of and not only the direct parent groups are
returned by get_variables()

Signed-off-by: Teoman ONAY <tonay@ibm.com>
19 months agocommon: enable crb repository on mgr hosts
Guillaume Abrioux [Tue, 13 Feb 2024 07:27:35 +0000 (08:27 +0100)]
common: enable crb repository on mgr hosts

This is needed in order to install `ceph-mgr-dashboard`
as it has a dependency on `python3-grpcio-tools` which comes from
crb repo.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agodrop variables from 'hosts' key
Guillaume Abrioux [Mon, 12 Feb 2024 23:48:13 +0000 (00:48 +0100)]
drop variables from 'hosts' key

The linter complains about that.
It doesn't work anyway so it doesn't make sense to leave these variables
here.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agotests: add flake8 to tox.ini
Guillaume Abrioux [Mon, 12 Feb 2024 20:04:12 +0000 (21:04 +0100)]
tests: add flake8 to tox.ini

this:
- adds flake8 to tox.ini
- addresses all flake8 errors

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agocontainer-common: drop image fetching logic
Guillaume Abrioux [Fri, 4 Aug 2023 07:57:32 +0000 (09:57 +0200)]
container-common: drop image fetching logic

wip

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agolibrary: add ceph_config module
Guillaume Abrioux [Fri, 4 Aug 2023 07:56:46 +0000 (09:56 +0200)]
library: add ceph_config module

This adds the module `ceph_config`

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agolibrary: add ceph_authtool module
Guillaume Abrioux [Fri, 4 Aug 2023 07:56:27 +0000 (09:56 +0200)]
library: add ceph_authtool module

This adds the module `ceph_authtool`.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agomain playbook: final play refactor
Guillaume Abrioux [Fri, 4 Aug 2023 07:55:23 +0000 (09:55 +0200)]
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>
19 months agocephadm-adopt: fix an issue in mgr adoption play
Guillaume Abrioux [Fri, 4 Aug 2023 07:54:22 +0000 (09:54 +0200)]
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>
19 months agomonitor bootstrap refactor
Guillaume Abrioux [Fri, 4 Aug 2023 07:53:40 +0000 (09:53 +0200)]
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>
19 months agomigrate from ceph.conf to ceph config
Guillaume Abrioux [Fri, 4 Aug 2023 07:45:28 +0000 (09:45 +0200)]
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>
19 months agotests: use python 3.9
Guillaume Abrioux [Fri, 2 Jun 2023 21:49:56 +0000 (23:49 +0200)]
tests: use python 3.9

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
19 months agolibrary/ceph_crush_rule: module refactor
Guillaume Abrioux [Fri, 2 Jun 2023 19:00:35 +0000 (21:00 +0200)]
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>
19 months agoadd CentOS stream 9 support
Guillaume Abrioux [Fri, 2 Jun 2023 09:34:15 +0000 (11:34 +0200)]
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>
20 months agodoc: project deprecation
Guillaume Abrioux [Tue, 16 Jan 2024 13:54:13 +0000 (14:54 +0100)]
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>
21 months agoDo not pass NoneType as argument to ceph_crush_rule
Dmitriy Rabotyagov [Wed, 25 Oct 2023 11:47:19 +0000 (13:47 +0200)]
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>
23 months 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>
23 months 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>
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>
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>
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>
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>
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>
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>
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>
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>
2 years agotests: updates functional tests with new image
Guillaume Abrioux [Fri, 2 Jun 2023 08:09:30 +0000 (10:09 +0200)]
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>
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>
2 years agopurge: remove /var/lib/ceph
Guillaume Abrioux [Wed, 31 May 2023 13:17:55 +0000 (13:17 +0000)]
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>
2 years agoupdate: fix mgr upgrade issue
Guillaume Abrioux [Sun, 22 Jan 2023 07:21:31 +0000 (08:21 +0100)]
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>
2 years agotests: test nfs-ganesha with stable repos
Guillaume Abrioux [Sat, 21 Jan 2023 08:33:29 +0000 (09:33 +0100)]
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>
2 years agoosd: drop filestore support
Guillaume Abrioux [Fri, 20 Jan 2023 18:14:35 +0000 (19:14 +0100)]
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>
2 years agotests: introduce `ceph_status` fixture
Guillaume Abrioux [Fri, 20 Jan 2023 10:07:31 +0000 (11:07 +0100)]
tests: introduce `ceph_status` fixture

This avoids some duplicated code in various test_*_is_up() tests

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2 years agoiscsi: do not use ceph/daemon entrypoint
Guillaume Abrioux [Wed, 5 Oct 2022 02:00:20 +0000 (04:00 +0200)]
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>
2 years agorbdmirror: do not use ceph/daemon entrypoint
Guillaume Abrioux [Tue, 27 Sep 2022 14:53:24 +0000 (16:53 +0200)]
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>
2 years agonfs: do not use ceph/daemon entrypoint
Guillaume Abrioux [Fri, 23 Sep 2022 12:31:04 +0000 (14:31 +0200)]
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>
2 years agorgw: do not use daemon
Guillaume Abrioux [Mon, 19 Sep 2022 14:10:39 +0000 (16:10 +0200)]
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>
2 years agomds: do not use ceph/daemon entrypoint
Guillaume Abrioux [Mon, 19 Sep 2022 12:49:35 +0000 (14:49 +0200)]
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>
2 years agoosd: do not use ceph/daemon entrypoint
Guillaume Abrioux [Mon, 19 Sep 2022 03:20:23 +0000 (05:20 +0200)]
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>
2 years agomgr: do not use ceph/daemon entrypoint
Guillaume Abrioux [Sat, 17 Sep 2022 01:48:45 +0000 (03:48 +0200)]
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>
2 years agomon: do not use ceph/daemon entrypoint
Guillaume Abrioux [Thu, 30 Jun 2022 21:11:10 +0000 (23:11 +0200)]
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>
2 years agolibrary: fix a bug in ceph_key module
Guillaume Abrioux [Sat, 24 Sep 2022 05:15:36 +0000 (07:15 +0200)]
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>
2 years agoVagrantfile: address deprecation warning
Guillaume Abrioux [Sat, 24 Sep 2022 06:38:31 +0000 (08:38 +0200)]
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>
2 years agoceph_key: drop unused result parameter
Guillaume Abrioux [Wed, 31 May 2023 11:03:42 +0000 (11:03 +0000)]
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>
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>
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>
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>
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>
2 years agoRemove all vagrant boxes
Teoman ONAY [Thu, 16 Mar 2023 21:27:57 +0000 (22:27 +0100)]
Remove all vagrant boxes

Remove all existing vagrant boxes to prevent vagrant from using
older ones

Signed-off-by: Teoman ONAY <tonay@ibm.com>
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>
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>
2 years agoshrink-osd fails when the OSD container is stopped
Teoman ONAY [Wed, 1 Mar 2023 20:26:54 +0000 (21:26 +0100)]
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>
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>
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 agoosd: drop filestore support
Guillaume Abrioux [Wed, 15 Feb 2023 03:35:01 +0000 (04:35 +0100)]
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>
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>
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>
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>
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>
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 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
2 years agocommon: v18/reef kickoff
Guillaume Abrioux [Fri, 7 Oct 2022 08:49:00 +0000 (10:49 +0200)]
common: v18/reef kickoff

align with ceph/ceph/pull/47458 since it has been merged.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2 years agodoc: update README-MULTISITE.md
quangln94 [Fri, 7 Oct 2022 14:23:47 +0000 (16:23 +0200)]
doc: update README-MULTISITE.md

I update the parameters according to this PR: #7315
In addition, where rgw_zonesecondary: True and rgw_zonemaster: False,

I change rgw_zonegroupmaster to be False as those lines below:

https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L396
https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L417
https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L520
https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L535
Add note at line 205 here https://github.com/ceph/ceph-ansible/blob/main/README-MULTISITE.md?plain=1#L205

Signed-off-by: quangln94 <ngocquang.ptit@gmail.com>
2 years agoUpdate ceph_ec_profile.py
quangln94 [Fri, 23 Sep 2022 07:32:04 +0000 (14:32 +0700)]
Update ceph_ec_profile.py

This parameters "crush_root" unsupported for (ceph_ec_profile) module: crush_root
Follow this issue: https://github.com/ceph/ceph-ansible/issues/7306