Commit Graph

5919 Commits (stable-6.0-ceph-volume-tests)
 

Author SHA1 Message Date
Guillaume Abrioux 8b9abfcc7e tests: force rpm pkg upgrade
Due to a bug with the rpm version present in the current stream8 vagrant image,
we have to make sure it is first upgraded to the latest version.

(cherry picked from commit b87f214a96)
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
2023-04-11 13:01:48 +02:00
Guillaume Abrioux 99f07d4190 tests: enforce some parameters for ceph-volume tests suite
dnm

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-12-19 14:01:29 +01:00
Guillaume Abrioux fb6098fa7c cephadm-adopt: fix rbd-mirror adoption
The recent rbdmirror refactor introduced a regression in the
cephadm-adopt playbook.
Given that the rbd-mirror peer addition is now done by using the monitor
config-key store method during the cluster deployment, we can drop this
play from the cephadm-adopt.yml playbook.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c3fae04b8d)
2022-12-15 15:45:34 +01:00
Teoman ONAY 470f63aebb Setting fact _radosgw_address fail when RGW is on a different network
Changed the when condition to only execute that fact setting on RGW
nodes while before it was run on all nodes and failed if the node
was not on the same network range as the RGW.

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

Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 590e57cc1b)
2022-10-27 10:29:35 +02:00
Guillaume Abrioux 62f9804bd2 switch-to-containers: ignore errors when stopping service
There might be cases where it can break idempotency.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a158d0d53b)
2022-10-19 16:17:06 +02:00
Guillaume Abrioux 0a30a234af switch-to-containers: fix rbd-mirror migration
`--state=enabled` isn't a valid filter so the unit from the packaging
never gets removed.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7664da58da)
2022-10-17 10:52:16 +02:00
Seena Fallah d31e419e0e ceph-osd: remove unused ceph config set for osd_memory_target
As the conf is always being set in the config file there is no need to set it in with `ceph config`.
Also this will make it hard to run the playbook with the `ceph_update_config` tag as it won't run and will create an inconsistency between the config managements of the cluster

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 8b983cfdbf)
2022-10-12 10:49:27 +02:00
Seena Fallah 3d65113e26 ceph-config: fix overriding osd_memory_target
When the value is overriding in `ceph_conf_overrides`, there is no need to calculate and set `osd_memory_target` again as we wanted to override the conf by our desired value.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 613773b2a3)
2022-10-12 10:49:27 +02:00
Seena Fallah fa69b8c754 ceph-config: don't check for devices on existing osds
When osd_auto_discovery is true the `devices` var will be empty (as the disks have holders).
Also in general there is no need to check for devices to list the devices with ceph-volume as we have `default({})` on the stdout in `num_osds` set fact in the next task

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 57b0890aff)
2022-10-12 10:49:27 +02:00
Seena Fallah 3f4aac94ce ceph-config: always set _osd_memory_target
this should be set when rolling_update is true as well, otherwise, it will reset to default on the upgrade

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit ac4dfa7526)
2022-10-12 10:49:27 +02:00
John Karasev 91e45256fa library/radosgw_user.py: fix user update
Removes the case when display_name was defined prevously but
was not provided when modifying. Without this change the module
will change display_name to name even if display_name was not name
originally. See #7296

Signed-off-by: John Karasev <john.karasev@intel.com>
(cherry picked from commit 72ff93f685)
2022-10-12 10:48:48 +02:00
Guillaume Abrioux 8b4f68e39c rbd-mirror: add rx peer only once
in order to avoid the following error:

```
multiple RX peers are not currently supported
```

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit aa64747cd1)
2022-09-20 17:59:19 +02:00
Guillaume Abrioux 0ba46c906e rbd-mirror: fix multiple rbd-mirror daemon support
This `run_once: true` breaks multiple rbd-mirror daemons support
as it would make all rbd-mirror daemons use the same keyring.
Each rbd-mirror daemon needs its own keyring in order to start.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 665601bf8a)
2022-09-13 10:39:26 +02:00
Seena Fallah 759e414dd3 ceph-crash: add missing \ in service file
regression by: d374e634ed

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 68d9973cf9)
2022-09-12 10:10:16 +02:00
Guillaume Abrioux 6374849f74 ceph-config: allow overriding osd_memory_target
If `osd_memory_target` is set in group_vars, the default value (4Gb)
should be overridden.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b40e4bfe60)
2022-09-08 09:32:42 +02:00
Seena Fallah cda09bf7d8 ceph-crash: add support cluster name
add cluster name to CEPH_ARGS env var to support custom cluster name
this can change as an arg to ceph-crash when https://github.com/ceph/ceph/pull/47836 released

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit d374e634ed)
2022-09-08 09:27:48 +02:00
Guillaume Abrioux d7bf53a576 facts: set is_rgw_instances_defined from configure_dashboard
When we come from configure_dashboard.yml, this fact should be set if
`rgw_instances` is defined in group_vars/host_vars. Otherwise, the next
task that set the fact `rgw_instances` will be run as it will assume it
wasn't user defined.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-11 16:59:34 +02:00
Guillaume Abrioux 84a81a139f config: use osd_memory_target value from ceph_conf_overrides if defined
otherwise it's impossible to override `osd_memory_target`
via `ceph_conf_overrides`.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f19dcb266a)
2022-08-11 11:10:39 +02:00
Guillaume Abrioux 2e09456468 config: do not always set _osd_memory_target
When 'osd_memory_target' is overridden in ceph_conf_overrides.
The task that sets the fact `osd_memory_target` in the ceph-config role
should be skipped.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675#c11

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e2076e439b)
2022-08-08 13:01:48 +02:00
Guillaume Abrioux e30fdeba3c 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-04 07:10:27 +02:00
Guillaume Abrioux 783b9235e5 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-04 07:10:09 +02:00
Guillaume Abrioux 763affc711 tests: do not use dev repo (rbdmirror)
use stable repositories for rbdmirror scenarios

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 6f1554c88f replace 'master' references with 'main'
Because the branch'master' was renamed 'main'

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 99c07843be flake8: fix 'error E275 missing whitespace after keyword'
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7ce972e715)
(cherry picked from commit 82dc265e2f)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux dd16e49517 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)
(cherry picked from commit 022199745e)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 3ca2d7d205 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)
(cherry picked from commit 6ef470ef0d)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux 32b84e7e8e 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)
(cherry picked from commit b634fb1cb3)
2022-08-04 06:52:06 +02:00
Teoman ONAY 593325e525 Set ceph_rbd_mirror_pool default value
Signed-off-by: Teoman ONAY <tonay@redhat.com>
(cherry picked from commit 0c50bfac98)
(cherry picked from commit 8a0b5a9571)
2022-08-04 06:52:06 +02:00
Teoman ONAY 508269e273 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)
(cherry picked from commit 80dc46d31f)
2022-08-04 06:52:06 +02:00
Guillaume Abrioux d167b0aa16 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-04 06:52:06 +02:00
Guillaume Abrioux e15f4741ef 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-04 06:52:06 +02:00
Guillaume Abrioux b354533a12 replace 'master' references with 'main'
The branch 'master' has been renamed 'main'.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-08-03 17:08:54 +02:00
Sven Kieske 99344e61f6 fixes: https://github.com/ceph/ceph-ansible/issues/7261
Signed-off-by: Sven Kieske <s.kieske@mittwald.de>
2022-08-03 14:13:50 +02:00
Guillaume Abrioux 7425edd7f6 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:17 +02:00
Guillaume Abrioux 0162fdc30d 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:20:00 +02:00
Guillaume Abrioux ed6f13c9d6 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:20:00 +02:00
Teoman ONAY 0981158e03 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:37 +02:00
Guillaume Abrioux 392ddec2d7 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:14:53 +02:00
Guillaume Abrioux e1e5cb52f1 update: fix a typo
s/pre-quincy/pre-pacific
s/quincy-only/pacific-only

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2022-07-06 13:09:19 +02:00
Guillaume Abrioux 62c42cd06b 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 09:11:09 +02:00
Guillaume Abrioux ab9e8aeb12 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 09:11:09 +02:00
Guillaume Abrioux f5020f6130 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:46 +02:00
Guillaume Abrioux a4f8567e62 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:38 +02:00
Guillaume Abrioux 84260c2c7d 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:38 +02:00
Guillaume Abrioux 8d011b4ab8 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:14 +02:00
Guillaume Abrioux c36bac3903 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:45 +02:00
Guillaume Abrioux f28002713f 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:20 +02:00
Guillaume Abrioux 1db668d95a 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:38 +02:00
Guillaume Abrioux 941102d4e6 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-15 21:13:22 +02:00
Guillaume Abrioux c9a81026ea 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-15 13:02:33 +02:00