Commit Graph

6117 Commits (main)
 

Author SHA1 Message Date
Dmitriy Rabotyagov 9405558d03 Don't try to set devices fact when osd_auto_discovery was skipped
Right now, under certain OS and Ansible versions, ie Rocky Linux and
ansible-core 2.17, `devices_check` variable is getting defined even if
task was skipped.

That results in set_fact to fail, as resulting variable has no `results`
key in it.

Structure of such variable looks like that:
```
"devices_check": {
    "changed": false,
    "false_condition": "osd_auto_discovery | default(False) | bool",
    "skip_reason": "Conditional result was False",
    "skipped": true
}
```

Checking for task not being skipped solves such issues.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
2024-10-28 23:21:45 +01:00
Teoman ONAY c9ffb2e70c pytest: python-version typo
Fixes python-version

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-10-16 16:57:57 +02:00
Teoman ONAY 31be495061 cephadm-adopt: Alertmanager placement count missing
Regression from #7576. Alertmanager placement count was missing
after migration to ceph_orch_apply module

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-10-14 10:33:53 +02:00
Teoman ONAY b41b7bf869 cephadm-adopt: custom prometheus port lost after adoption
If a custom Prometheus port was used before adoption, it was not
taken into account and default 9095 was set instead. Now custom
port is re-applied.

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

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-10-14 10:33:53 +02:00
Amir Nikpour e4ab45d756 cephadm-adopt: add cephadm ssh config option
Add task to set customized ssh config for cephadm

Signed-off-by: Amir Nikpour <amnik.free@gmail.com>
2024-08-25 11:01:35 +02:00
Teoman ONAY 823700bc1b 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 13:56:29 +02:00
Seena Fallah c1f1c1e900 radosgw_user: support caps on user
Supporting adding/removing caps on the user.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-08-20 08:41:11 +02:00
Seena Fallah d6ac0cc120 ceph-pool: add support updating crush rule of the pool
Support updating crush rule of the pool via crush rule name.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-08-13 11:17:36 +02:00
Seena Fallah be9b458524 devices: test devices before collecting on auto discovery
In some scenarios with NVMe, a device might be identified by
Ansible but could actually be a multipath device rather than an
actual device. We need to exclude these as Ceph cannot create
OSDs on them.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-08-13 11:17:05 +02:00
Teoman ONAY 2c88ecc784 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 09:51:27 +02:00
Teoman ONAY 0bf3398774 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-08-05 11:29:39 +02:00
Teoman ONAY e85060cb67 cephadm-adopt: fix "Update the placement of radosgw hosts" task
spec file template conditions were incorrect

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-07-12 16:42:07 +02:00
Seena Fallah 4fa9057a3e ceph-handler: use haproxy maintenance for rgw restarts
RGW currently restarts without waiting for existing connections to
close. By adjusting the HAProxy weight before the restart, we can
ensure that no active connections are disrupted during the restart
process.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-06-27 09:42:39 +02:00
Guillaume Abrioux 59198f5bcd Revert "nfs-ganesha support removal"
This reverts commit 675667e1d6.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-06-20 11:54:36 +02:00
Teoman ONAY 5a44fbeaa6 ceph_orch_apply: fix idempotency
As is idempotency does not work as the ceph orch
output does contain more attributes than the expected
spec.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-05-29 16:58:37 +02:00
Teoman ONAY f6fd034e7e 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 10:04:47 +02:00
Seena Fallah 52365166a4 ceph-key: check for key existance on absent state
check if the key is exists before removal.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-21 09:39:41 +02:00
Seena Fallah 7016c6df3c ceph-container: use ceph user and group
Use --setuser and --setgroup to ceph to run daemons with ceph user.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-17 08:32:08 +02:00
Seena Fallah 779a13eb31 tests: collect mons and mgrs logs
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-17 08:32:08 +02:00
Seena Fallah 65c84a3583 ceph-container: keep run dir permission consistent
Make it the same as "Create ceph initial directories" task
and make owner and group 167 for containers so they can write
with ceph user.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-17 08:32:08 +02:00
Teoman ONAY ca191fad2a Fix cephadm-adopt test scenario
Fixes cephadm-adopt test scenario by configuring rbd application
on test and test2 pools. Otherwise cephadm-adopt failed at task
"Check pools have an application enabled"

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2024-05-16 04:02:24 +02:00
Seena Fallah 1121e6d98a ceph-rgw: introduce rgw zone to the name schema
This is needed by ceph-exporter as it is parsing the socket by the number of dots.
Although the rgw_zone variable is only using for constructing the client name
and has nothing to do with multisiting.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-13 13:26:02 +02:00
Seena Fallah 878cce5b48 radosgw_user: handle non-existence user on check mode
Set return code to 0 on check mode when the user doesn't exists and it will fail the module.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-06 09:37:12 +02:00
Guillaume Abrioux 4f6641fe5c ceph-mon: move the ceph_config call to ceph-mon role
ba7eb62a1b broke deployments where
mgrs are not collocated with mons.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-04-11 18:46:34 +02:00
Guillaume Abrioux ba7eb62a1b ceph-config: move `ceph_config` module call to ceph-config role
so you don't have to implement a similar play on your own
if not using main (sample) playbooks.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-04-11 16:16:16 +02:00
Seena Fallah fb13ee35bf ceph_volume: set changed to false to readonly actions
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-04-08 20:14:48 +02:00
Seena Fallah 326e2e4d6b ceph_crush: add support check mode
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-04-08 20:14:48 +02:00
Guillaume Abrioux c4b3520730 ceph-mon: fix admin keyring creation task
Although custom cluster name support was dropped, it breaks ceph-volume
functional testing as it uses "test" as cluster name.
The plan is to make ceph-volume use "ceph" but for now it's easier to
address the issue in this task.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-04-04 14:16:54 +02:00
Guillaume Abrioux 8ebff2124d common: install python3-packaging on centos el8
ceph-volume has a dependency on `python3-packaging` which is available
in PowerTools repo.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-04-04 14:16:54 +02:00
Seena Fallah a45defd386 ceph_pool: add support check mode
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-04-03 16:31:43 +02:00
Seena Fallah 9f9b32e9e6 ceph-handler: allow 405 as a success restart for rgw
If rgw is configured to only operate admin api - this is the status code it will return for GET on no path.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-04-03 16:31:08 +02:00
Guillaume Abrioux f5e7f47a2e github: update stale github workflow
`ubuntu-18.04` environment is deprecated, let's switch to ubuntu-22.04.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-21 09:43:33 +01:00
Guillaume Abrioux bab034024c handlers: move tmpdir removal
This moves the tmpdir removal tasks to main playbook.
The handlers in Ansible are too restrictive and doesn't work
quite well for our use case.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 20:22:34 +01:00
Guillaume Abrioux 675667e1d6 nfs-ganesha support removal
nfs-ganesha support will be implemented in a separate playbook.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 20:22:34 +01:00
Guillaume Abrioux 1ebddeccb3 vagrantfile: drop grafana group
this has never been used for real, let's drop this

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 20:22:34 +01:00
Guillaume Abrioux d9e2de1d1d remove legacy task
this was for backward compatibility concerns, it's time to drop this
task.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 20:22:34 +01:00
Guillaume Abrioux 51cfba376c tests: update vagrant_variables.yml
This updates all vagrant_variables.yml to bump the default
image from centos/stream8 to centos/stream9

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 16:26:55 +01:00
Guillaume Abrioux a305dc79a9 tests: set ceph_repository: community
dev_setup.yml playbook takes care of changing prior to running
tests.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 16:26:55 +01:00
Guillaume Abrioux 0f341cc68b rgw_profiles: update rgw-keystone profiles
See issue #7458

Fixes: #7458

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 10:54:07 +01:00
Guillaume Abrioux ef5a09d0e0 container-engine: enforce docker for Ubuntu os family
This enforces docker.io and docker respectively for
`container_package_name` and `container_service_name` by default
for Ubuntu distribution.

Fixes: #7496

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 10:34:56 +01:00
Guillaume Abrioux 867be7c35c 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>
2024-03-20 09:30:34 +01:00
Guillaume Abrioux c42c0c3558 tests: various changes
some minor changes

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2024-03-20 09:30:34 +01:00
Seena Fallah ed4b6e71b3 ceph_config: compare current vals in low
Check the current value and asked both in low case as the asked one might be in capital as it should be.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-18 18:11:43 +01:00
Seena Fallah fa2eb2532e ceph_config: add support config remove
Add support rm action.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-18 18:11:19 +01:00
Seena Fallah a7e881439e radosgw_user: add support check mode
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-16 20:18:47 +01:00
Seena Fallah a95726c409 radosgw_user: parse system and admin as boolean
The returned payload from rgw has them as a boolean. By having them as a string it would always report a change and try to modify the user.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-16 20:18:47 +01:00
Seena Fallah beb046cba9 radosgw_zonegroup: add support check mode
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-16 20:18:15 +01:00
Seena Fallah e8d34b6ee6 radosgw_zonegroup: parse master as boolean
The returned payload from rgw has is_master as a boolean. By having master as a string it would always report a change and try to modify the zonegroup.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-16 20:18:15 +01:00
Seena Fallah f0b4cc3f0d ceph_ec_profile: make int params str
Ceph return them as string so in comparision it would always fail

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-16 20:17:45 +01:00
Seena Fallah bbc1ba5c05 ceph-osd: introduce ec profile creation
RGW Pools can now use the existing ec profiles and rules created by ceph-osd role.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-03-16 20:17:45 +01:00