Commit Graph

5924 Commits (rhcs-5.3)
 

Author SHA1 Message Date
Teoman ONAY 71505368da cephadm-adopt: Fixes binding network for alertmanager
Alertmanager was bind to default * network instead of grafana_server_addr
as it was before. Now on if grafana_server_addr is defined, it will be
bind to that network.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-09-24 16:15:52 +02:00
Teoman ONAY da25b1d3c6 ceph_orch_apply: fix yaml error when multiple rgw deployed
ceph orch ls rgw --format=yaml returns multiple documents
when multiple rgw are installed, this was not handled
correctly.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-08-23 14:31:23 +02:00
Teoman ONAY a44327510e cephadm-adopt: fix "Update the placement of radosgw hosts" task
networks was at the wrong level in the spec file. Failed with
"got an unexpected keyword argument 'networks'"

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-08-13 10:22:08 +02:00
Teoman ONAY bfab47c047 cephadm-adopt: fix "Update the placement of radosgw hosts" task
spec file template conditions were incorrect

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit e85060cb67)
2024-08-07 17:49:18 +02:00
Teoman ONAY 5cd25ea8c1 ceph_orch_spec: Add ceph orch apply spec feature
Add new module ceph_orch_spec which applies ceph spec files.
This feature was needed to bind extra mount points to the RGW
container (/etc/pki/ca-trust/).

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2262133

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-05-21 15:20:13 +02:00
Teoman ONAY 40bdbb78a3 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>
2023-08-21 14:12:24 +02:00
Teoman ONAY 8b5aa118ed 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 bc54290718)
2023-08-16 10:58:15 +02:00
Guillaume Abrioux 60c978ed41 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>
2023-07-11 21:17:35 +02:00
David Galloway 3abd57bcb2 whitelist->allowlist
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Signed-off-by: David Galloway <dgallowa@redhat.com>
2023-07-11 21:17:35 +02:00
Teoman ONAY f78bbc5699 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-07-11 21:17:35 +02:00
Teoman ONAY c0cbbbf7e8 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-07-11 21:17:35 +02:00
Teoman ONAY 08516098ed 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-07-11 21:17:35 +02:00
Teoman ONAY 79af63895b Fixes selinux relabeling issue for nfs container
Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-07-11 21:17:35 +02:00
Lukas Bezdicka af9a807393 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>
2023-05-02 16:05:05 +02:00
Guillaume Abrioux dcb690bab2 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 c3fae04b8d)
2022-11-14 15:45:39 +01:00
Guillaume Abrioux 74922b075d 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-11-09 09:57:05 +01:00
Guillaume Abrioux 4947c87d2e 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-11-09 09:57:01 +01:00
Teoman ONAY 524d6e95b5 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-20 16:21:37 +02:00
Guillaume Abrioux f80232361b 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 09b8f7b2ea)
2022-10-17 10:32:15 +02:00
Guillaume Abrioux e34a58b541 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 7664da58da)
2022-10-15 07:08:50 +02:00
Guillaume Abrioux b4c9112591 ansible: require 2.9 for downstream
RHCS 5.3 supports 2.9 only.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-23 01:27:12 +02:00
Guillaume Abrioux d7bf53a576 facts: set is_rgw_instances_defined from configure_dashboard
When we come from configure_dashboard.yml, this fact should be set if
`rgw_instances` is defined in group_vars/host_vars. Otherwise, the next
task that set the fact `rgw_instances` will be run as it will assume it
wasn't user defined.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-11 16:59:34 +02:00
Guillaume Abrioux 84a81a139f 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:39 +02:00
Guillaume Abrioux 2e09456468 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 13:01:48 +02:00
Guillaume Abrioux e30fdeba3c 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>
(cherry picked from commit a9cb444be1)
2022-08-04 07:10:27 +02:00
Guillaume Abrioux 783b9235e5 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>
(cherry picked from commit 30c7e88d81)
2022-08-04 07:10:09 +02:00
Guillaume Abrioux 763affc711 tests: do not use dev repo (rbdmirror)
use stable repositories for rbdmirror scenarios

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 6f1554c88f replace 'master' references with 'main'
Because the branch'master' was renamed 'main'

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 99c07843be flake8: fix 'error E275 missing whitespace after keyword'
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7ce972e715)
(cherry picked from commit 82dc265e2f)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux dd16e49517 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>
(cherry picked from commit a12f67e138)
(cherry picked from commit 022199745e)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 3ca2d7d205 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>
(cherry picked from commit 89ddc193fc)
(cherry picked from commit 6ef470ef0d)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 32b84e7e8e 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)
(cherry picked from commit b634fb1cb3)
2022-08-04 06:52:06 +02:00
Teoman ONAY 593325e525 Set ceph_rbd_mirror_pool default value
Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 0c50bfac98)
(cherry picked from commit 8a0b5a9571)
2022-08-04 06:52:06 +02:00
Teoman ONAY 508269e273 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)
(cherry picked from commit 80dc46d31f)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux d167b0aa16 doc: update readthedoc settings
This is needed to enforce the python version.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3a8daafbe8)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux e15f4741ef 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-04 06:52:06 +02:00
Guillaume Abrioux b354533a12 replace 'master' references with 'main'
The branch 'master' has been renamed 'main'.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 17:08:54 +02:00
Sven Kieske 99344e61f6 fixes: https://github.com/ceph/ceph-ansible/issues/7261
Signed-off-by: Sven Kieske <s.kieske@mittwald.de>
2022-08-03 14:13:50 +02:00
Guillaume Abrioux 7425edd7f6 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:17 +02:00
Guillaume Abrioux 0162fdc30d 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:20:00 +02:00
Guillaume Abrioux ed6f13c9d6 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:20:00 +02:00
Teoman ONAY 0981158e03 Refresh /etc/ceph/osd json files content before zapping the disks
If the physical disk to device path mapping has changed since the
last ceph-volume simple scan (e.g. addition or removal of disks),
a wrong disk could be deleted.

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

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 64e08f2c0b)
2022-07-11 13:43:37 +02:00
Guillaume Abrioux 392ddec2d7 backup-and-restore: use archive/unarchive approach
current approach is too complex and causes too many issues permission
issues.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit dffe7b47de)
2022-07-07 17:14:53 +02:00
Guillaume Abrioux e1e5cb52f1 update: fix a typo
s/pre-quincy/pre-pacific
s/quincy-only/pacific-only

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-07-06 13:09:19 +02:00
Guillaume Abrioux 62c42cd06b 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 09:11:09 +02:00
Guillaume Abrioux ab9e8aeb12 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 09:11:09 +02:00
Guillaume Abrioux f5020f6130 backup-and-restore: various fixes
- preserve mode and ownership on main directories
- make sure the directories are well present prior to restoring files.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 047af3a3f6)
2022-07-05 14:45:46 +02:00
Guillaume Abrioux a4f8567e62 tests: add yes_i_know=true in tox-shrink_osd.ini
main branch requires it. Otherwise the playbook won't run.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e223630cf0)
2022-07-05 10:32:38 +02:00
Guillaume Abrioux 84260c2c7d tests: drop shrink_osd from tox.ini
shrink_osd has its own tox config file (tox-shrink_osd.ini)

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 6623f34679)
2022-07-05 10:32:38 +02:00
Guillaume Abrioux 8d011b4ab8 Revert "upgrade: block upgrade when rgw multisite is active"
This reverts commit 51bc8cb636.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7d848fa19e)
2022-07-03 07:28:14 +02:00