]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
3 years agoSet ceph_rbd_mirror_pool default value
Teoman ONAY [Mon, 1 Aug 2022 14:28:23 +0000 (16:28 +0200)]
Set ceph_rbd_mirror_pool default value

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 0c50bfac98cd174bd785487574af54a468b82ae6)
(cherry picked from commit 8a0b5a9571df55cff3b4d4d5ab8b41d739a6e1cb)

3 years agoPlaybook fails when using --limit to install new MDS
Teoman ONAY [Mon, 1 Aug 2022 13:36:48 +0000 (15:36 +0200)]
Playbook fails when using --limit to install new MDS

"set_fact container_run_cmd" is not set when using --limit on MDS as facts
were not run on first MON.

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

3 years agodoc: update readthedoc settings
Guillaume Abrioux [Fri, 29 Jul 2022 14:50:03 +0000 (16:50 +0200)]
doc: update readthedoc settings

This is needed to enforce the python version.

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

3 years agorbd-mirror: major refactor
Guillaume Abrioux [Thu, 12 May 2022 15:22:54 +0000 (17:22 +0200)]
rbd-mirror: major refactor

- Use config-key store to add cluster peer.
- Support multiple pools mirroring.

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

3 years agoreplace 'master' references with 'main'
Guillaume Abrioux [Wed, 3 Aug 2022 15:08:54 +0000 (17:08 +0200)]
replace 'master' references with 'main'

The branch 'master' has been renamed 'main'.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agofixes: https://github.com/ceph/ceph-ansible/issues/7261
Sven Kieske [Thu, 28 Jul 2022 17:04:37 +0000 (19:04 +0200)]
fixes: https://github.com/ceph/ceph-ansible/issues/7261

Signed-off-by: Sven Kieske <s.kieske@mittwald.de>
3 years agoconfig: followup on 8a5628b51
Guillaume Abrioux [Mon, 11 Jul 2022 14:07:13 +0000 (16:07 +0200)]
config: followup on 8a5628b51

Add missing `--cluster {{ cluster }}` on task
`set osd_memory_target` in the main.yml file of the
ceph-config role.
Also it moves the task after ceph configuration file is actually written.

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

3 years agoconfig/osd: various fixes
Guillaume Abrioux [Mon, 11 Jul 2022 08:23:56 +0000 (10:23 +0200)]
config/osd: various fixes

- sets `osd_memory_target` per osd host.
- ceph.conf refactor (osd)

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

3 years agoconfig: fix indentation in main.yml
Guillaume Abrioux [Mon, 11 Jul 2022 08:03:53 +0000 (10:03 +0200)]
config: fix indentation in main.yml

For consistency and readability.

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

3 years agoRefresh /etc/ceph/osd json files content before zapping the disks
Teoman ONAY [Mon, 4 Jul 2022 09:54:41 +0000 (11:54 +0200)]
Refresh /etc/ceph/osd json files content before zapping the disks

If the physical disk to device path mapping has changed since the
last ceph-volume simple scan (e.g. addition or removal of disks),
a wrong disk could be deleted.

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

3 years agobackup-and-restore: use archive/unarchive approach
Guillaume Abrioux [Thu, 7 Jul 2022 15:03:34 +0000 (17:03 +0200)]
backup-and-restore: use archive/unarchive approach

current approach is too complex and causes too many issues permission
issues.

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

3 years agoupdate: fix a typo
Guillaume Abrioux [Wed, 6 Jul 2022 11:02:20 +0000 (13:02 +0200)]
update: fix a typo

s/pre-quincy/pre-pacific
s/quincy-only/pacific-only

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agofacts: fix set_radosgw_address.yml
Guillaume Abrioux [Tue, 5 Jul 2022 08:27:39 +0000 (10:27 +0200)]
facts: fix set_radosgw_address.yml

use `include_tasks` instead of `import_tasks`.
Given that with `import_tasks` statements are preprocessed
and the tasks that defines it hasn't been run yet, it will fail
and complain like following:

```
The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute '_interface'
```

Using `include_tasks` instead fixes this.

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

3 years agofacts: fix deployments with different net interface names
Guillaume Abrioux [Thu, 16 Jun 2022 14:53:14 +0000 (16:53 +0200)]
facts: fix deployments with different net interface names

Deployments when radosgws don't have the same names for
network interface.

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

3 years agobackup-and-restore: various fixes
Guillaume Abrioux [Tue, 5 Jul 2022 07:58:02 +0000 (09:58 +0200)]
backup-and-restore: various fixes

- preserve mode and ownership on main directories
- make sure the directories are well present prior to restoring files.

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

3 years agotests: add yes_i_know=true in tox-shrink_osd.ini
Guillaume Abrioux [Mon, 4 Jul 2022 13:17:30 +0000 (15:17 +0200)]
tests: add yes_i_know=true in tox-shrink_osd.ini

main branch requires it. Otherwise the playbook won't run.

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

3 years agotests: drop shrink_osd from tox.ini
Guillaume Abrioux [Mon, 4 Jul 2022 11:33:24 +0000 (13:33 +0200)]
tests: drop shrink_osd from tox.ini

shrink_osd has its own tox config file (tox-shrink_osd.ini)

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

3 years agoRevert "upgrade: block upgrade when rgw multisite is active"
Guillaume Abrioux [Tue, 28 Jun 2022 11:34:12 +0000 (13:34 +0200)]
Revert "upgrade: block upgrade when rgw multisite is active"

This reverts commit 51bc8cb63642b5b1ca460e79adf4649d92773aa4.

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

3 years agocommon: fix a typo
Guillaume Abrioux [Sun, 3 Jul 2022 05:17:58 +0000 (07:17 +0200)]
common: fix a typo

s/of/or ..

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2099828#c25
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 2e823b117ef5e6c7396517aa0eb2c8553bd33887)

3 years agobackup-and-restore: fix check on 'target_node' variable
Guillaume Abrioux [Wed, 29 Jun 2022 06:59:55 +0000 (08:59 +0200)]
backup-and-restore: fix check on 'target_node' variable

If the user doesn't pass a valid name (present in the inventory)
the playbook will fail like following:

```
fatal: [localhost -> {{ target_node }}]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: "hostvars['10.70.46.40']" is undefined
```

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

3 years agobackup-and-restore: fix check on 'mode' variable
Guillaume Abrioux [Wed, 29 Jun 2022 06:40:13 +0000 (08:40 +0200)]
backup-and-restore: fix check on 'mode' variable

Typical failure:

```
fatal: [localhost]: FAILED! =>
  msg: |-
    The conditional check 'mode not in ['backup', 'restore']' failed. The error was: error while evaluating conditional (mode not in ['backup', 'restore']): 'mode' is undefined
```

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

3 years agopurge: reset-failed ceph-crash
Guillaume Abrioux [Mon, 23 May 2022 07:49:10 +0000 (09:49 +0200)]
purge: reset-failed ceph-crash

This ensures we always reset-failed the ceph-crash service.

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

3 years agobackup-and-restore: fix a typo
Guillaume Abrioux [Wed, 15 Jun 2022 08:46:52 +0000 (10:46 +0200)]
backup-and-restore: fix a typo

Typo introduced during initial implementation.

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

3 years agofix(ceph-grafana): make dashboard download work again
Michael Wagner [Fri, 10 Jun 2022 15:10:23 +0000 (17:10 +0200)]
fix(ceph-grafana): make dashboard download work again

This fixes the dashboard download for pacific and later.

Signed-off-by: Michael Wagner <mitch.wagna@gmail.com>
(cherry picked from commit 4edaab5f4c5445cb1fafc5d8824c49717e9f96c8)

3 years agoAdd ceph_infra tag to rolling_update
Francesco Pantano [Wed, 25 May 2022 19:32:19 +0000 (21:32 +0200)]
Add ceph_infra tag to rolling_update

When the upgrade from Ceph 4 to 5 is performed in the OpenStack context,
ceph-ansible triggers the rolling_update playbook, which is supposed to
rollout new Ceph containers.  The ceph-infra role tries to take care
about firewall, ntp config and logrotate; however, TripleO manages them
through tripleo-heat-templates.  This patch just add an additional tag
to skip the ceph-infra role in the OpenStack context.

Closes: https://bugzilla.redhat.com/2090456
Signed-off-by: Francesco Pantano <fpantano@redhat.com>
(cherry picked from commit 0e9b3902b074f3526e2fc9e392a32113cf4c6d99)

3 years agoansible: use ansible.utils.ipwrap instead of ansible.netcommon.ipwrap
Seena Fallah [Tue, 7 Jun 2022 18:38:51 +0000 (20:38 +0200)]
ansible: use ansible.utils.ipwrap instead of ansible.netcommon.ipwrap

ansible.netcommon.ipwrap is deprecated and is not being redirected with ansible 2.9.*

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
Co-authored-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agodoc: update ansible version requirement
Guillaume Abrioux [Mon, 13 Jun 2022 07:22:10 +0000 (09:22 +0200)]
doc: update ansible version requirement

This updates the documentation regarding the Ansible version
requirement for `stable-6.0` branch.

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

3 years agoswitch to ansible.netcommon.ipwrap
Guillaume Abrioux [Tue, 7 Jun 2022 07:06:46 +0000 (09:06 +0200)]
switch to ansible.netcommon.ipwrap

As of 2.10, Ansible moved ipwrap to netcommon collection.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agotests: uninstall ansible prior to install 6.0 req
Guillaume Abrioux [Mon, 6 Jun 2022 13:20:09 +0000 (15:20 +0200)]
tests: uninstall ansible prior to install 6.0 req

in order to avoid conflict with previous version installed

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agoceph_pool: set target size ratio on both 'on' and 'warn' mode
Seena Fallah [Mon, 25 Apr 2022 22:07:28 +0000 (00:07 +0200)]
ceph_pool: set target size ratio on both 'on' and 'warn' mode

when we set target_size_ratio to warn it means that the administrator wants to get suggestion from the mgr module but apply it manually when he/she wants. So it's in the same approach as 'on' mode just triggered by hand.
So there is no need to set pg_num when target_size_ratio is 'warn' and the mgr module will calculate the correct pg_num and the administrator will adjust it whenever he/she wants.

It is the same approach that was in #6471

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

3 years agocephadm_adopt: set autotune_memory_target_ratio v6.0.27 v6.0.27.0
Guillaume Abrioux [Fri, 13 May 2022 11:28:55 +0000 (13:28 +0200)]
cephadm_adopt: set autotune_memory_target_ratio

This adds a task that sets `autotune_memory_target_ratio` depending on the
value of `is_hci`.

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

3 years agotests: use latest version for pytest
Guillaume Abrioux [Thu, 12 May 2022 19:17:51 +0000 (21:17 +0200)]
tests: use latest version for pytest

with the bump of py version, let's use newer version for pytest.

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

3 years agocore: bump ansible version
Guillaume Abrioux [Thu, 15 Apr 2021 07:32:26 +0000 (09:32 +0200)]
core: bump ansible version

We should consider bumping ansible version for future releases, so let's
start testing against ansible 2.10

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

3 years agocommon: config rhcs tools repo on all nodes
Guillaume Abrioux [Thu, 28 Apr 2022 08:46:35 +0000 (10:46 +0200)]
common: config rhcs tools repo on all nodes

Otherwise `cephadm` can't be installed during cephadm-adopt.yml
playbook execution.

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

3 years agocephadm-adopt: remove legacy directory after adoption
Guillaume Abrioux [Wed, 11 May 2022 11:47:46 +0000 (13:47 +0200)]
cephadm-adopt: remove legacy directory after adoption

When this directory is left after the osd adoption, it leads to the following error:

```
[WRN] CEPHADM_REFRESH_FAILED: failed to probe daemons or devices
    host axdesec2ocs1n002.ecommerce.inditex.grp `cephadm ceph-volume` failed: cephadm exited with an error code: 1, stderr:Inferring config /var/lib/ceph/41555360-e96b-4b16-a37c-873e0c940091/mon.axdesec2ocs1n002/config
ERROR: [Errno 2] No such file or directory: '/var/lib/ceph/41555360-e96b-4b16-a37c-873e0c940091/mon.axdesec2ocs1n002/config'.
```

this is because of an unexpected behavior regarding 'config inferring' when a legacy directory is present in /var/lib/ceph.

Note: this doesn't fix the root cause, this is a workaround.

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

3 years agocontrib: add a playbook v6.0.26
Guillaume Abrioux [Tue, 12 Apr 2022 17:48:18 +0000 (19:48 +0200)]
contrib: add a playbook

this playbook can backup or restore some ceph files.
(/etc/ceph, /var/lib/ceph, ...)

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

3 years agofacts: follow up on aa0cc93
Guillaume Abrioux [Thu, 21 Apr 2022 08:06:56 +0000 (10:06 +0200)]
facts: follow up on aa0cc93

when these variables are defined in the inventory host file,
all tasks are skipped then because the node being played isn't
aware about the values from the rgw nodes.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2063029
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agofacts: fix mon/mgr collocation
Guillaume Abrioux [Tue, 19 Apr 2022 21:39:12 +0000 (23:39 +0200)]
facts: fix mon/mgr collocation

`service dump` hangs when no active mgr is available.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agodashboard: fix regression
Guillaume Abrioux [Tue, 19 Apr 2022 05:12:44 +0000 (07:12 +0200)]
dashboard: fix regression

introduced by ceph/ceph-ansible/pull/7150

when no rgw is present, it fails.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2076192
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agoadded AlmaLinux and Rocky for iscsi deploy
Ingo Ebel [Thu, 31 Mar 2022 12:10:14 +0000 (14:10 +0200)]
added AlmaLinux and Rocky for iscsi deploy

Signed-off-by: Ingo Ebel <ingo.ebel@desy.de>
(cherry picked from commit c5bb450f8796530495315cd9b81539e059661c3d)

3 years agodashboard: support --limit execution with rgw
Guillaume Abrioux [Wed, 13 Apr 2022 08:42:47 +0000 (10:42 +0200)]
dashboard: support --limit execution with rgw

When the following conditions are met:

- rgw is deployed,
- dashboard is deployed,
- playbook is called with --limit,
- a node being processed is collocated on either a mon or mgr.

The playbook fails because `rgw_instances` is undefined.
The idea here is to make sure this variable is always defined.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2063029
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agodashboard: allow collecting stats from the host
Guillaume Abrioux [Tue, 7 Dec 2021 14:43:45 +0000 (15:43 +0100)]
dashboard: allow collecting stats from the host

This commit makes podman bindmount `/:/rootfs:ro` so the container can
collect data from the host.

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

3 years agoceph-facts: fix ansible templating error for auto osd discovery
pinotelio [Mon, 4 Apr 2022 09:48:14 +0000 (14:18 +0430)]
ceph-facts: fix ansible templating error for auto osd discovery

This commit fixes templating error that occurs when using auto osd discovery. Getting the len before converting the result to a list causes "object of type generator has no len()" error.

Signed-off-by: pinotelio <ahmadreza.mollapour@gmail.com>
(cherry picked from commit f288364c5c268e61d49165704900e8e01ca643c8)

3 years agovalidate: drop a check
Guillaume Abrioux [Mon, 28 Mar 2022 09:49:39 +0000 (11:49 +0200)]
validate: drop a check

Since the ISO install method removal, ceph-ansible isn't able
to detect wheter the user is deploying in a 'disconnected environment'.
By the way, given that ceph-ansible is available only for upgrading to RHCS 5,
this check doesn't make sense anymore, let's drop it.

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

3 years agodo not update Debian cache when package-install is disabled
insatomcat [Wed, 30 Mar 2022 13:48:02 +0000 (15:48 +0200)]
do not update Debian cache when package-install is disabled

When deploying with --skip-tags=package-install (when there is no access to a repository), the playbook is still trying to update the package cache, which makes the playbook fail.
This change prevents the playbook to try to update the cache when the package-install tag is skipped.

Signed-off-by: Florent CARLI <florent.carli@rte-france.com>
(cherry picked from commit 58fdc03e63f5ae726090a19a2412ea2eec5a1f4e)

3 years agolibrary/ceph_pool: Fix potential null value when creating pools
Mathias Chapelain [Fri, 11 Feb 2022 14:11:22 +0000 (15:11 +0100)]
library/ceph_pool: Fix potential null value when creating pools

Before, creating a pool by providing *only* `pg_num` would result in an
error as it would produce `--pgp-num null`.

This commit fix this behavior by defaulting `pgp_num` value to `pg_num`.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
(cherry picked from commit f0f1dd986aab8b32fad55a8885faf5ed7ef66e06)

3 years agodashboard: always set `dashboard_server_addr`
Guillaume Abrioux [Fri, 25 Mar 2022 08:14:56 +0000 (09:14 +0100)]
dashboard: always set `dashboard_server_addr`

When running the playbook with `--limit`, if the play targeted doesn't match
hosts present in the mgr group the playbook can fail.

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

3 years agoUsing another user than root for cephadm ssh connections fails
Teoman ONAY [Thu, 17 Mar 2022 14:13:06 +0000 (15:13 +0100)]
Using another user than root for cephadm ssh connections fails

Fixes commit da42f3d139e595d09edfb30334fbc7ce17ffa3fe

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

3 years agotests: update the system before deploying
Guillaume Abrioux [Fri, 18 Mar 2022 13:41:40 +0000 (14:41 +0100)]
tests: update the system before deploying

Having a system up-to-date is usually a good idea.

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

3 years agoupgrade: block upgrade when rgw multisite is active
Guillaume Abrioux [Fri, 18 Mar 2022 12:41:17 +0000 (13:41 +0100)]
upgrade: block upgrade when rgw multisite is active

With this commit, upgrading a cluster from Nautilus to Pacific with
active rgw multisite replication will be blocked.
This is because a lot of bugs are currently present in Pacific regarding
RGW multisite.

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

3 years agoTurn off SELinux separation for containers MON and RGW
Teoman ONAY [Mon, 7 Mar 2022 09:31:14 +0000 (10:31 +0100)]
Turn off SELinux separation for containers MON and RGW

Initially MONs and RGW binded /etc/pki/ca-trust/extracted using the :z flag
(introduced to solve an OSP TripleO issue on RHEL - #3638) but using
this flag prevents local services (like sssd) running on the host from accessing
the certificates/files in that folder.

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 7e8ce2567ec7f163c763547252a7a5bcc983fd98)

3 years agopurge: ceph-crash purge fixes
Guillaume Abrioux [Mon, 28 Feb 2022 08:51:36 +0000 (09:51 +0100)]
purge: ceph-crash purge fixes

This fixes the service file removal and makes the playbook
call `systemctl reset-failed` on the service because in Ceph
Nautilus, ceph-crash doesn't handle `SIGTERM` signal.

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

3 years agoadopt: fix node labelling
Guillaume Abrioux [Thu, 3 Mar 2022 12:44:53 +0000 (13:44 +0100)]
adopt: fix node labelling

When using group of group, the playbook will apply undesired
labels on nodes.
This commit fixes it by applying only the expected labels.

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

3 years agoAdd cluster custom name support
Teoman ONAY [Thu, 24 Feb 2022 11:01:19 +0000 (12:01 +0100)]
Add cluster custom name support

When using cluster custom names, cephadm commands are executed using
the default admin keyring name which fails.

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit f8c6bba65782a861e5be51432e072efb0c4b0110)

3 years agoEnable user to change the account used for ssh connection
Teoman ONAY [Mon, 7 Feb 2022 13:23:49 +0000 (14:23 +0100)]
Enable user to change the account used for ssh connection

By default cephadm uses root account to connect remotely
to other nodes in the cluster. This change allows to choose
another account.
This commit also allows to use a dedicated subnet for cephadm mgmt.

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit da42f3d139e595d09edfb30334fbc7ce17ffa3fe)

3 years agoceph-facts: ignore mounted disks on osd auto discovery
Seena Fallah [Sat, 15 Jan 2022 16:34:03 +0000 (20:04 +0330)]
ceph-facts: ignore mounted disks on osd auto discovery

Ignore disks with active mountpoint when osd_auto_discovery is true

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

4 years agoswitch2containers: fail if less than 3 monitors
Guillaume Abrioux [Mon, 21 Feb 2022 16:12:06 +0000 (17:12 +0100)]
switch2containers: fail if less than 3 monitors

This playbook doesn't support less than 3 monitors present in the inventory.
Just like the rolling_update playbook, let's fail if less than
3 monitors are present.

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

4 years agotests/library: Add radosgw_caps tests
Mathias Chapelain [Tue, 25 Jan 2022 14:10:37 +0000 (15:10 +0100)]
tests/library: Add radosgw_caps tests

Provide basic tests for `radosgw_caps` module.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
(cherry picked from commit 6c0c53fa2d0da34fde63c69067faebb01d2087df)

4 years agolibrary: Add radosgw_caps to manage capabilities
Mathias Chapelain [Tue, 18 Jan 2022 15:04:16 +0000 (16:04 +0100)]
library: Add radosgw_caps to manage capabilities

This commit add `radosgw_caps` module to be able to manage RadosGW users
capabilities.

Usage from module's documentation:
```YAML
- name: add users read write and all buckets capabilities
  radosgw_caps:
    name: foo
    state: present
    caps:
      - users=read,write
      - buckets=*
- name: remove usage write capabilities
  radosgw_caps:
    name: foo
    state: absent
    caps:
      - usage=write
```

This module support check mode by simulating the original `radosgw-admin`
behavior when adding capabilities.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
(cherry picked from commit 65003f4ff90413094d46b682b78f6d749fcc2747)

4 years agomodule_utils/ca_common: Add optional diff argument to exit_module
Mathias Chapelain [Fri, 4 Feb 2022 18:33:18 +0000 (19:33 +0100)]
module_utils/ca_common: Add optional diff argument to exit_module

Add optional `diff` argument defaulting to `{ "before": "", "after": ""}`.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
(cherry picked from commit 055326be7cfe7221517bd382a220a2434bcc604e)

4 years agocephadm: set allow_overwrite at bootstrap step
yasinlachiny [Fri, 17 Dec 2021 23:02:32 +0000 (02:32 +0330)]
cephadm: set allow_overwrite at bootstrap step

Signed-off-by: yasinlachiny <yasin.lachiny@gmail.com>
(cherry picked from commit 2a2875847235ac0d1a6e61ecf4a21b45553f38ac)

4 years agoceph-facts: Fix get_def_crush_rule_name.yml in check mode
Benoît Knecht [Mon, 13 Dec 2021 15:36:27 +0000 (16:36 +0100)]
ceph-facts: Fix get_def_crush_rule_name.yml in check mode

This construct doesn't work as intended since ansible/ansible#74212:

```
item.stdout | default('{}') | from_json
```

That PR made the `command` module return `stdout` even in check mode (setting
it to the empty string), so `default()` has no effect in that case and
`from_json()` fails to parse an empty string.

Instead, `default()` needs to be invoked with its second argument set to
`True`, so that it replaces any `False` value (such as an empty string) with
its first argument:

```
item.stdout | default('{}', True) | from_json
```

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

4 years agoceph-osd: Fix crush_rules.yml in check mode
Benoît Knecht [Mon, 13 Dec 2021 13:41:23 +0000 (14:41 +0100)]
ceph-osd: Fix crush_rules.yml in check mode

Set a default value for `item.stdout` before passing it to `from_json()`. The
`when` condition doesn't prevent this template from being evaluated in check
mode, so it fails if `item.stdout` doesn't contain a valid JSON string.

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

4 years agoceph-osd: Fix start_osds.yml in check mode
Benoît Knecht [Mon, 13 Dec 2021 12:59:17 +0000 (13:59 +0100)]
ceph-osd: Fix start_osds.yml in check mode

This construct doesn't work as intended since ansible/ansible#74212:

```
ceph_osd_ids.stdout | default('{}') | from_json
```

That PR made the `command` module return `stdout` even in check mode (setting
it to the empty string), so `default()` has no effect in that case and
`from_json()` fails to parse an empty string.

Instead, `default()` needs to be invoked with its second argument set to
`True`, so that it replaces any `False` value (such as an empty string) with
its first argument:

```
ceph_osd_ids.stdout | default('{}', True) | from_json
```

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

4 years agoceph-handler: Fix check mode
Benoît Knecht [Thu, 30 Dec 2021 14:08:08 +0000 (15:08 +0100)]
ceph-handler: Fix check mode

When running in check mode with one or more Ceph daemons that need to be
restarted, the `tmpdirpath.path` variable that several handlers rely on is
undefined, leading to fatal errors.

This commit ensures the tasks that require `tmpdirpath.path` are skipped when
it's undefined.

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

4 years agovalidate: support obs repository
Guillaume Abrioux [Wed, 1 Dec 2021 07:44:28 +0000 (08:44 +0100)]
validate: support obs repository

Otherwise, installation on SuSe fails.

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

4 years agoadopt: fix rbd-mirror adoption v6.0.25
Guillaume Abrioux [Wed, 9 Feb 2022 16:29:29 +0000 (17:29 +0100)]
adopt: fix rbd-mirror adoption

We can't use `{{ cephadm_cmd }}` here because the monitors aren't yet adopted.
We must use `{{ ceph_cmd }}` instead.
This also fixes some filters `| default()` (they must be moved before `| from_json()`)

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

4 years agoadopt: fix bug in mon_ip_list set_fact v6.0.24
Guillaume Abrioux [Tue, 8 Feb 2022 17:02:24 +0000 (18:02 +0100)]
adopt: fix bug in mon_ip_list set_fact

`default('{}')` must be before `| from_json`

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

4 years agoadopt: check for POOL_APP_NOT_ENABLED warning
Guillaume Abrioux [Mon, 7 Feb 2022 15:08:40 +0000 (16:08 +0100)]
adopt: check for POOL_APP_NOT_ENABLED warning

This commit makes the cephadm-adopt playbook fail if the cluster
has the `POOL_APP_NOT_ENABLED` warning raised.

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

4 years agoceph-grafana: Add proxy env vars to grafana service template
John Karasev [Tue, 27 Apr 2021 20:52:48 +0000 (13:52 -0700)]
ceph-grafana: Add proxy env vars to grafana service template

When installing grafana plugins, the container will make http requests.
This requires http proxy otherwise installation cannot be performed. Passed
the proxy vars from all.yml as env args.
Fixes: ceph#6484, ceph#6481
Signed-off-by: John Karasev <john.karasev@intel.com>
(cherry picked from commit 79ca442d53ba25a463fc5bbb9a863da22cec55d1)

4 years agoRemove the remaining packages
jowsiewski [Thu, 20 Jan 2022 13:24:00 +0000 (14:24 +0100)]
Remove the remaining packages

Signed-off-by: jowsiewski <owsiewski@gmail.com>
(cherry picked from commit 1dfd195c7e3782082cf4fbf43ba3bab19156ce3f)

4 years agoAdd with_pkg tag on package related tasks
Francesco Pantano [Mon, 31 Jan 2022 16:25:19 +0000 (17:25 +0100)]
Add with_pkg tag on package related tasks

In the OpenStack context we let the integration tool (TripleO)
deal with repositories and packages.
This change just adds the with_pkg tag to allow TripleO skipping
both the repositories and packages installation.

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

4 years agotests: use centos stream-8 instead of centos 8
Guillaume Abrioux [Mon, 31 Jan 2022 12:42:10 +0000 (13:42 +0100)]
tests: use centos stream-8 instead of centos 8

CentOS 8 is EOL as of December 2021.
Let's use CentOS stream 8 instead.

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

4 years agonfs-ganesha: fix debian based OS deployments v6.0.23
Guillaume Abrioux [Wed, 19 Jan 2022 09:19:37 +0000 (10:19 +0100)]
nfs-ganesha: fix debian based OS deployments

Let's use ppa repositories in order to deploy nfs-ganesha on Debian based OS.

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

4 years agoadopt: create nfs exports at the user level
Guillaume Abrioux [Fri, 28 Jan 2022 13:12:07 +0000 (14:12 +0100)]
adopt: create nfs exports at the user level

The current implementation is wrong.
ceph-ansible lists all existing buckets and try to create
an export for each of them.
Instead, it's easier to create the export at the user level.

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

4 years agoFix rich version for ansible-lint
Dmitriy Rabotyagov [Thu, 13 Jan 2022 16:17:14 +0000 (18:17 +0200)]
Fix rich version for ansible-lint

Ansible-lint prior to v5.3.1 has issue with reach version >=11.0.0.
In order to cherry-pick fix to stable branches we fix rich version.

This should be reverted with ansible-lint version bump.

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@ya.ru>
(cherry picked from commit 583e60af84180f0414d67ee52c3ec7cd64ddb4dd)

4 years agomake grafana network a configurable option
Danny Webb [Tue, 23 Nov 2021 16:28:02 +0000 (16:28 +0000)]
make grafana network a configurable option

Signed-off-by: Danny Webb <danny.webb@thehutgroup.com>
(cherry picked from commit 189ff9337202ce1900a8f6f8c3e48a6e3ecb7519)

4 years agocephadm-adopt: use named args in rgw export creation v6.0.22
Guillaume Abrioux [Thu, 6 Jan 2022 13:33:42 +0000 (14:33 +0100)]
cephadm-adopt: use named args in rgw export creation

In order to avoid breaking changes, let's use named argument
instead of positional argument syntax in the command line
used to create rgw export.

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

4 years agopurge: remove ceph directories on client nodes
Guillaume Abrioux [Mon, 22 Nov 2021 08:22:45 +0000 (09:22 +0100)]
purge: remove ceph directories on client nodes

Otherwise any ceph directories are left over on client nodes
after the purge.

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

4 years agocontainer: align systemd units with rpm
Guillaume Abrioux [Wed, 8 Dec 2021 16:37:14 +0000 (17:37 +0100)]
container: align systemd units with rpm

Update `After=` and `Wants=` parameters in container systemd units
and make them be aligned with the systemd units that come
from the packaging.

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

4 years agoupdate: speed up client play
Guillaume Abrioux [Tue, 9 Nov 2021 14:35:12 +0000 (15:35 +0100)]
update: speed up client play

wip

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

4 years agocommon: remove legacy repositories v6.0.21
Guillaume Abrioux [Wed, 15 Dec 2021 12:25:49 +0000 (13:25 +0100)]
common: remove legacy repositories

As of rhceph-5, those repositories don't longer exist.

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

4 years agocephadm-adopt: ensure /etc/ceph is present on monitoring node
Guillaume Abrioux [Tue, 7 Dec 2021 20:11:50 +0000 (21:11 +0100)]
cephadm-adopt: ensure /etc/ceph is present on monitoring node

When deploying the monitoring stack on a dedicated node, the directory
`/etc/ceph` has never been created. Therefore, the play for adopting the
monitoring stack fails because it can't write the minimal config file.

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

4 years agocephadm-adopt: bindmount /var/lib/ceph with 'ro' v6.0.20
Guillaume Abrioux [Tue, 30 Nov 2021 09:00:20 +0000 (10:00 +0100)]
cephadm-adopt: bindmount /var/lib/ceph with 'ro'

When collocating osds with iscsigw daemons, cephadm bindmounts the
following:

```
-v /var/lib/ceph/6126c064-6a9e-4092-8a64-977930df0843/iscsi.rbd.ceph-ameenasuhani-4fs3bq-node5.vomtqb/configfs:/sys/kernel/config
```

this prevents cephadm-adopt playbook from running container and bindmounting `/var/lib/ceph:/var/lib/ceph:z`

since 'ro' is enough in this playbook, let's replace the ':z' option on
this bindmount with ':ro'

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

4 years agoceph_volume: support overriding bind-mounts
Guillaume Abrioux [Tue, 30 Nov 2021 08:52:59 +0000 (09:52 +0100)]
ceph_volume: support overriding bind-mounts

This makes it possible to call `podman run` with custom bind-mounts.

cephadm-adopt.yml playbook needs it for a very specific use case:

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

4 years agoadopt: fix ceph_origin and ceph_repository defaults
Guillaume Abrioux [Mon, 29 Nov 2021 09:48:23 +0000 (10:48 +0100)]
adopt: fix ceph_origin and ceph_repository defaults

This is overriding those variables because the precedence at the 'block
var' level is greater than the group_vars/host_vars.

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

4 years agovalidate: fix bug when using vault
Guillaume Abrioux [Wed, 10 Nov 2021 13:32:26 +0000 (14:32 +0100)]
validate: fix bug when using vault

since a variable encrypted with vault is no longer a string but a
encrypted object we can't use the filter | length, we have to convert it
to a string before.

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

4 years agocephadm: support adding hosts with ipv6 v6.0.19
Guillaume Abrioux [Thu, 28 Oct 2021 12:12:46 +0000 (14:12 +0200)]
cephadm: support adding hosts with ipv6

The current implementation doesn't support adding hosts when using ipv6
addresses.

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

4 years agocephadm: use public_network when adding hosts
Guillaume Abrioux [Thu, 28 Oct 2021 12:10:26 +0000 (14:10 +0200)]
cephadm: use public_network when adding hosts

When adding host, using ansible_facts['default_ipv4']['address'] might
not be the desired network, we shouldn't enforce the subnet with the
default route.
Let's use the public_network instead.

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

4 years agocephadm-adopt: remove logrotate configuration
Dimitri Savineau [Thu, 28 Oct 2021 21:15:49 +0000 (17:15 -0400)]
cephadm-adopt: remove logrotate configuration

cephadm uses its own logrotate configuration file so ceph-ansible needs
to remove that custom file during the cephadm-adopt playbook.

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

4 years agoupdate: move a set_fact
Guillaume Abrioux [Thu, 28 Oct 2021 21:40:18 +0000 (23:40 +0200)]
update: move a set_fact

ceph-facts roles makes decisions based on the fact `rolling_update` so
it must be called before we run this role.

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

4 years agoupdate: support --limit on monitor nodes
Guillaume Abrioux [Thu, 28 Oct 2021 14:17:24 +0000 (16:17 +0200)]
update: support --limit on monitor nodes

Change needed in order to support --limit on mon nodes.
Otherwise, a call to `hostvars[groups[mon_group_name][0]]['_current_monitor_address']`
throws an error:

```
"The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute '_current_monitor_address'"
```

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

4 years agoRevert "update: block upgrade when nfs+rgw is deployed"
Guillaume Abrioux [Tue, 26 Oct 2021 18:31:13 +0000 (20:31 +0200)]
Revert "update: block upgrade when nfs+rgw is deployed"

This reverts commit 93f17652595cc9290cdba9dcba53611bdb9cd07c.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2017508
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorolling_update: modify default health_osd_check_*
Guillaume Abrioux [Mon, 25 Oct 2021 12:28:41 +0000 (14:28 +0200)]
rolling_update: modify default health_osd_check_*

let's do more retries with a shorter delay.

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

4 years agoadopt: fix rbd mirror adoption v6.0.18
Guillaume Abrioux [Tue, 12 Oct 2021 14:01:20 +0000 (16:01 +0200)]
adopt: fix rbd mirror adoption

The rbd mirroring is broken because cephadm doesn't bindmount /etc/ceph anymore.
It means the keyrings and ceph config file aren't available after the
migration.
The idea here is to remove the current rbd mirror peer and add it back
to the mon config store so we aren't bound to the /etc/ceph directory.

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

4 years agoadopt: use mgr/nfs volume
Guillaume Abrioux [Thu, 14 Oct 2021 22:44:02 +0000 (00:44 +0200)]
adopt: use mgr/nfs volume

use the mgr 'nfs' module to recreate nfs exports.

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

4 years agorolling_update: fix pre and post osd upgrade play
Guillaume Abrioux [Mon, 25 Oct 2021 11:43:25 +0000 (13:43 +0200)]
rolling_update: fix pre and post osd upgrade play

when using --limit osds, the play before and after osd upgrade are
skipped because we use `hosts: "{{ mon_group_name | default('mons') }}[0]"`
using `hosts: "{{ osds_group_name | default('osds') }}" with
`delegate_to` to the first monitor addresses this issue.

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

4 years agotests: add new scenario subset_update
Guillaume Abrioux [Wed, 20 Oct 2021 07:59:48 +0000 (09:59 +0200)]
tests: add new scenario subset_update

new scenario in order to test the subset upgrade approach using tags.

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

4 years agoupdate: support upgrading a subset of nodes
Guillaume Abrioux [Wed, 20 Oct 2021 08:01:05 +0000 (10:01 +0200)]
update: support upgrading a subset of nodes

It can be useful in a large cluster deployment to split the upgrade and
only upgrade a group of nodes at a time.

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

4 years agoshrink-osd: fix regression because of a wrong regex
Per Abildgaard Toft [Wed, 20 Oct 2021 07:45:16 +0000 (09:45 +0200)]
shrink-osd: fix regression because of a wrong regex

968891f4498da9625acfdd34bfb01fe445d1eef2 introduced a regression.
The regex is wrong because it doesn't allow to shrink osds with id
greater than 9

Fixes: #6950
Signed-off-by: Per Abildgaard Toft <per@minfejl.dk>
(cherry picked from commit 84118a3063e38ed9d274cca90d115809353819b4)