Commit Graph

5936 Commits (2699a484a24806262b0ec52d824acc527fcd4f37)
 

Author SHA1 Message Date
Guillaume Abrioux 2699a484a2 rolling_update: fix rbd-mirror play
There's no service to stop/mask when the node being upgraded is
a 'primary node' only (1 way replication).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 82e0ae7e75)
2022-08-03 19:59:10 +02:00
Guillaume Abrioux 7c8bc62add tests: isolate ansible collections
When Ansible collections are installed, they should be isolated.
Otherwise, they will be shared in any scheduled job.
This might cause issues when running different branch versions for instance.
This also replace `ANSIBLE_CALLBACK_WHITELIST` with `ANSIBLE_CALLBACK_ENABLED` as it's
going to be deprecated in Ansible 2.15.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 50b7a12ad8)
2022-08-03 19:59:10 +02:00
Guillaume Abrioux fa1338b886 tests: do not use dev repo
cephadm-adopt is using dev repositories where it should use
community ones.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 09:53:00 +02:00
Guillaume Abrioux 77574fbd05 adopt: fix placement update calls for rgw
The commands called here are not built correctly.
This commit fixes it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2058038#c27

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 30c7e88d81)
2022-08-03 09:53:00 +02:00
Guillaume Abrioux 67dc1e130c tests: update tox config file for rbd-mirror scenario
do not call dev_setup.yml so we don't use dev repo

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 09:12:08 +02:00
Guillaume Abrioux c3e8414202 dashboard: update grafana_dashboard_version default value
on stable-7.0 this variable should have the default value 'quincy'

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 06:44:51 +02:00
Guillaume Abrioux 16f9a1ec8b iscsi: replace 'master' references
replace with 'main' instead

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 06:44:51 +02:00
Guillaume Abrioux 1955cc7e55 flake8: fix 'error E275 missing whitespace after keyword'
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7ce972e715)
2022-08-03 06:44:51 +02:00
Guillaume Abrioux 6bef5f2bd1 tests: skip rbdmirror tests on non-secondary daemon
the daemon is not running on the 'primary' daemon.
Therefore, these tests are not needed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a12f67e138)
2022-08-03 06:44:51 +02:00
Guillaume Abrioux c982e4b7cd tests: set no_log_on_ceph_key_tasks=false
In order to not have to always reproduce it when a failure shows up in the CI
having the failure logged can make us save some time.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 89ddc193fc)
2022-08-03 06:44:51 +02:00
Guillaume Abrioux 78f85e6e84 rbd-mirror: follow up on recent rbd-mirror refactor
- ensure /var/lib/ceph/bootstrap-rbd-mirror exists
- always install ceph-base on rbdmirror nodes (otherwise, ceph-crash
  isn't present)

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 041435e1e3)
2022-08-03 06:44:51 +02:00
Teoman ONAY d4962c3793 Set ceph_rbd_mirror_pool default value
Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 0c50bfac98)
2022-08-03 06:44:51 +02:00
Teoman ONAY 083264af0b 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 cef1636f70)
2022-08-03 06:44:51 +02:00
Guillaume Abrioux 712b3c4e29 purge-dashboard: check for legacy group name 'grafana-server'
When using the legacy group name 'grafana-server', this playbook will run but
won't remove properly all monitoring resources as expected.

Fixes: #7265

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a9cb444be1)
2022-08-01 20:32:25 +02:00
Guillaume Abrioux 1b13dc8752 doc: update readthedoc settings
This is needed to enforce the python version.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3a8daafbe8)
2022-08-01 15:34:58 +02:00
Guillaume Abrioux e4c89d3b45 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 b74ff6e22c)
2022-08-01 15:34:58 +02:00
Guillaume Abrioux b338edfffd 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 cf4a430d0b)
2022-07-12 09:24:01 +02:00
Guillaume Abrioux 9efa4f2774 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 8a5628b516)
2022-07-11 14:19:49 +02:00
Guillaume Abrioux 2054c44214 config: fix indentation in main.yml
For consistency and readability.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 5283fa6e96)
2022-07-11 14:19:49 +02:00
Teoman ONAY af0624150d 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 64e08f2c0b)
2022-07-11 13:43:27 +02:00
Guillaume Abrioux 7b531514ce 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 dffe7b47de)
2022-07-07 17:16:31 +02:00
Guillaume Abrioux d07615398c facts: follow up on f6b49f78
f6b49f78a9 changed a call back to `ipwrap`
This fixes this.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a99812aa92)
2022-07-06 03:18:50 +02:00
Guillaume Abrioux 5ffcf30954 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 434793e2fe)
2022-07-06 02:05:27 +02:00
Guillaume Abrioux 5847fc5366 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 f6b49f78a9)
2022-07-06 02:05:27 +02:00
Guillaume Abrioux 42bd198a91 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 047af3a3f6)
2022-07-05 14:45:56 +02:00
Guillaume Abrioux 42b2952b32 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 e223630cf0)
2022-07-05 10:32:27 +02:00
Guillaume Abrioux 23dc2cc143 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 6623f34679)
2022-07-05 10:32:27 +02:00
Guillaume Abrioux 800da79617 Revert "upgrade: block upgrade when rgw multisite is active"
This reverts commit 51bc8cb636.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7d848fa19e)
2022-07-03 07:28:01 +02:00
Guillaume Abrioux ebf35fd191 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 2e823b117e)
2022-07-03 07:27:33 +02:00
Guillaume Abrioux 220a4a1369 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 b18a1aa3ca)
2022-06-29 09:09:06 +02:00
Guillaume Abrioux 9965bf6cd6 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 848dd03fa6)
2022-06-29 08:52:27 +02:00
Guillaume Abrioux 4156fd569f nfs: use repo from SIG
RPMs for nfs-ganesha aren't hosted anymore at https://download.ceph.com

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 19fedfbac5)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux 3ad0d95643 handler: update path of pidfile for ganesha
default path has moved from `/var/run/ganesha.pid` to
`/var/run/ganesha/ganesha.pid`.

This updates the restart script accordingly.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-06-22 07:17:32 +02:00
Guillaume Abrioux 3614bcacff Revert "tests: temporarily disable nfs-ganesha"
This reverts commit 3f923d69ac.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-06-22 07:17:32 +02:00
Guillaume Abrioux 6615d97015 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 e28c486e52)
2022-06-22 07:17:32 +02:00
Michael Wagner a67defec2f 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 4edaab5f4c)
2022-06-22 07:17:32 +02:00
Seena Fallah 7eba726958 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 bb849a5586)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux fd2279e75d 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 41d62596fc)
2022-06-22 07:17:32 +02:00
Francesco Pantano abfb5385c1 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 0e9b3902b0)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux 4dd57379bb 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 5ab46f836d)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux eadb33acdb 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 1e11f879f6)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux aaf3dff30c 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 6e2ebe857d)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux 57fb213f29 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 ed0bba4d77)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux b75a00207a tests: update vagrant_box default value
This updates the default value for the vagrant_box variable
in all vagrant_variables.yml files

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ef0455a0b1)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux 63b3dadfbf common: move to `ansible.utils.ipwrap`
ipwrap has moved to ansible.utils

see
db4920ebf6

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c1649862a9)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux c0aa42742a 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 dee49779c9)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux 46e719fda3 workflows: drop py36, py37 from pytest
no need to have a such matrix, let's test against py38 only.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-06-22 07:17:32 +02:00
Guillaume Abrioux ef4991910d ansible: bump to ansible 2.12
Add required changes to support ansible 2.12

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit aa68b06c99)
2022-06-22 07:17:32 +02:00
Guillaume Abrioux c698859617 stable-7.0: support Ceph Quincy
This adds required changes in order to support Ceph Quincy
with `stable-7.0` branch.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-06-22 07:17:32 +02:00
David Galloway 1c740c424a tests/setup: Use local mirror of centos 8 stream repo
The mirrors provided by CentOS' mirrorlists are super slow

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-04-21 11:43:39 +02:00