]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
4 years agotests/rgw: use json format output for user info v5.0.9
Dimitri Savineau [Thu, 26 Aug 2021 20:45:07 +0000 (16:45 -0400)]
tests/rgw: use json format output for user info

If the radosgw user already exists then we need to have the output in json
format because we are expecting to load the output with json.loads()
Otherwise we have pytest failure like:

```console
self = <json.decoder.JSONDecoder object at 0x7fa2f00a5fd0>, s = '', idx = 0

    def raw_decode(self, s, idx=0):
        """Decode a JSON document from ``s`` (a ``str`` beginning with
        a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.

        This can be used to decode a JSON document from a string that may
        have extraneous data at the end.

        """
        try:
            obj, end = self.scan_once(s, idx)
        except StopIteration as err:
>           raise JSONDecodeError("Expecting value", s, err.value) from None
E           json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```

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

4 years agotests/rgw: add timeout 5s to radosgw-admin command
Dimitri Savineau [Tue, 10 Aug 2021 15:57:01 +0000 (11:57 -0400)]
tests/rgw: add timeout 5s to radosgw-admin command

If the radosgw daemons aren't up and running correctly (like not registered
in the servicemap or the OSD are down) then the radosgw-admin will hang
forever.
Jenkins will kill the jobs after 3h but we don't want to wait until this global
timeout.
Adding the timeout 5 command to the radosgw-admin commands (which is already
present on other ceph calls) allows the job to fail earlier.

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

4 years agocontainer: explicitly pull monitoring images
Dimitri Savineau [Thu, 19 Aug 2021 18:08:06 +0000 (14:08 -0400)]
container: explicitly pull monitoring images

We don't pull the monitoring container images (alertmanager, prometheus,
node-exporter and grafana) in a dedicated task like we're doing for the
ceph container image.
This means that the container image pull is done during the start of the
systemd service.
By doing this, pulling the image behind a proxy isn't working with podman.

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

4 years agoiscsi: don't set default value for trusted_ip_list
Guillaume Abrioux [Wed, 18 Aug 2021 11:23:44 +0000 (13:23 +0200)]
iscsi: don't set default value for trusted_ip_list

It restricts access to the iSCSI API.
It can be left empty if the API isn't going to be access from outside the
gateway node

Even though this seems to be a limited use case, it's better to leave it
empty by default than having a meaningless default value.

We could make this variable mandatory but that would be a breaking
change. Let's just add a logic in the template in order to set this
variable in the configuration file only if it was specified by users.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1994930
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 6802b8dddd7f8d1f1c47f4eb3b7dd6a6a48820dc)

4 years agocontainers: introduce target systemd unit
Guillaume Abrioux [Tue, 10 Aug 2021 13:21:19 +0000 (15:21 +0200)]
containers: introduce target systemd unit

This adds ceph-*.target systemd unit files support for containerized
deployments.
This also fixes a regression introduced by PR #6719 (rgw and nfs systemd
units not getting purged)

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

4 years agoroles: remove leftover from pr #4319
Guillaume Abrioux [Tue, 10 Aug 2021 13:34:50 +0000 (15:34 +0200)]
roles: remove leftover from pr #4319

pr #4319 introduced some uesless `become: true` on systemd tasks.

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

4 years agoVagrantfile: fallback on 'varant_variables.yml.sample'
Guillaume Abrioux [Tue, 10 Aug 2021 14:11:37 +0000 (16:11 +0200)]
Vagrantfile: fallback on 'varant_variables.yml.sample'

When using a vagrant command from the root directory of the repo, it
throws an error if no 'vagrant_variables.yml' file is present.

```
Message: Errno::ENOENT: No such file or directory @ rb_sysopen - /home/guits/workspaces/ceph-ansible/vagrant_variables.yml
```

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

4 years agoupdate: gather facts only one time
Guillaume Abrioux [Tue, 17 Aug 2021 14:07:03 +0000 (16:07 +0200)]
update: gather facts only one time

this play doesn't need to gather facts from localhost

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

4 years agoceph-mon: do not log monitor keyring
Dimitri Savineau [Wed, 11 Aug 2021 20:01:08 +0000 (16:01 -0400)]
ceph-mon: do not log monitor keyring

We don't want to display the keyring in the ansible log.

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

4 years agocommon: do not log keyring secret
Guillaume Abrioux [Mon, 9 Aug 2021 12:57:33 +0000 (14:57 +0200)]
common: do not log keyring secret

let's not display any keyring secret by default in ansible log.

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

4 years agoceph-dashboard: fix TLS cert openssl generation
Dimitri Savineau [Mon, 9 Aug 2021 14:33:40 +0000 (10:33 -0400)]
ceph-dashboard: fix TLS cert openssl generation

With OpenSSL version prior 1.1.1 (like CentOS 7 with 1.0.2k), the -addext
doesn't exist.
As a solution, this uses the default openssl.cnf configuration file as a
template and add the subjectAltName in the v3_ca section. This temp openssl
configuration file is removed after the TLS certificate creation.
This patch also move the run_once statement at the block level.

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

4 years agodashboard: subj_alt_names fact refactor
Guillaume Abrioux [Thu, 5 Aug 2021 13:00:49 +0000 (15:00 +0200)]
dashboard: subj_alt_names fact refactor

the current way the variable is built results in:

```
2021-08-03 04:18:23,020 - ceph.ceph - INFO - ok: [ceph-sangadi-4x-indpt6-node1-installer] => changed=false
  ansible_facts:
    subj_alt_names: |-
      subjectAltName=ceph-sangadi-4x-indpt6-node1-installer/subjectAltName=10.0.210.223/subjectAltName=ceph-sangadi-4x-indpt6-node1-installersubjectAltName=ceph-sangadi-4x-indpt6-node2/subjectAltName=10.0.210.252/subjectAltName=ceph-sangadi-4x-indpt6-node2/
```

which is incorrect.

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

4 years agoFixes typo in rgw-add-users-buckets playbook
VasishtaShastry [Fri, 6 Aug 2021 10:40:19 +0000 (16:10 +0530)]
Fixes typo in rgw-add-users-buckets playbook

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

4 years agopodman pids.max default value is 2048, docker's one is 4096 which are
Teoman ONAY [Tue, 3 Aug 2021 14:06:53 +0000 (16:06 +0200)]
podman pids.max default value is 2048, docker's one is 4096 which are
sufficient for the default value (512) of rgw thread pool size.
But if its value is increased near to the pids-limit value,
it does not leave place for the other processes to spawn and run within
the container and the container crashes.

pids-limit set to unlimited regardless of the container engine.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1987041
Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 9b5d97adb95a788bc1fdedbba562a9c71a1808be)

4 years agoinfra: use dedicated variables for balancer status
Dimitri Savineau [Tue, 3 Aug 2021 15:58:49 +0000 (11:58 -0400)]
infra: use dedicated variables for balancer status

The balancer status is registered during the cephadm-adopt, rolling_update
and swith2container playbooks. But it is also used in the ceph-handler role
which is included in those playbooks too.
Even if the ceph-handler tasks are skipped for rolling_update and
switch2container, the balancer_status variable is erased with the skip task
result.

play1:
  register: balancer_status
play2:
  register: balancer_status <-- skipped
play3:
  when: (balancer_status.stdout | from_json)['active'] | bool

This leads to issue like:

The conditional check '(balancer_status.stdout | from_json)['active'] | bool'
failed. The error was: Unexpected templating type error occurred on
({% if (balancer_status.stdout | from_json)['active'] | bool %} True
{% else %} False {% endif %}): expected string or buffer.

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

4 years agolibrary: exit on user creation failure
Dimitri Savineau [Wed, 28 Jul 2021 16:27:00 +0000 (12:27 -0400)]
library: exit on user creation failure

When the ceph dashboard user creation fails then the issue is hidden
as we don't check the return code and don't print the error message
in the module output.

This ends up with a failure on the ceph dashboard set roles command saying
that the user doesn't exist.

By failing on the user creation, we will have an explicit explaination of
the issue (like weak password).

Closes: #6197
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 17784624e0fb02080e14d15b4105ef92a78ec8c4)

4 years agoosds: use osd pool ls instead of osd dump command
Dimitri Savineau [Wed, 28 Jul 2021 18:54:15 +0000 (14:54 -0400)]
osds: use osd pool ls instead of osd dump command

The ceph osd pool ls detail command is a subset of the ceph osd dump
command.

$ ceph osd dump --format json|wc -c
10117
$ ceph osd pool ls detail --format json|wc -c
4740

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

4 years agorolling_update: get ceph version when mons exist
Dimitri Savineau [Thu, 29 Jul 2021 16:26:33 +0000 (12:26 -0400)]
rolling_update: get ceph version when mons exist

eec3878 introduced a regression for upgrade scenarios where there's no
monitor nodes at all (like ganesha standalone, external clients, etc..)

TASK [get the ceph release being deployed] ************************************
task path: infrastructure-playbooks/rolling_update.yml:121
Thursday 29 July 2021  15:55:29 +0000 (0:00:00.484)       0:00:15.802 *********
fatal: [client0]: FAILED! =>
  msg: '''dict object'' has no attribute ''mons'''

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

4 years agoinfrastructure-playbooks: Get Ceph info in check mode
Benoît Knecht [Mon, 26 Jul 2021 15:10:19 +0000 (17:10 +0200)]
infrastructure-playbooks: Get Ceph info in check mode

In the `set osd flags` block, run the Ceph commands that gather information
from the cluster (and don't make any changes to it) even when running in check
mode.

This allows the tasks that depend on the variables set by those tasks to
succeed in check mode.

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

4 years agoceph-handler: Fix osd handler in check mode
Benoît Knecht [Mon, 26 Jul 2021 11:03:56 +0000 (13:03 +0200)]
ceph-handler: Fix osd handler in check mode

Run the Ceph commands that only gather information (without making any changes
to the cluster) when running Ansible in check mode.

This allows the tasks that depend on the variables set by those tasks to
succeed in check mode.

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

4 years agolibrary: remove unused module import
Dimitri Savineau [Tue, 27 Oct 2020 16:14:19 +0000 (12:14 -0400)]
library: remove unused module import

Move the import at the top of the file and remove unused module import.

- E402 module level import not at top of file
- F401 'xxxx' imported but unused

This also removes the '# noqa E402' statement from the code.

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

4 years agolibrary: flake8 ceph-ansible modules
Wong Hoi Sing Edison [Thu, 17 Jun 2021 16:18:07 +0000 (00:18 +0800)]
library: flake8 ceph-ansible modules

This commit ensure all ceph-ansible modules pass flake8 properly.

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
(cherry picked from commit beda1fe77381fbacb40fb75e5c06f36fbbad4a4a)

4 years agoceph-defaults: update grafana dashboards source
Dimitri Savineau [Tue, 27 Jul 2021 14:58:00 +0000 (10:58 -0400)]
ceph-defaults: update grafana dashboards source

We currently download the grafana dashboars from the ceph@master branch
for all ceph releases.
We should use the right ceph branch according to the ceph release.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoceph-defaults: add missing grafana dashboards
Dimitri Savineau [Tue, 27 Jul 2021 14:30:30 +0000 (10:30 -0400)]
ceph-defaults: add missing grafana dashboards

The radosgw-sync-overview and rbd-details grafana dashboars were missing
from the list.

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

4 years agoupdate: check the ceph release
Guillaume Abrioux [Mon, 26 Jul 2021 09:19:36 +0000 (11:19 +0200)]
update: check the ceph release

Check early which Ceph release is going to be deployed and fail if it
doesn't correspond to the ceph-ansible version being used.

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

4 years agoalertmanager: allow disable dashboard tls verify
Dimitri Savineau [Fri, 23 Jul 2021 14:27:55 +0000 (10:27 -0400)]
alertmanager: allow disable dashboard tls verify

When using self-signed/untrusted CA certificates, alertmanager displays
an error in logs. With this commit this should make those messages
disappear.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1936299
Co-authored-by: Guillaume Abrioux <gabrioux@redhat.com>
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 9f77b929d145512e0d8886b96caf6047c5072a68)

4 years agopurge: support osd_auto_discovery v5.0.8
Guillaume Abrioux [Wed, 21 Jul 2021 21:16:59 +0000 (23:16 +0200)]
purge: support osd_auto_discovery

This adds a task that zaps by osd id so we can support the scenario
where osds were deployed with `osd_auto_discovery` is true.

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

4 years agopurge: merge playbooks
Guillaume Abrioux [Tue, 13 Jul 2021 16:48:42 +0000 (18:48 +0200)]
purge: merge playbooks

This refactor merges the two playbooks so we only have to maintain 1
playbook.
(Symlink the old purge-container-cluster.yml playbook for backward
 compatibility).

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

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)