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>
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>
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>
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>
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>
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>
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>
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>
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>
404 is the status code returned by rgw when it is serving website api. This needs to be consider as a healthy status for rgw.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
this drops the following parameters:
- monitor_address_block
- monitor_interface
- monitor_address
The monitor address will be automatically set from `public_network` parameter.
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
* Make common params of container args in a var to avoid duplication
* The /var/lib/ceph/crash mount was missing after 637ca81c9c
* 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>
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>
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>
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>
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>
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>
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>
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>