Commit Graph

692 Commits (76aef742f813ab070b7e130083e9ec2478d7ffe3)

Author SHA1 Message Date
Teoman ONAY 76aef742f8 vagrant-box atomic-host -> stream9
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit f1b67bd4d9)
2024-08-02 22:37:36 +02:00
Nathan Hoad 41d96ac58f Update zonegroup test.
Signed-off-by: Nathan Hoad <nhoad@bloomberg.net>
(cherry picked from commit dad116b445)
2023-08-16 10:37:23 +02:00
Teoman ONAY 96b0f8abcd Add ipv6 libvirt support scenario in vagrant
Addition of ipv6 support in vagrant/libvirt and an all_daemons_ipv6 scenario.
Some typo fixes

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 8f3bdd8559)
2023-06-29 15:02:26 +02:00
Guillaume Abrioux 9f44aa21b0 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.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit b87f214a96)
2023-04-11 12:36:39 +02:00
Teoman ONAY 598b271abb Uses a more recent version of the CentOS stream 8 box
Uses the latest centos/streamX image available.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-03-17 07:54:27 +01:00
Teoman ONAY a5f589c8a9 Initialize rbd pool at pool creation
When creating a RBD pool it needs to be initialized as per documentation[1]
Modified (pre_)generate_ceph_cmd to make it usable with any command with
the same parameters as the ceph command

[1]https://docs.ceph.com/en/latest/rbd/rados-rbd-cmds/#create-a-block-device-pool

Signed-off-by: Teoman ONAY <tonay@redhat.com>
2023-02-14 10:52:14 +01:00
Wong Hoi Sing Edison bada32b4e0 library/ceph_key.py: rewrite for generate_ceph_cmd()
Also code lint with flake8

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2023-02-14 10:52:14 +01:00
Dimitri Savineau eadef1cec7 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 17784624e0)
2023-02-14 10:52:14 +01:00
Benoît Knecht 0f4240bc4e library/ceph_ec_profile.py: Support CRUSH device class
The `crush_device_class` option of the `ceph_ec_profile` module was documented
but not implemented.

This commit adds it and ensures its value is updated on the corresponding EC
profile.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2023-02-14 10:52:14 +01:00
Teoman ONAY ad4dd21d68 Revert "library: exit on user creation failure"
This reverts commit 17884d9848.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-02-14 10:52:14 +01:00
Teoman ONAY 971171d9e6 Revert "Initialize rbd pool at pool creation"
This reverts commit 5a750aa955.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
2023-02-14 10:52:14 +01:00
Teoman ONAY f33c2ccd34 Initialize rbd pool at pool creation
When creating a RBD pool it needs to be initialized as per documentation[1]
Modified (pre_)generate_ceph_cmd to make it usable with any command with
the same parameters as the ceph command

[1]https://docs.ceph.com/en/latest/rbd/rados-rbd-cmds/#create-a-block-device-pool

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

# Conflicts:
#	library/ceph_ec_profile.py
#	library/ceph_key.py
#	tests/library/test_ceph_key.py
2023-02-14 10:52:14 +01:00
Guillaume Abrioux d464f82bad tests: use quay.io instead of quay.ceph.io
This makes the CI use quay.io instead of quay.ceph.io

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e55ca01881)
2023-01-16 10:30:33 +01: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 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
Seena Fallah 54aca30a24 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>
2022-06-14 09:36:39 +02:00
Guillaume Abrioux 11fa908524 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 5a13688979)
2022-05-13 12:41:17 +02:00
Guillaume Abrioux 9842b1050f 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 839fac8f94)
2022-05-13 12:41:17 +02:00
Guillaume Abrioux 9519dd8995 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 3e87df5e8f)
2022-03-21 08:42:55 +01:00
Mathias Chapelain 5d7337305c 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 6c0c53fa2d)
2022-02-17 09:27:54 +01:00
Guillaume Abrioux 9916c2d752 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 bc36f60e8d)
2022-01-31 18:35:08 +01:00
Guillaume Abrioux e3b2514e2b 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 b02d71c307)
2021-11-30 21:04:31 +01:00
Guillaume Abrioux e29defef7d 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 fb8a66149b)
2021-10-25 15:33:18 +02:00
Guillaume Abrioux 07813aba14 tests: remove all references to ceph_stable_release
this is legacy and not needed anymore.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f277a39dfe)
2021-10-02 20:45:35 +02:00
Guillaume Abrioux c204166696 tests: add osd node in collocation
we update the pool size from 1 to 2 in idempotency test
but only 1 node is available.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b6c470c7e2)
2021-09-30 18:30:38 +02:00
Guillaume Abrioux a4e979df09 tests: set rgw_instances in collect-logs.yml
in order to gather rgw logs, we need rgw_instances to be set.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c2e46fe5a5)
2021-09-30 17:52:41 +02:00
Guillaume Abrioux 7f6cb83f51 tests: update collect-logs.yml playbook
- change `ceph -s` output to json-pretty.
- gather rgw logs
- add `health detail` command

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b2ccc7234a)
2021-09-30 17:48:21 +02:00
Guillaume Abrioux 7ecc85cc41 tests: move collect-logs.yml to ceph-ansible repo
related ceph-build PR: ceph/ceph-build#1914

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 702564518b)
2021-09-29 16:41:16 +02:00
Guillaume Abrioux dbc19729bd tests: fix container-cephadm job
add missing variable `containerized_deployment` in group_vars

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 66f3eb377c)
2021-09-29 09:57:59 +02:00
Dimitri Savineau feb0ba9dcc 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 f2bd8ae70f)
2021-08-27 14:32:56 -04:00
Dimitri Savineau 0186819855 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 f01ae82eec)
2021-08-27 14:32:56 -04:00
Dimitri Savineau 17884d9848 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 17784624e0)
2021-08-03 13:27:54 -04:00
Guillaume Abrioux 93f37e4b5a 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 70f1d6e2cd)
2021-07-13 17:02:36 -04:00
Dimitri Savineau a71a80c167 tox: remove ceph_dev variables and dev_setup calls
Since pacific is a stable release then we don't need to use shaman for getting
the pacific build.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2021-06-30 09:29:58 +02:00
Guillaume Abrioux 5fd24a3793 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 8c09497567)
2021-06-30 08:17:40 +02:00
Guillaume Abrioux 3e894ca899 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 d71db816c6)
2021-06-30 08:17:40 +02:00
Guillaume Abrioux 5787048599 tests: remove legacy file
This inventory isn't used anywhere.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 304d1cbb97)
2021-06-29 17:52:22 +02:00
Guillaume Abrioux 1bfedb8b8f tests: use nfs + cephfs instead of rgw in update job
Since nfs+rgw isn't going to be supported in Ceph Pacific, let's not
cover this in the CI.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2021-06-16 19:39:42 +02:00
Guillaume Abrioux b5214b29fc 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 c2aaa96fc7)
2021-06-11 10:49:51 +02:00
Guillaume Abrioux 11f953a15f 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 9efca34ac3)
2021-05-25 18:59:03 +02:00
Alex Schultz 56aac327dd Use ansible_facts
It has come to our attention that using ansible_* vars that are
populated with INJECT_FACTS_AS_VARS=True is not very performant.  In
order to be able to support setting that to off, we need to update the
references to use ansible_facts[<thing>] instead of ansible_<thing>.

Related: ansible#73654
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1935406
Signed-off-by: Alex Schultz <aschultz@redhat.com>
(cherry picked from commit a7f2fa73e6)
2021-03-26 00:04:49 +01:00
Guillaume Abrioux ab857d8b54 tests: use master build for iscsigws
pacific builds for iscsi pkgs aren't available, as a workaround we can
use builds from master.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2021-03-24 21:36:24 +01:00
Guillaume Abrioux 723efc8576 tests: switch to quay.ceph.io for dashboard images
for some reason, `quay.io/app-sre/grafana` no longer exist.
as a workaround, all dashboard related images have been mirrored on
quay.ceph.io.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c90b0985e5)
2021-03-24 21:36:24 +01:00
Guillaume Abrioux 439cb79e3e tests: fix `test_rgw_is_up` test
The data structure seems to have been modified in ceph@master (quincy).

This commit update the test accordingly.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b8080bac41)
2021-03-24 21:36:24 +01:00
Guillaume Abrioux fb75fce4fa tests: fix `test_nfs_is_up` test
the data structure seems to have been modified in ceph@master (quincy).

This commit update the test accordingly.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7e1db0b599)
2021-03-24 21:36:24 +01:00
Guillaume Abrioux 5893a17886 tests: remove 1 client VM in external_clients job
We only use 2 client in this scenario, there's no need to fire up a
third VM.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit fb1a5f071a)
2021-03-18 08:54:33 +01:00
Florian Haas 95949ec787 requirements.txt: Move the six dependency into the general requirements
config_template.py depends on six, which isn't listed in the default
requirements.txt. This previously frequently wasn't a problem, because
six used to be a standard package being installed into a venv, and
lots of other projects depended on it.

It also does get installed for unit and integration tests via
tests/requirements.txt, so any broken dependency on six wouldn't be
detected by tox runs.

However, as other projects and distributions have phased out Python
2.7 support the dependency on six becomes less common. Thus, as long
as ceph-ansible does require it for config_template.py, add it to the
base requirements.

Signed-off-by: Florian Haas <florian@citynetwork.eu>
(cherry picked from commit d49ea9818b)
2021-03-01 15:16:55 +01:00
Guillaume Abrioux 2feefdc861 tests: increase `mon_max_pg_per_osd`
we aren't deploying enough OSD daemon, so it fails like following:

```
  stderr: 'Error ERANGE: pool id 10 pg_num 256 size 2 would mean 1536 total pgs, which exceeds max 1500 (mon_max_pg_per_osd 250 * num_in_osds 6)'
```

Let's increase the value of `mon_max_pg_per_osd` in order to get around
this issue in the CI.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 682116023d)
2021-02-12 09:15:24 +01:00
Guillaume Abrioux 7dd4a8a059 tests: use shaman to test against ceph pacific
Given there's no pacific packages available at
https://download.ceph.com, let's use shaman in order to test against
Ceph Pacific

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2021-02-12 09:15:24 +01:00
Guillaume Abrioux 54bae480d2 tests: set `mon_max_pg_per_osd` in rgw_multisite
Otherwise, the job fails when it tries to create a bucket with `s3cmd mb`
command because we have too many PGs per OSD.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2021-02-10 07:01:21 +01:00