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>
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
c3fae04b8d234c84e4a5c7ca4a390ecfa3d1c1d5)
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
aa64747cd111e37988849dbd20600b3b1fc049fa)
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
665601bf8aae1b98e1e3efdb91c1f1914f0316ae)
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
590e57cc1b9a79ced7a9208db8bf8eaf43d3f320)
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
09b8f7b2ea4deb35228adb948b50976ad1854870)
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
7664da58da56d871a9304ea6bec8d0e30ba9b02a)