Commit Graph

6082 Commits (d9e2de1d1d84fee877707460328a232512680025)
 

Author SHA1 Message Date
Seena Fallah 225ae38ee2 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>
2023-03-17 16:05:34 +01:00
Seena Fallah 80b1ed9d4a 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>
2023-03-17 16:05:34 +01:00
Teoman ONAY e8de8e29d6 Remove all vagrant boxes
Remove all existing vagrant boxes to prevent vagrant from using
older ones

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-17 08:48:15 +01:00
René Højbjerg Larsen 09590c0683 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>
2023-03-16 13:14:07 +01:00
Lorenz Bausch 2f5e21b631 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>
2023-03-15 16:14:44 +01:00
Teoman ONAY 49da07df68 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>
2023-03-15 16:00:22 +01:00
Teoman ONAY d25fa6757c 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-15 15:51:00 +01:00
Teoman ONAY c1b541f69e Fixes selinux relabeling issue for nfs container
Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-13 20:03:21 +01:00
Teoman ONAY 0622cde67f 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-03 15:44:19 +01:00
Guillaume Abrioux 15b91cef90 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>
2023-03-03 15:00:29 +01:00
Seena Fallah 1f7b3ac5a3 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>
2023-02-28 14:50:49 +01:00
Seena Fallah 32b5678511 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>
2023-02-22 15:06:37 +01:00
Teoman ONAY 637ca81c9c 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>
2023-02-19 01:03:03 +01:00
Guillaume Abrioux e47288ef6c 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>
2023-02-07 10:56:06 +01:00
Teoman ONAY c39bbc3dea 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-01-18 14:13:03 +01:00
Mario Codeniera e5ad1953dc Check first the OSD storage file rather than after created
Signed-off-by: Mario Codeniera <M.Codeniera@massey.ac.nz>
2023-01-16 10:36:29 +01:00
Guillaume Abrioux e55ca01881 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>
2022-12-13 14:38:58 +01:00
Guillaume Abrioux c3fae04b8d 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>
2022-11-14 15:45:00 +01:00
Teoman ONAY 590e57cc1b 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>
2022-10-20 13:59:08 +02:00
Guillaume Abrioux 45c2f0a90a 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>
2022-10-20 10:40:49 +02:00
Guillaume Abrioux 93df3e53ab 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>
2022-10-20 10:40:49 +02:00
Guillaume Abrioux a158d0d53b 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>
2022-10-17 14:10:42 +02:00
Guillaume Abrioux 7664da58da 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>
2022-10-15 07:07:47 +02:00
John Karasev 72ff93f685 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>
2022-10-10 11:00:58 +02:00
Seena Fallah 8b983cfdbf 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>
2022-10-10 10:58:47 +02:00
Seena Fallah 613773b2a3 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>
2022-10-10 10:58:47 +02:00
Seena Fallah 57b0890aff 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>
2022-10-10 10:58:47 +02:00
Seena Fallah ac4dfa7526 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>
2022-10-10 10:58:47 +02:00
Guillaume Abrioux 371592a8fb common: v18/reef kickoff
align with ceph/ceph/pull/47458 since it has been merged.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-10-07 16:39:56 +02:00
quangln94 d60c486cc4 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>
2022-10-07 16:29:00 +02:00
quangln94 e0ed0939b7 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
2022-10-05 08:38:07 +02:00
Guillaume Abrioux aa64747cd1 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>
2022-09-14 09:32:39 +02:00
Guillaume Abrioux 665601bf8a 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>
2022-09-12 15:29:41 +02:00
Seena Fallah 68d9973cf9 ceph-crash: add missing \ in service file
regression by: d374e634ed

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2022-09-08 09:25:02 +02:00
Seena Fallah d374e634ed 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>
2022-09-07 16:42:57 +02:00
Guillaume Abrioux b40e4bfe60 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>
2022-08-16 15:39:25 +02:00
Guillaume Abrioux f19dcb266a 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>
2022-08-10 16:32:21 +02:00
Guillaume Abrioux e2076e439b 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>
2022-08-08 09:46:03 +02:00
Guillaume Abrioux 82e0ae7e75 rolling_update: fix rbd-mirror play
There's no service to stop/mask when the node being upgraded is
a 'primary node' only (1 way replication).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 13:09:42 +02:00
Guillaume Abrioux 50b7a12ad8 tests: isolate ansible collections
When Ansible collections are installed, they should be isolated.
Otherwise, they will be shared in any scheduled job.
This might cause issues when running different branch versions for instance.
This also replace `ANSIBLE_CALLBACK_WHITELIST` with `ANSIBLE_CALLBACK_ENABLED` as it's
going to be deprecated in Ansible 2.15.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 13:09:42 +02:00
Guillaume Abrioux 30c7e88d81 adopt: fix placement update calls for rgw
The commands called here are not built correctly.
This commit fixes it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2058038#c27

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-02 12:51:14 +02:00
Guillaume Abrioux 7ce972e715 flake8: fix 'error E275 missing whitespace after keyword'
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-02 10:35:33 +02:00
Guillaume Abrioux a12f67e138 tests: skip rbdmirror tests on non-secondary daemon
the daemon is not running on the 'primary' daemon.
Therefore, these tests are not needed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-02 10:35:33 +02:00
Guillaume Abrioux 89ddc193fc tests: set no_log_on_ceph_key_tasks=false
In order to not have to always reproduce it when a failure shows up in the CI
having the failure logged can make us save some time.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-02 10:35:33 +02:00
Guillaume Abrioux 041435e1e3 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>
2022-08-02 10:35:33 +02:00
Teoman ONAY 0c50bfac98 Set ceph_rbd_mirror_pool default value
Signed-off-by: Teoman ONAY <tonay@redhat.com>
2022-08-02 10:35:33 +02:00
Teoman ONAY cef1636f70 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>
2022-08-02 10:35:33 +02:00
Guillaume Abrioux a9cb444be1 purge-dashboard: check for legacy group name 'grafana-server'
When using the legacy group name 'grafana-server', this playbook will run but
won't remove properly all monitoring resources as expected.

Fixes: #7265

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-07-29 18:21:33 +02:00
Guillaume Abrioux b74ff6e22c rbd-mirror: major refactor
- Use config-key store to add cluster peer.
- Support multiple pools mirroring.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-07-29 17:33:25 +02:00
Guillaume Abrioux 3a8daafbe8 doc: update readthedoc settings
This is needed to enforce the python version.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-07-29 17:02:08 +02:00