]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
4 years agopurge: drop variables from 'hosts' sections
Guillaume Abrioux [Tue, 13 Jul 2021 15:11:22 +0000 (17:11 +0200)]
purge: drop variables from 'hosts' sections

Those variables are useless given this is not possible to override them.
Let's replace them with the hardcoded name instead.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 6b50401d0c2021fe691ee4f2be083b059d991c8b)

4 years agomultisite: use node fqdn for endpoints when https
Dimitri Savineau [Fri, 9 Jul 2021 21:24:09 +0000 (17:24 -0400)]
multisite: use node fqdn for endpoints when https

When the rgw_multisite_proto variable is set to https then we shoudn't use
the IP address in the zone endpoints list but the node FQDN to match the
TLS certificate CN.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1965504
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit ad05a0816048a69adba0e9b27683ed799e3c40bd)

4 years agocommon: remove unnecessary run_once statements
Dimitri Savineau [Tue, 20 Jul 2021 15:38:44 +0000 (11:38 -0400)]
common: remove unnecessary run_once statements

1303611 introduced tasks for disabling the pg_autoscaler on pools and
the balancer but thoses tasks are already executed on the first monitor
node so we don't need to add the run_once statement.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 738fa9428a3c0c9ed0dd1aec566e807ad072daad)

4 years agocommon: fix py2 pool_list from_json when skipped
Dimitri Savineau [Tue, 20 Jul 2021 19:53:48 +0000 (15:53 -0400)]
common: fix py2 pool_list from_json when skipped

When using python 2 and the task with a loop is skipped then it generates
an error.

Unexpected templating type error occurred on
({{ (pool_list.stdout | from_json)['pools'] }}): expected string or buffer

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit cf6e33346e09e680d9b69cafdc24fdd8801cdbf4)

4 years agocommon: disable/enable pg_autoscaler
Guillaume Abrioux [Mon, 14 Jun 2021 16:01:41 +0000 (18:01 +0200)]
common: disable/enable pg_autoscaler

The PG autoscaler can disrupt the PG checks so the idea here is to
disable it and re-enable it back after the restart is done.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 13036115e2862fc8ca9c04e1379fd793e0e7036a)

4 years agoceph-mgr: move mgr module list to common
Dimitri Savineau [Thu, 15 Jul 2021 19:38:07 +0000 (15:38 -0400)]
ceph-mgr: move mgr module list to common

Populating the ceph_mgr_modules list in the mgr_modules doesn't make sense
since that file is only executed if the list isn't empty or we're using the
dashboard.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit cd06e7c046b3e56920b1f9bdc1907429382bee5c)

4 years agoceph-nfs: allow overriding NFS_CORE_PARAM
Dimitri Savineau [Thu, 15 Jul 2021 20:24:28 +0000 (16:24 -0400)]
ceph-nfs: allow overriding NFS_CORE_PARAM

We already have config override variables for existing block (like
ganesha_ceph_export_overrides, ganesha_log_overrides, etc...) or a
global one (ganesha_conf_overrides) but redefining the NFS_CORE_PARAM
block in that variable will erase all previous values (currently only
Bind_Addr).

ganesha_core_param_overrides: |
        Enable_UDP = false;
        NFS_Port = 2050;

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1941775
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 9817d29543099ca640ce8b23da2ab9f26179cba5)

4 years agopurge: reindent playbook
Guillaume Abrioux [Tue, 13 Jul 2021 12:26:40 +0000 (14:26 +0200)]
purge: reindent playbook

This commit reindents the playbook.
Also improve readability by adding an extra line between plays.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 60aa70a12820835412835063972c34a1c93cac7d)

4 years agolib/ceph-volume: support zapping by osd_id
Guillaume Abrioux [Fri, 9 Jul 2021 09:07:08 +0000 (11:07 +0200)]
lib/ceph-volume: support zapping by osd_id

This commit adds the support for zapping an osd by osd_id in the
ceph_volume module.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 70f1d6e2cd9ed4abb4db599f9faa816703430d80)

4 years agorolling_update: check quorum state before upgrade
Dimitri Savineau [Fri, 9 Jul 2021 20:09:49 +0000 (16:09 -0400)]
rolling_update: check quorum state before upgrade

If one a the monitor is out of the quorum then nothing prevents the upgrade
playbook to run.
We only check if we have at least three monitor nodes but we should also
check if those monitor nodes are correctly present in the quorum.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1952571
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 97148dd58c77a84aff1235dc9be3cb8c9d73cc09)

4 years agoSensitive key data now hidden in output log
Neelaksh Singh [Thu, 20 May 2021 06:04:02 +0000 (02:04 -0400)]
Sensitive key data now hidden in output log

Fixes: #6529
Signed-off-by: Neelaksh Singh <neelaksh48@gmail.com>
(cherry picked from commit d18a9860cde2981bcd71198f152924cc6cf05932)

4 years agoupdate: fail the playbook if straw2 conversion failed
Guillaume Abrioux [Fri, 9 Jul 2021 14:29:09 +0000 (16:29 +0200)]
update: fail the playbook if straw2 conversion failed

It's better to fail the playbook so the user is aware the straw2
migration has failed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c396122ad9acda19462c7da363696e174b8162d1)

4 years agoupdate: followup on pr #6689
Guillaume Abrioux [Fri, 9 Jul 2021 07:19:52 +0000 (09:19 +0200)]
update: followup on pr #6689

add mising 'osd' command.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 4eb4268deea262d09898d21fa815912439cecfa5)

4 years agoupdate: convert straw bucket
Guillaume Abrioux [Thu, 8 Jul 2021 19:57:13 +0000 (21:57 +0200)]
update: convert straw bucket

After an upgrade, the presence of straw buckets will produce the
following warning (HEALTH_WARN):

```
crush map has legacy tunables (require firefly, min is hammer)
```

because straw bucket is a firefly feature it needs to be converted to
straw2.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1967964
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit eee576477c73d2585a824814e3b4d85f0c12e8fd)

4 years agodashboard: remove "certificate is valid for" error
Guillaume Abrioux [Tue, 6 Jul 2021 12:18:51 +0000 (14:18 +0200)]
dashboard: remove "certificate is valid for" error

When deploying dashboard with ssl certificates generated by
ceph-ansible, we enforce the CN to 'ceph-dashboard' which can makes
application such alertmanager complain like following:

`err="Post https://mgr0:8443/api/prometheus_receiver: x509: certificate is valid for ceph-dashboard, not mgr0" context_err="context deadline exceeded"`

The idea here is to add alternative names matching all mgr/mon instances
in the certificate so this error won't appear in logs.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1978869
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 72a0336c71cee8bd0a375ac47cb45a292844edc8)

4 years agoinfra: add playbook to purge dashboard/monitoring
Dimitri Savineau [Mon, 5 Jul 2021 18:07:05 +0000 (14:07 -0400)]
infra: add playbook to purge dashboard/monitoring

The dashboard/monitoring stack can be deployed via the dashboard_enabled
variable. But there's nothing similar if we can to remove that part only
and keep the ceph cluster up and running.
The current purge playbooks remove everything.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1786691
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 8e4ef7d6da5bc73d47be93281ecae2b3c6fa826f)

4 years agodashboard: support dedicated network for the dashboard
Guillaume Abrioux [Mon, 5 Jul 2021 15:49:26 +0000 (17:49 +0200)]
dashboard: support dedicated network for the dashboard

This introduces a new variable `dashboard_network` in order to support
deploying the dashboard on a different subnet.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1927574
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f4f73b61972f416db9fe6ec305de282094581e07)

4 years agoceph-crash: add install checkpoint
Dimitri Savineau [Mon, 5 Jul 2021 14:11:57 +0000 (10:11 -0400)]
ceph-crash: add install checkpoint

The ceph crash insatll checkpoint callback was missing in the main
playbooks.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 993d06c4d92f8a0be6441dd7647a27d6b58bcb9b)

4 years agocephadm_adopt: add any_errors_fatal on play
Guillaume Abrioux [Mon, 28 Jun 2021 12:12:40 +0000 (14:12 +0200)]
cephadm_adopt: add any_errors_fatal on play

Add any_errors_fatal: true in cephadm-adopt playbook.
We should stop the playbook execution when a task throws an error.
Otherwise it can lead to unexpected behavior.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1976179
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3b804a61dd532ee5516c036d5156d9a110c0dced)

4 years agoceph-facts: move device facts to its own file
Dimitri Savineau [Wed, 16 Dec 2020 19:18:08 +0000 (14:18 -0500)]
ceph-facts: move device facts to its own file

Instead of reusing the condition 'inventory_hostname in groups[osds]'
on each device facts tasks then we can move all the tasks into a
dedicated file and set the condition on the import_tasks statement.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit d704b05e52d10910cd68c49033933bd7e6ded268)

4 years agoceph-validate: check logical volumes
Dimitri Savineau [Tue, 15 Dec 2020 22:34:34 +0000 (17:34 -0500)]
ceph-validate: check logical volumes

We currently don't check if the logical volume used in lvm_volumes list
for either bluestore data/db/wal or filestore data/journal exist.
We're only doing this on raw devices for batch scenario.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 55bca07cb612b766bc099e14e0a5661185a7f9a6)

4 years agoceph-validate: check db/journal/wal devices too
Dimitri Savineau [Tue, 15 Dec 2020 20:08:00 +0000 (15:08 -0500)]
ceph-validate: check db/journal/wal devices too

When using dedicated devices for db/journal/wal objecstore with
ceph-volume lvm batch then we should also validate that those devices
exist and don't use a gpt partition table in addition of the devices
and lvm_volume.data variables.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 808e7106dec5f3f7a743fe343ba3023c9390a1ba)

4 years agoceph-validate: use root device from ansible_mounts
Dimitri Savineau [Tue, 15 Dec 2020 20:04:57 +0000 (15:04 -0500)]
ceph-validate: use root device from ansible_mounts

Instead of using findmnt command to find the device associated to the
root mount point then we can use the ansible_mounts fact.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 7e50380f7fc101bf3533fff2d9c3082a59c54399)

4 years agoceph-validate: do not resolve devices
Dimitri Savineau [Tue, 15 Dec 2020 20:02:59 +0000 (15:02 -0500)]
ceph-validate: do not resolve devices

This is already done in the ceph-facts role.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 0df99dda8d8c5e1e9ce4384b480401043eaad07e)

4 years agoceph-validate: check block presence first
Dimitri Savineau [Tue, 15 Dec 2020 20:00:28 +0000 (15:00 -0500)]
ceph-validate: check block presence first

Instead of doing two parted calls we can check first if the device exist
and then test the partition table.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 14d458b3b41ef5fe1ebdb8a70e52a65ff28b42f2)

4 years agoceph-validate: check devices from lvm_volumes
Dimitri Savineau [Tue, 15 Dec 2020 19:49:57 +0000 (14:49 -0500)]
ceph-validate: check devices from lvm_volumes

2888c08 introduced a regression as the check_devices tasks file was
only included based on the devices variable.
But that file also validate some devices from the lvm_volumes variable.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1906022
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit ac0342b72e045b96a31bed23c6baeceeecca7f23)

4 years agoprometheus: fix prometheus target url
Dimitri Savineau [Fri, 2 Jul 2021 13:13:43 +0000 (09:13 -0400)]
prometheus: fix prometheus target url

The prometheus service isn't binding on localhost.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1933560
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 1d56818658ebba36cce5f93fa4c5e2bcac310561)

4 years agopurge: add monitoring group in final cleanup play
Guillaume Abrioux [Fri, 2 Jul 2021 12:57:52 +0000 (14:57 +0200)]
purge: add monitoring group in final cleanup play

This adds the monitoring group in the "final cleanup play" so any cid
files generated are well removed when purging the cluster.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1974536
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 037d8cd05e012dd71a6c0aedbdfcf4aa1c15b992)

4 years agocontainer: set tcmalloc value by default
Dimitri Savineau [Tue, 29 Jun 2021 17:24:29 +0000 (13:24 -0400)]
container: set tcmalloc value by default

All ceph daemons need to have the TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
environment variable set to 128MB by default in container setup.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1970913
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 9758e3c51303faf89d5c489f04539e278c49477e)

4 years agoupdate: do not gather facts on each play
Guillaume Abrioux [Fri, 14 May 2021 14:24:55 +0000 (16:24 +0200)]
update: do not gather facts on each play

There's no benefit to gather facts again on each play in
rolling_update.yml

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 2c77d0094c9bab02dee32a144faf5168262049df)

4 years agoceph_key: handle error in a better way
Guillaume Abrioux [Mon, 7 Jun 2021 12:51:43 +0000 (14:51 +0200)]
ceph_key: handle error in a better way

When calling the `ceph_key` module with `state: info`, if the ceph
command called fails, the actual error is hidden by the module which
makes it pretty difficult to troubleshoot.

The current code always states that if rc is not equal to 0 the keyring
doesn't exist.

`state: info` should always return the actual rc, stdout and stderr.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1964889
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d58500ade01c7c4cc20b6bbaf8f5789d825b8d1b)

4 years agodashboard: Add new prometheus alert
Boris Ranto [Tue, 8 Jun 2021 07:43:23 +0000 (09:43 +0200)]
dashboard: Add new prometheus alert

It was requested for us to update our alerting definitions to include a
slow OSD Ops health check.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1951664
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 2491d4e004c7b162216bc17e2288f05d0b049a87)

4 years agotox: add ceph_stable_release to switch2container
Dimitri Savineau [Tue, 29 Jun 2021 15:30:37 +0000 (11:30 -0400)]
tox: add ceph_stable_release to switch2container

We need to set the ceph_stable_release variable during the switch2container
playbook.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoswitch2container: run ceph-validate role
Dimitri Savineau [Mon, 28 Jun 2021 14:46:40 +0000 (10:46 -0400)]
switch2container: run ceph-validate role

This adds the ceph-validate role before starting the switch to a containerized
deployment.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1968177
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit fc160b3be18edd1615ebb2b813a8468748f6d7d3)

4 years agoworkflows: test against 1 python version only
Guillaume Abrioux [Tue, 29 Jun 2021 23:24:36 +0000 (01:24 +0200)]
workflows: test against 1 python version only

Let's drop py3.6 and py3.7

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d191ba38d3bc47d4cff29a70f1386b0011a64543)

4 years agoworkflows: add signed-off check
Guillaume Abrioux [Tue, 29 Jun 2021 22:24:01 +0000 (00:24 +0200)]
workflows: add signed-off check

This adds a github workflow for checking the signed off line in commit
messages.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 8c09497567308bac75212be77cdb7b1928d2d9a2)

4 years agoworkflow: add group_vars/defaults checks
Guillaume Abrioux [Tue, 29 Jun 2021 19:06:37 +0000 (21:06 +0200)]
workflow: add group_vars/defaults checks

let's use github workflow for checking defaults values.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d71db816c6d393d6a42b934912f4f47a290c91fe)

4 years agoworkflow: add syntax check
Guillaume Abrioux [Tue, 29 Jun 2021 18:47:33 +0000 (20:47 +0200)]
workflow: add syntax check

This adds the ansible --syntax-check test in the ansible-lint workflow

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 5ed423ad8886a8985a4aa6424930f812864845bc)

4 years agotests: remove legacy file
Guillaume Abrioux [Mon, 28 Jun 2021 16:05:26 +0000 (18:05 +0200)]
tests: remove legacy file

This inventory isn't used anywhere.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 304d1cbb97e52f1546f98171ba7b7b6a658c85c1)

4 years agoshrink-mgr: modify existing mgr check
Guillaume Abrioux [Mon, 28 Jun 2021 18:16:03 +0000 (20:16 +0200)]
shrink-mgr: modify existing mgr check

Do not rely on the inventory aliases in order to check if the selected
manager to be removed is present.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1967897
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 26a7256c4cec17fc9bc20a239c112cbf8584be09)

4 years agocephadm-adopt/rgw: add host target in svc_id
Guillaume Abrioux [Tue, 29 Jun 2021 12:02:45 +0000 (14:02 +0200)]
cephadm-adopt/rgw: add host target in svc_id

If multi-realms were deployed with several instances belonging to the same
realm and zone using the same port on different nodes, the service id
expected by cephadm will be the same and therefore only one service will
be deployed. We need to create a service called
`<node>.<realm>.<zone>.<port>` to be sure the service name will be unique
and well deployed on the expected node in order to preserve backward
compatibility with the rgws instances that were deployed with
ceph-ansible.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1967455
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 31311b03eddfe8bffd9bcaf4c486a9c4f7273b0a)

4 years agocephadm-adopt: support rgw multisite adoption
Guillaume Abrioux [Wed, 23 Jun 2021 13:24:23 +0000 (15:24 +0200)]
cephadm-adopt: support rgw multisite adoption

We need to support rgw multisite deployments.
This commit makes the adoption playbook support this kind of deployment.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1967455
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit fc784fc44c456608b13cd54b258db0dc8aefaf62)

4 years agoContainer: Fixing service name lvm2-lvmetad v5.0.7
VasishtaShastry [Mon, 14 Jun 2021 12:08:51 +0000 (17:38 +0530)]
Container: Fixing service name lvm2-lvmetad

Playbook failing saying:

msg: 'Could not find the requested service lvmetad: host'

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1955040
Signed-off-by: VasishtaShastry <vipin.indiasmg@gmail.com>
(cherry picked from commit e49c38f8b7fc7c6c8ef06173874ece802d58102d)

4 years agomultisite: fix bug during switch2containers
Guillaume Abrioux [Wed, 16 Jun 2021 07:39:18 +0000 (09:39 +0200)]
multisite: fix bug during switch2containers

When running the switch-to-containers playbook with multisite enabled,
the fact "rgw_instances" is only set for the node being processed
(serial: 1), the consequence of that is that the set_fact of
'rgw_instances_all' can't iterate over all rgw node in order to look up
each 'rgw_instances_host'.

Adding a condition checking whether hostvars[item]["rgw_instances_host"]
is defined fixes this issue.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1967926
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 8279d14d328ad4bacafc01847f3ad9f385b4a3d5)

4 years agonfs: do no copy client.bootstrap-rgw when using mds
Guillaume Abrioux [Tue, 15 Jun 2021 09:02:05 +0000 (11:02 +0200)]
nfs: do no copy client.bootstrap-rgw when using mds

There's no need to copy this keyring when using nfs with mds

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 8dbee99882968005e744d3c8199dbfdea17495cc)

4 years agotests: use nfs/mds instead of nfs/rgw
Guillaume Abrioux [Mon, 14 Jun 2021 15:28:56 +0000 (17:28 +0200)]
tests: use nfs/mds instead of nfs/rgw

needed for the update job in stable-6.0 branch.
the upgrade from either nautilus or octopus to pacific isnt supported
when nfs/rgw is deployed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm-adopt: fix mgr placement hosts task
Guillaume Abrioux [Thu, 10 Jun 2021 13:12:41 +0000 (15:12 +0200)]
cephadm-adopt: fix mgr placement hosts task

When no `[mgrs]` group is defined in the inventory, mgr daemon are
implicitly collocated with monitors.
This task currently relies on the length of the mgr group in order to
tell cephadm to deploy mgr daemons.
If there's no `[mgrs]` group defined in the inventory, it will ask
cephadm to deploy 0 mgr daemon which doesn't make sense and will throw
an error.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1970313
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f9a73149a4da79db4942d98b366d686665d402d7)

4 years agorolling_update: fix mon+rgw/multisite collocation
Guillaume Abrioux [Thu, 10 Jun 2021 18:09:55 +0000 (20:09 +0200)]
rolling_update: fix mon+rgw/multisite collocation

When monitors and rgw are collocated with multisite enabled, the
rolling_update playbook fails because during the workflow, we run some
radosgw-admin commands very early on the first mon even though this is
the monitor being upgraded, it means the container doesn't exist since
it was stopped.

This block is relevant only for scaling out rgw daemons or initial
deployment. In rolling_update workflow, it is not needed so let's skip
it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1970232
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f7166cccbfa206f07a1ecca8d3eba0fe9d396c3a)

4 years agotests: use CentOS 8.4 image
Guillaume Abrioux [Tue, 8 Jun 2021 08:57:14 +0000 (10:57 +0200)]
tests: use CentOS 8.4 image

CentOS 8.4 vagrant image is available at https://cloud.centos.org
let's use it.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c2aaa96fc7d9a9b47774b51c533906004cd768bd)

4 years agodashboard: set cookie_secure in grafana v5.0.6
Guillaume Abrioux [Wed, 2 Jun 2021 09:05:07 +0000 (11:05 +0200)]
dashboard: set cookie_secure in grafana

When using grafana behind https `cookie_secure` should be set to `true`.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1966880
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 4daed1f137a4c61940abd9ae2db179fafd8de17a)

4 years agodashboard: fix typo introduced during backport
Guillaume Abrioux [Wed, 26 May 2021 10:04:20 +0000 (12:04 +0200)]
dashboard: fix typo introduced during backport

during backport of c8b92deba10c0b6e0ebcb0e31315b1e6174fdc0c the pattern
should have been s/monitoring_group_name/grafana_server_group_name/

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1964907
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: pull images from cloud.centos.org
Guillaume Abrioux [Tue, 25 May 2021 08:02:23 +0000 (10:02 +0200)]
tests: pull images from cloud.centos.org

temporary work around vagrant cloud issue which seems broken at the time
of pushing this commit.
Let's pull images from cloud.centos.org for now since vagrant cloud
hosted images return a 403 error.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 9efca34ac3363a0b942a0b1a49b6bc789d7c668a)

4 years agocrash: fix --limit deployments (containers)
Guillaume Abrioux [Tue, 25 May 2021 13:06:41 +0000 (15:06 +0200)]
crash: fix --limit deployments (containers)

ceph-crash deployments is broken when ceph-ansible playbook is called
with --limit in containerized contexts since we don't set
`container_exec_cmd` on the first monitor.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1964835
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoprometheus: enforce osd nodes in templates
Guillaume Abrioux [Tue, 25 May 2021 07:26:28 +0000 (09:26 +0200)]
prometheus: enforce osd nodes in templates

When osd nodes are collocated in the clients group (HCI context for
instance), the current logic will exclude osd nodes since they are
present in the client group.

The best fix would be to exclude clients node only when they are not
member of another group but for now, as a workaround, we can enforce
the addition of osd nodes to fix this specific case.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1947695
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 664dae0564d54d6df873b96264e59fa38c8280a4)

4 years agofs2bs: use match filter in selectattr()
Guillaume Abrioux [Tue, 25 May 2021 19:40:45 +0000 (21:40 +0200)]
fs2bs: use match filter in selectattr()

0990ae41099d8b9d678f546fc8790033f421711f changed the filter in
selectattr() from 'match' to 'equalto' but due to an incompatibility with
the Jinja2 version for python 2.7 on el7 we must stick to using 'match'
filter.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d6745e9cd9c2b5f0e20280e4ae0fe1b125287b0c)

4 years agofs2bs: fix wrong filter when setting osd_ids
Guillaume Abrioux [Tue, 25 May 2021 14:01:27 +0000 (16:01 +0200)]
fs2bs: fix wrong filter when setting osd_ids

using 'match' filter in that task will lead to bad behavior if I have
the following node names for instance:

- node1
- node11
- node111

with `selectattr('name', 'match', inventory_hostname)` it will match
'node1' along with 'node11' and 'node111'.

using 'equalto' filter will make sure we only match the target node.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1963066
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 0990ae41099d8b9d678f546fc8790033f421711f)

4 years agocontainer: conditionnally disable lvmetad
Guillaume Abrioux [Fri, 21 May 2021 11:25:25 +0000 (13:25 +0200)]
container: conditionnally disable lvmetad

Enabling lvmetad in containerized deployments on el7 based OS might
cause issues.
This commit make it possible to disable this service if needed.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1955040
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agogroup_vars: fix default values
Dimitri Savineau [Thu, 15 Apr 2021 14:24:22 +0000 (10:24 -0400)]
group_vars: fix default values

It looks like the generate_group_vars_sample.sh script wasn't executed
during previous PRs that were modifying the default values.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 83a8dd5a6a1f9ffe43b2a75d7b49775e34c58f24)

4 years agoMake sure the repo url contains the correct arch
Brad Hubbard [Fri, 19 Mar 2021 04:11:42 +0000 (14:11 +1000)]
Make sure the repo url contains the correct arch

We can end up with an arm only repo unless we are specific about the
architecture we require. Brings the deb code in line with the rpm
equivalent.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit 267cce9e8360fc8cb9c192fde2406e5dca724610)

4 years agoceph-rgw: fix pg_autoscale_mode for pool
Dimitri Savineau [Wed, 5 May 2021 14:39:02 +0000 (10:39 -0400)]
ceph-rgw: fix pg_autoscale_mode for pool

The pg_autoscale_mode for rgw pools introduced in 9f03a52 was wrong
and was missing a `value` keyword because `rgw_create_pools` is a
dict.

Fixes: #6516
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit a670982a38cf87cef87ebadf15d7e33fa7a6ff44)

4 years agonfs: get org.ganesha.nfsd.conf from container
Guillaume Abrioux [Thu, 6 May 2021 08:10:56 +0000 (10:10 +0200)]
nfs: get org.ganesha.nfsd.conf from container

Since we need to revert 33bfb10, this is an alternative to initial approach.
We can avoid maintaining this file since it is present in container
image. The idea is to simply get it from the image container and write
it to the host.

Fixes: #6501
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e6d8b058ba92fecdc78ee55b0dd8ce12c5120df0)

4 years agocephadm_adopt: create a 'nfs-ganesha' pool
Guillaume Abrioux [Mon, 26 Apr 2021 07:16:40 +0000 (09:16 +0200)]
cephadm_adopt: create a 'nfs-ganesha' pool

When migrating from a cluster with no MDS nodes deployed,
`{{ cephfs_data_pool.name }}` doesn't exist so we need to create a pool
for storing nfs export objects.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1950403
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit bb7d37fb6aac091ba0e9d7f6b7ad468e177d16b3)

4 years agocephadm_adopt: support nfs-ganesha adoption
Guillaume Abrioux [Tue, 6 Apr 2021 13:07:26 +0000 (15:07 +0200)]
cephadm_adopt: support nfs-ganesha adoption

This commit adds the nfs-ganesha adoption support in the
`cephadm-adopt.yml` playbook.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1944504
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a9220654f568a763142deb77f81cfc9f2a80f233)

4 years agonfs: remove legacy task
Guillaume Abrioux [Fri, 9 Apr 2021 08:02:16 +0000 (10:02 +0200)]
nfs: remove legacy task

This fact is never used, let's remove the task.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 0772b3d28d88ce49b0547e2afcdfd25cae084aea)

4 years agonfs: rename two tasks
Guillaume Abrioux [Fri, 9 Apr 2021 08:01:13 +0000 (10:01 +0200)]
nfs: rename two tasks

set the name of those tasks accordingly with the fact name being set.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d3d3d015286012b171d424c4a9cfe73ca0d3bd09)

4 years agocephadm_adopt: fix a typo
Guillaume Abrioux [Tue, 30 Mar 2021 12:30:29 +0000 (14:30 +0200)]
cephadm_adopt: fix a typo

This play doesn't nothing else than stopping/removing rgw daemons.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ee44d860723fb4e27cd0c186e518edd42aa8fd50)

4 years agovalidate: check virtual_ips variable
Guillaume Abrioux [Mon, 11 Jan 2021 09:06:08 +0000 (10:06 +0100)]
validate: check virtual_ips variable

This commit checks the length of `virtual_ips` doesn't exceed the length
of `groups[rgwloadbalancer_group_name]`.
It also ensure this variable is defined when
`groups[rgwloadbalancer_group_name]` contains at least one node.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ae196bf94631bd31b8fa663305de90072766b7f6)

4 years agoceph-rgw-loadbalancer: Fix keepalived master selection
Benoît Knecht [Mon, 1 Jun 2020 15:09:18 +0000 (17:09 +0200)]
ceph-rgw-loadbalancer: Fix keepalived master selection

While 2ca33641 fixed a bug in the way the `keepalived.conf.j2` template matched
hostnames to set the VRRP `MASTER`/`BACKUP` states, it also introduced a
regression in the case where `virtual_ips` is a list of more than one IP
address.

The previous behavior would result in each host in the `rgwloadbalancers` group
to be `MASTER` for one of the `virtual_ips`, but the new behavior caused the
first host to be `MASTER` for all the IP address in `virtual_ips`.

This commit restores the original behavior.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit 3116f464226d676cae9603503c3f8a2d57bcf055)

4 years agoupdate: fix ceph-crash stop task
Guillaume Abrioux [Tue, 4 May 2021 09:42:15 +0000 (11:42 +0200)]
update: fix ceph-crash stop task

This is a workaround for an issue in ansible.
When trying to stop/mask/disable this service in one task, the stop
didn't actually happen, the task doesn't fail but for some reason the
container is still present and running.
Then the task starting the service in the role ceph-crash fails because
it can't start the container since it's already running with the same
name.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1955393
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3db1ea7ec41475243559beff50b7011773c021e5)

4 years agoceph-osd: allow to use ceph_tcmalloc_max_total_thread_cache for bluestore
Seena Fallah [Wed, 14 Oct 2020 13:00:57 +0000 (16:30 +0330)]
ceph-osd: allow to use ceph_tcmalloc_max_total_thread_cache for bluestore

TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES is for both bluestore and filestore

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 41295f0ef661511953be607d44d82a80f5656d2e)

4 years agocephadm_adopt: fix ceph-crash migration
Guillaume Abrioux [Wed, 28 Apr 2021 13:11:25 +0000 (15:11 +0200)]
cephadm_adopt: fix ceph-crash migration

ceph-ansible leaves a ceph-crash container in containerized deployment.
It means we end up with 2 ceph-crash containers running after the
migration playbook is complete.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1954614
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 22c18e82f0340bcc63bba7f124cda8e04874b30b)

4 years agoceph-mon: Fix check mode for deploy monitor tasks
Benoît Knecht [Mon, 19 Oct 2020 09:23:59 +0000 (11:23 +0200)]
ceph-mon: Fix check mode for deploy monitor tasks

Skip the `get initial keyring when it already exists` task when both commands
whose `stdout` output it requires have been skipped (e.g. when running in check
mode).

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit 2437f145811dfce0ffa83bcf35e8fd711b27d3dd)

4 years agoConfig the monitoring stack components api urls using a VIP
Francesco Pantano [Fri, 9 Apr 2021 15:16:03 +0000 (17:16 +0200)]
Config the monitoring stack components api urls using a VIP

When dashboard_frontend_vip is provided, all the services should be
configured using the related VIP. A new VIP variable is added for
both prometheus and alertmanager: we're already able to properly
config the grafana vip using dashboard_frontend_vip variable.
This change adds the same variable for both prometheus and
alertmanager.

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
(cherry picked from commit 441651638d883b73c960363becae54096c8cee85)

4 years agoceph-rgw-loadbalancer: Fix rgw_ports fact
Benoît Knecht [Tue, 13 Apr 2021 11:57:44 +0000 (13:57 +0200)]
ceph-rgw-loadbalancer: Fix rgw_ports fact

The `set_fact rgw_ports` task was failing due to a templating error, because
`hostvars[item].rgw_instances` is a list, but it was treated as if it was a
dictionary.

Another issue was the fact that the `unique` filter only applied to the list
being appended to `rgw_ports` instead of the entire list, which means it was
possible to have duplicate items.

Lastly, `rgw_ports` would have been a list of integers, but the `seport` module
expects a list of strings.

This commit fixes all of the issues above, allowing the `ceph-rgw-loadbalancer`
role to work on systems with SELinux enabled.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit c07851347521b09c39b556818378767fc23f05e5)

4 years agoswitch-to-containers: only chown corresponding files
Guillaume Abrioux [Fri, 9 Apr 2021 07:24:05 +0000 (09:24 +0200)]
switch-to-containers: only chown corresponding files

When collocating daemons, if we chown all files under `/var/lib/ceph` it
can cause issues for the collocated daemons that wouldn't have been
migrated yet.

This commit makes the playbook chown only the files corresponding to the
daemon being migrated.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ddbc11c4a9c815ccc46fa52fd900f452c082612f)

4 years agocontainer/systemd: ensure /var/log/ceph exists
Guillaume Abrioux [Wed, 14 Apr 2021 11:41:59 +0000 (13:41 +0200)]
container/systemd: ensure /var/log/ceph exists

This adds a `ExecStartPre=-/usr/bin/mkdir -p /var/log/ceph` in all
systemd service templates for all ceph daemon.
This is specific to RHCS after a Leapp upgrade is done. Indeed, the
`/var/log/ceph` seems to be removed after the upgrade.
In order to work around this issue let's ensure the directory is present
before trying to start the containers with podman.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1949489
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit bab403b603feb8b7534dde65924699b370f4bc0d)

4 years agofs2bs: add a final play
Guillaume Abrioux [Tue, 13 Apr 2021 12:40:48 +0000 (14:40 +0200)]
fs2bs: add a final play

This removes the fact `skipped_nodes` which is useless when we run with
`--limit` since it gets reset when a new iteration is made.

Instead, let's print within a final play which node has been skipped
reusing the `skip_this_node` fact.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3d4267051f03c053dcd7d3f6f381988be0b2939d)

4 years agorbdmirror: add retries/until when configuring mirroring
Guillaume Abrioux [Mon, 12 Apr 2021 20:29:50 +0000 (22:29 +0200)]
rbdmirror: add retries/until when configuring mirroring

`configure_mirroring.yml` is called right after the daemon is started.
Sometimes, it can happen the first task in `configure_mirroring.yml` is
run while the daemon isn't yet ready, adding a retries/until on that
task should help to avoid causing the playbook to fail.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1944996
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b1e7e1ad0f517c345ade159961d8bb2cb13b1c22)

4 years agodocker2podman: skip some role imports from handler
Guillaume Abrioux [Fri, 9 Apr 2021 09:02:12 +0000 (11:02 +0200)]
docker2podman: skip some role imports from handler

when running docker-to-podman playbook, there's no need to call
`ceph-config` and `ceph-rgw` from the role `ceph-handler`.
It can even have side effects when coming from a baremetal cluster that
was previously migrated using the switch-to-containers playbook. Indeed
it might complain about missing .target systemd unit since they are
removed during that migration.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1944999
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 70f19be367390aeca43340711d380ce4825e02b5)

4 years agodocker2podman: add documentation/header
Guillaume Abrioux [Mon, 12 Apr 2021 07:25:25 +0000 (09:25 +0200)]
docker2podman: add documentation/header

this adds a small documentation in the header of the playbook in order
to explain what is the goal of this playbook.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 36b4227dcd79c2525102f8c3102771cfab7fe693)

4 years agoswitch_to_containers: support iscsigws migration
Guillaume Abrioux [Wed, 7 Apr 2021 12:36:28 +0000 (14:36 +0200)]
switch_to_containers: support iscsigws migration

This adds the iscsigws migration to containers.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=<bz-number>
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 2c74c2732113ca2ef3e98361c64e1748790828b0)

4 years agocommon: selinux tasks related refactor
Guillaume Abrioux [Thu, 1 Apr 2021 12:37:45 +0000 (14:37 +0200)]
common: selinux tasks related refactor

This moves some task from the `ceph-nfs` role in `ceph-common` since
some of them are needed in `ceph-rgwloadbalancer` role.
This avoids duplicated tasks.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d0442d81b9e8087ae8ec086798c68382680a7d73)

4 years agorgw-loadbalancers: add all rgw_ports to http_port_t type
Guillaume Abrioux [Thu, 1 Apr 2021 07:50:54 +0000 (09:50 +0200)]
rgw-loadbalancers: add all rgw_ports to http_port_t type

This adds all rgw ports to the http_port_t selinux type so it
allows haproxy to connect to those ports in order to avoid AVC.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1923890
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 6bbb90198b600b460a34faf322a9e36646b3689e)

4 years agorgw-loadbalancer: Update haproxy.cfg.j2
kalebskeithley [Tue, 9 Mar 2021 21:10:35 +0000 (16:10 -0500)]
rgw-loadbalancer: Update haproxy.cfg.j2

haproxy gets an AVC when configured to connect to port 8081

This commit adds a snippet regarding haproxy in a selinux environment

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1923890
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
(cherry picked from commit 9e7f22a071c0f7aecd98baeb73a1f90e290ef039)

4 years agocontainer/registry: use password from stdin
Dimitri Savineau [Tue, 12 Jan 2021 19:29:58 +0000 (14:29 -0500)]
container/registry: use password from stdin

Pass the password variable via stdin for the registry login
authentication.
This allows to remove the no_log statement and see the task output
without displaying the password value.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit a0e1a450d3cbdcd52a39bd11fd9b8287daabae1f)

4 years agorgw: supports pg_autoscale_mode option for pool creation
Guillaume Abrioux [Fri, 26 Mar 2021 16:03:44 +0000 (17:03 +0100)]
rgw: supports pg_autoscale_mode option for pool creation

Support enabling/disabling the pg autoscaler for rgw pools.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 9f03a527ba1294a7e050f87d78f7457ccad28d98)

4 years agodashboard: support prometheus storage.tsdb.retention.time parameter
Guillaume Abrioux [Tue, 30 Mar 2021 07:49:10 +0000 (09:49 +0200)]
dashboard: support prometheus storage.tsdb.retention.time parameter

This commit adds the parameter `--storage.tsdb.retention.time` to the
prometheus systemd unit template.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1928000
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b60c61ce450db5b755744c491b4dfd1ce70fb124)

4 years agonfs: set idmap config for Ceph-NFS
Guillaume Abrioux [Fri, 12 Mar 2021 15:27:12 +0000 (16:27 +0100)]
nfs: set idmap config for Ceph-NFS

Currently NFS Ganesha (ceph-nfs) consumes /etc/idmapd.conf, which
controls mapping of user/owner identities under NFSv4+. With
containerized service deployment, this file is an immutable part of the
container image and cannot be modified.

Here we provide group variables, and a taskk and templates for the
ceph-nfs role, to set the path of the idmap configuration file and
to make the most common adjustment to the contents of that file --
namely to set the 'Domain'. We default the path to /etc/ganesha/idmap.conf
so that we will not conflict with /etc/idmapd.conf on the controller nodes
where ganesha runs. NFSv4 clients, as used for example by the Cinder NFS
driver, consume /etc/idmapd.conf and may require different settings than
what is wanted for NFS Ganesha. Additionally, because we already bind
/etc/ganesha from the host into the ceph-nfs container, the file NFS
Ganesha consumes will no longer be an immutable part of the container.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1925646
Signed-off-by: Tom Barron tpb@dyncloud.net
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 2db2208e406df83806c264207e7df90623add154)

4 years agodefaults: add a comment about `igw_network`
Guillaume Abrioux [Fri, 26 Mar 2021 17:05:48 +0000 (18:05 +0100)]
defaults: add a comment about `igw_network`

This add a quick documentation in ceph-defaults about `igw_network`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c5728bdc6351fe985e17b095cbd5871ef673dc29)

4 years agoupdate: followup on 07029e1
Guillaume Abrioux [Fri, 26 Mar 2021 15:12:42 +0000 (16:12 +0100)]
update: followup on 07029e1

Playbook must fail anyway, the `rescue` block has been introduced for
unmasking the unit after the playbook has failed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e9ddb972fef5ab73e3a6f4f95f451ae223dcf64c)

4 years agodashboard: support igw nodes with dedicated subnet
Guillaume Abrioux [Tue, 2 Mar 2021 08:51:26 +0000 (09:51 +0100)]
dashboard: support igw nodes with dedicated subnet

This adds the possibility to deploy the dashboard with igw nodes using
a dedicated subnet.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1926170
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c33de174f1d8ec2d4b94a4322cdcdcf25262f1f6)

4 years agoPeer addition won't be skipped if remote is not in peer
VasishtaShastry [Wed, 24 Mar 2021 15:47:56 +0000 (21:17 +0530)]
Peer addition won't be skipped if remote is not in peer
rbd-mirroring is not configured as adding peer is getting skipped.
Peer addition should not get skipped if its not added already

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

Signed-off-by: VasishtaShastry <vipin.indiasmg@gmail.com>
(cherry picked from commit 006998e804f803f3d3a6767403803a9cad1ed9b0)

4 years agocephadm_adopt: fetch and write ceph minimal config
Guillaume Abrioux [Wed, 17 Mar 2021 09:07:27 +0000 (10:07 +0100)]
cephadm_adopt: fetch and write ceph minimal config

This commit makes the playbook fetch the minimal current ceph
configuration and write it later on monitoring nodes so `cephadm` can
proceed with the adoption.
When a monitoring stack was deployed on a dedicated node, it means no
`ceph.conf` file was written, `cephadm` requires a `ceph.conf` in order
to adopt the daemon present on the node.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1939887
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b445df047931e53b1fe047313333bd873673e982)

4 years agodocs: rgw multisite docs with new rgw_instances config
Ali Maredia [Mon, 25 Jan 2021 06:33:54 +0000 (01:33 -0500)]
docs: rgw multisite docs with new rgw_instances config

Docs reflect that each instance of `rgw_instances`
can now take rgw_zonemaster, rgw_zonesecondary,
rgw_zonegroupmaster, rgw_multisite_proto.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
(cherry picked from commit a59bc2da3b82fcc5d6ce413350c74654fecba381)

4 years agolibrary: drop ceph_facts
Guillaume Abrioux [Thu, 25 Mar 2021 02:49:11 +0000 (03:49 +0100)]
library: drop ceph_facts

This is never called in the playbook and seems unmaintained.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b01f16e8353ac261d8de34ef8b04e618c455492d)

4 years agoREADME-MULTISITE: fix typos
Ken Dreyer [Wed, 24 Mar 2021 20:44:52 +0000 (14:44 -0600)]
README-MULTISITE: fix typos

This commit fixes some typos in MULTISITE documentation.

Signed-off-by: Ken Dreyer <ktdreyer@redhat.com>
(cherry picked from commit 63a246db41195f842537473e1784f642ca6292cf)

4 years agoconvert some missed `ansible_*`` calls to `ansible_facts['*']`
Guillaume Abrioux [Thu, 25 Mar 2021 02:47:40 +0000 (03:47 +0100)]
convert some missed `ansible_*`` calls to `ansible_facts['*']`

This converts some missed calls to `ansible_*` that were missed in
initial PR #6312

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 0163ecc924ccec3e5da9a9c4cfb8ac4558ec33ef)

4 years agoclients: build filtered clients group early
Guillaume Abrioux [Tue, 16 Mar 2021 13:51:06 +0000 (14:51 +0100)]
clients: build filtered clients group early

when the group `_filtered_clients` is built, the order can change from
the original `clients` group which can cause issues since we run
`ceph-container-engine` on the first client only. It means later in the
playbook we can make call to the container CLI on a node where the
container engine wasn't installed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a1125727345b55b9e0e6898dd58f3ea009e0eccd)

4 years agoDisable facts by default in ansible.cfg
Alex Schultz [Thu, 11 Mar 2021 15:43:53 +0000 (08:43 -0700)]
Disable facts by default in ansible.cfg

As a continuation of a7f2fa73e63e69dba2e41aaac9732397eec437c9, this
change switches fact injection to off by default in the provided
ansible.cfg.

Signed-off-by: Alex Schultz <aschultz@redhat.com>
(cherry picked from commit db031a4993480ca987011630fa716f7e2ccda976)
(cherry picked from commit 5fa4ff5ed36e9df3215e54cb55ddc6e9905f486c)

4 years agoUse ansible_facts
Alex Schultz [Wed, 3 Mar 2021 14:43:50 +0000 (07:43 -0700)]
Use ansible_facts

It has come to our attention that using ansible_* vars that are
populated with INJECT_FACTS_AS_VARS=True is not very performant.  In
order to be able to support setting that to off, we need to update the
references to use ansible_facts[<thing>] instead of ansible_<thing>.

Related: ansible#73654
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1935406
Signed-off-by: Alex Schultz <aschultz@redhat.com>
(cherry picked from commit a7f2fa73e63e69dba2e41aaac9732397eec437c9)