Commit Graph

2948 Commits (mergify/bp/stable-7.0/pr-7613)

Author SHA1 Message Date
Guillaume Abrioux 21026ac75f common: configure epel repository (rockylinux)
this is needed in order to make some libraries available when
running on RockyLinux

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 867be7c35c)
2024-09-02 10:40:06 +02:00
Teoman ONAY 1462f571a5 vagrant-box atomic-host -> stream9
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit f1b67bd4d9)
2024-08-05 11:09:44 +02:00
Guillaume Abrioux 97d4372e60 container-common: drop image fetching logic
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 1a97696d9b)
2024-03-11 15:48:19 +01:00
Seena Fallah 2b711f7601 ceph-handler: remove tempdir when all handlers are done
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-11 15:48:19 +01:00
Seena Fallah c2f6f0c621 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>
(cherry picked from commit 7142321bc3)
2024-03-11 15:48:19 +01:00
Guillaume Abrioux 66e32b895c 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>
(cherry picked from commit e433d2b955)
2024-03-11 15:48:19 +01:00
Dmitriy Rabotyagov 310ce9e441 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>
(cherry picked from commit b610297554)
2024-03-11 15:48:19 +01:00
Guillaume Abrioux eb8904e795 core: bump to ansible 2.15
2.12 is EOL since May 2023.

Let's bump to 2.15.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-11 15:48:19 +01:00
Teoman ONAY b82a6ed1a7 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:30 +02:00
Teoman ONAY 3f15340909 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:30 +02:00
insatomcat 539fee84a1 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:43 +02:00
Teoman ONAY 91c57b662d 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:10 +02:00
Seena Fallah dadddae8cd 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 f90d5d8b4c)
2023-06-01 15:00:42 +02:00
Seena Fallah 35b8598b78 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:33 +01:00
Seena Fallah 7206037c5d 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:33 +01:00
Seena Fallah bd66017d46 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-17 14:29:22 +01:00
Seena Fallah fcbb49c1ac 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-17 14:23:07 +01:00
René Højbjerg Larsen 8d6fdbebd6 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 14:17:00 +01:00
Teoman ONAY 6b900d8db0 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-16 22:00:17 +01:00
Teoman ONAY 557ae2695b Fixes selinux relabeling issue for nfs container
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit c1b541f69e)
2023-03-16 22:00:17 +01:00
Teoman ONAY 16a50cedc2 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-03-16 22:00:17 +01:00
Lorenz Bausch 3ce3dd6bcc 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:24:15 +01:00
Guillaume Abrioux b0fd037ce7 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-15 14:50:46 +01:00
Teoman ONAY d5c597df91 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:24 +02:00
Guillaume Abrioux 85420051db 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 45c2f0a90a)
2022-10-20 13:59:21 +02:00
Guillaume Abrioux 2dc6490135 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 93df3e53ab)
2022-10-20 13:59:21 +02:00
Seena Fallah fea7044f46 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:03 +02:00
Seena Fallah 813e155351 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:03 +02:00
Seena Fallah 9b5cdbb069 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:03 +02:00
Seena Fallah 5a36d3dbe5 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:03 +02:00
Guillaume Abrioux 320c01ece1 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:08 +02:00
Guillaume Abrioux 54fdb86805 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:41 +02:00
Seena Fallah 0baeac1949 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:05 +02:00
Guillaume Abrioux fcbc5df605 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:30 +02:00
Seena Fallah 5d1ed62037 ceph-crash: add support cluster name
add cluster name to CEPH_ARGS env var to support custom cluster name
this can change as an arg to ceph-crash when https://github.com/ceph/ceph/pull/47836 released

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit d374e634ed)
2022-09-08 09:27:35 +02:00
Guillaume Abrioux a6ae67dc9c config: use osd_memory_target value from ceph_conf_overrides if defined
otherwise it's impossible to override `osd_memory_target`
via `ceph_conf_overrides`.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f19dcb266a)
2022-08-11 11:10:24 +02:00
Guillaume Abrioux fbeba9c394 config: do not always set _osd_memory_target
When 'osd_memory_target' is overridden in ceph_conf_overrides.
The task that sets the fact `osd_memory_target` in the ceph-config role
should be skipped.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675#c11

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e2076e439b)
2022-08-08 20:34:54 +02:00
Guillaume Abrioux c3e8414202 dashboard: update grafana_dashboard_version default value
on stable-7.0 this variable should have the default value 'quincy'

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 06:44:51 +02:00
Guillaume Abrioux 16f9a1ec8b iscsi: replace 'master' references
replace with 'main' instead

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 06:44:51 +02:00
Guillaume Abrioux 78f85e6e84 rbd-mirror: follow up on recent rbd-mirror refactor
- ensure /var/lib/ceph/bootstrap-rbd-mirror exists
- always install ceph-base on rbdmirror nodes (otherwise, ceph-crash
  isn't present)

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 041435e1e3)
2022-08-03 06:44:51 +02:00
Teoman ONAY d4962c3793 Set ceph_rbd_mirror_pool default value
Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 0c50bfac98)
2022-08-03 06:44:51 +02:00
Teoman ONAY 083264af0b Playbook fails when using --limit to install new MDS
"set_fact container_run_cmd" is not set when using --limit on MDS as facts
were not run on first MON.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2111017

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit cef1636f70)
2022-08-03 06:44:51 +02:00
Guillaume Abrioux e4c89d3b45 rbd-mirror: major refactor
- Use config-key store to add cluster peer.
- Support multiple pools mirroring.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b74ff6e22c)
2022-08-01 15:34:58 +02:00
Guillaume Abrioux b338edfffd config: followup on 8a5628b51
Add missing `--cluster {{ cluster }}` on task
`set osd_memory_target` in the main.yml file of the
ceph-config role.
Also it moves the task after ceph configuration file is actually written.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit cf4a430d0b)
2022-07-12 09:24:01 +02:00
Guillaume Abrioux 9efa4f2774 config/osd: various fixes
- sets `osd_memory_target` per osd host.
- ceph.conf refactor (osd)

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 8a5628b516)
2022-07-11 14:19:49 +02:00
Guillaume Abrioux 2054c44214 config: fix indentation in main.yml
For consistency and readability.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 5283fa6e96)
2022-07-11 14:19:49 +02:00
Guillaume Abrioux d07615398c facts: follow up on f6b49f78
f6b49f78a9 changed a call back to `ipwrap`
This fixes this.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a99812aa92)
2022-07-06 03:18:50 +02:00
Guillaume Abrioux 5ffcf30954 facts: fix set_radosgw_address.yml
use `include_tasks` instead of `import_tasks`.
Given that with `import_tasks` statements are preprocessed
and the tasks that defines it hasn't been run yet, it will fail
and complain like following:

```
The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute '_interface'
```

Using `include_tasks` instead fixes this.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 434793e2fe)
2022-07-06 02:05:27 +02:00
Guillaume Abrioux 5847fc5366 facts: fix deployments with different net interface names
Deployments when radosgws don't have the same names for
network interface.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2095605

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f6b49f78a9)
2022-07-06 02:05:27 +02:00
Guillaume Abrioux ebf35fd191 common: fix a typo
s/of/or ..

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2099828#c25

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 2e823b117e)
2022-07-03 07:27:33 +02:00