Commit Graph

3856 Commits (f53eca31267710c83545ea5272cc2de22c7b7597)
 

Author SHA1 Message Date
Guillaume Abrioux f53eca3126 mds: add filter | int on condition
This seems to break the update scenario CI testing in stable-3.2.

Typical error:
```
The conditional check 'mds_max_mds > 1' failed. The error was: Unexpected templating type error occurred on ({% if mds_max_mds > 1 %} True {% else %} False {% endif %}): '>' not supported between instances of 'str' and 'int'
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2021-04-08 13:29:31 +02:00
Dimitri Savineau 143cdd731a tests: pg num should be a power of two number
This patch changes the pg_num value of the rgw pools foo and bar to be
a power of two number.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2020-02-17 13:51:15 -05:00
Dimitri Savineau c243cafe5e tests: reduce max_mds from 3 to 2
Having max_mds value equals to the number of mds nodes generates a
warning in the ceph cluster status:

cluster:
id:     6d3e49a4-ab4d-4e03-a7d6-58913b8ec00a'
health: HEALTH_WARN'
        insufficient standby MDS daemons available'
(...)
services:
  mds:     cephfs:3 {0=mds1=up:active,1=mds0=up:active,2=mds2=up:active}'

Let's use 2 active and 1 standby mds.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 4a6d19dae2)
2019-12-04 17:57:47 -05:00
Guillaume Abrioux fdeda6f03f mds: allow multi mds when ceph is >= jewel
Otherwise, the task to set max_mds will fail.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-10-21 10:12:42 +02:00
Guillaume Abrioux 9d97420b02 tests: add multimds coverage
This commit makes the all_daemons scenario deploying 3 mds in order to
cover the multimds case.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-10-17 16:44:45 +02:00
Guillaume Abrioux 7e56576a38 tests: update tox due to pipeline removal
This commit reflects the recent changes in ceph/ceph-build#1406

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit bcaf8cedee)
2019-10-09 09:03:21 +02:00
Guillaume Abrioux 91fbf79d03 tests: set gateway_ip_list dynamically
so we dont' have to hardcode this in the tests

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d9f6b37ae6)
2019-10-04 12:01:19 +02:00
Guillaume Abrioux cd3e4f27a5 Vagrantfile: support more than 9 nodes per daemon type
because of the current ip address assignation, it's not possible to
deploy more than 9 nodes per daemon type.
This commit refact a bit and allows us to get around this limitation.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 778c51a0ff)
2019-10-03 16:44:52 +02:00
Guillaume Abrioux b6240e7d2e tests: add inventory host file for ubuntu job
this commit adds the missing inventory host file for ubuntu/all_daemons
based scenarios.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-07-11 13:32:41 +02:00
Dimitri Savineau 5655b38ce7 tests: Update ansible ssh_args variable
Because we're using vagrant, a ssh config file will be created for
each nodes with options like user, host, port, identity, etc...
But via tox we're override ANSIBLE_SSH_ARGS to use this file. This
remove the default value set in ansible.cfg.

Also adding PreferredAuthentications=publickey because CentOS/RHEL
servers are configured with GSSAPIAuthenticationis enabled for ssh
server forcing the client to make a PTR DNS query.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 34f9d51178)
2019-07-11 11:39:03 +02:00
Dimitri Savineau 88c6c3fcca ansible.cfg: Add library path to configuration
Ceph module path needs to be configured if we want to avoid issues
like:

no action detected in task. This often indicates a misspelled module
name, or incorrect module path

Currently the ansible-lint command in Travis CI complains about that.

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

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit a1a871cade)
(cherry picked from commit c056ae7b8c)
2019-07-11 10:02:25 +02:00
Guillaume Abrioux f463d1838e mgr: wait for all mgr to be available
before managing mgr modules, we must ensure all mgr are available
otherwise we can hit failure like following:

```
stdout:Error ENOENT: all mgr daemons do not support module 'restful', pass --force to force enablement
```

It happens because all mgr are not yet available when trying to manage
with mgr modules.

This should have been cherry-picked from
41f7518c1b but there's too much changes.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-07-11 10:02:25 +02:00
Guillaume Abrioux 652374636e nfs: add coverage on `ganesha_conf_overrides`
This commit adds `ganesha_conf_overrides` variable in CI testing.
This fixes the test `test_nfs_config_override`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-07-10 14:24:52 +02:00
Guillaume Abrioux 24810e0da2 tests: fix purge scenarios names
This commit fixes the purge_* scenario names in stable-3.1

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-07-10 11:57:22 +02:00
Guillaume Abrioux 13602e426d tests: add missing variables in collocation scenario
add :

ceph_origin: repository
ceph_repository: community

in all.yml for collocation scenario (non contanier)

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-05-23 11:14:00 +02:00
Guillaume Abrioux 018297957e tests: fix path to inventory host file in tox-update.ini
the path had `/{env:CONTAINER_DIR:}` which is already added in
`changedir=` section. That led to a wrong path so the initial deployment
couldn't complete.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-05-22 13:54:05 +02:00
Guillaume Abrioux bf17099964 tests: split update in a dedicated tox.ini file
This commit splits the update scenario into a dedicated tox.ini file.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-05-21 09:25:15 +02:00
Guillaume Abrioux 4cc08f7e1d tests: use INVENTORY env variable in tox
let's use `INVENTORY` variable to run against the right inventory host
regarding which OS we are running on.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-05-20 13:36:18 +02:00
Guillaume Abrioux d63b1c993d tests: add back testinfra testing
136bfe0 removed testinfra testing on all scenario excepted all_daemons

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 8d106c2c58)
2019-04-04 14:26:58 +00:00
Guillaume Abrioux 9a8c1d4081 tests: pin pytest-xdist to 1.27.0
looks like newer version of pytest-xdist requires pytest>=4.4.0

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ba0a95211c)
2019-04-04 14:26:58 +00:00
Dimitri Savineau 8cad54e0ef tox: Fix container purge jobs
On containerized CI jobs the playbook executed is purge-cluster.yml
but it should be set to purge-docker-cluster.yml

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit bd0869cd01)
2019-04-04 09:14:05 +02:00
Guillaume Abrioux dd77affe7f tests: fix shrink_mon scenario
since the node names have changed recently (the 'ceph-' prefix has been
removed), we must change the name in the shrink_mon playbook command
here.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-04-03 10:03:10 +02:00
Guillaume Abrioux a80ea0a929 tests: fix shrink_osd scenario
the wrong image version was used to run shrink_osd playbook.
in stable-3.1 we should use a luminous image, not nautilus which doesn't
have ceph-disk binary anymore.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-04-03 09:48:04 +02:00
Guillaume Abrioux 7926eebebf tests: disable nfs scenario
The packages are broken, so let's remove it, until this solved.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-04-03 07:27:42 +00:00
Guillaume Abrioux f4f41d62ce tests: test idempotency only on all_daemons job
there's no need to test this on all scenarios.
testing idempotency on all_daemons should be enough and allow us to save
precious resources for the CI.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 136bfe096c)
2019-04-03 07:27:42 +00:00
Guillaume Abrioux 64bee9cb86 osd: backward compatibility with old disk_list.sh location
Since all files in container image have moved to `/opt/ceph-container`
this check must look for new AND the old path so it's backward
compatible. Otherwise it could end up by templating an inconsistent
`ceph-osd-run.sh`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 987bdac963)
2019-04-02 11:09:46 +02:00
Guillaume Abrioux 69cda84a21 iscsi-gws: remove a leftover
remove leftover introduced by 9d590f4

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d4b3c1d409)
2019-03-28 15:36:26 +00:00
Guillaume Abrioux ff243781c5 iscsi: fix permission denied error
Typical error:
```
fatal: [iscsi-gw0]: FAILED! =>
  msg: 'an error occurred while trying to read the file ''/home/guits/ceph-ansible/tests/functional/all_daemons/fetch/e5f4ab94-c099-4781-b592-dbd440a9d6f3/iscsi-gateway.key'': [Errno 13] Permission denied: b''/home/guits/ceph-ansible/tests/functional/all_daemons/fetch/e5f4ab94-c099-4781-b592-dbd440a9d6f3/iscsi-gateway.key'''
```

`become: True` is not needed on the following task:

`copy crt file(s) to gateway nodes`.

Since it's already set in the main playbook (site.yml/site-container.yml)

The thing is that the files get generated in the 'fetch_directory' with
root user because there is a 'delegate_to' + we run the playbook with
`become: True` (from main playbook).

The idea here is to create files under ansible user so we can open them
later to copy them on the remote machine.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 9d590f4339)
2019-03-28 15:36:26 +00:00
Guillaume Abrioux d9895338d0 tests: rename all nodes name
remove the 'ceph-' prefix in order to have the same names in all
branches.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-03-28 13:39:54 +00:00
Guillaume Abrioux 9df795abdc tests: use memory backend for cache fact
force ansible to generate facts for each run.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 4a1bafdc21)
2019-03-05 10:06:08 +01:00
Guillaume Abrioux 7c51657c58 tests: remove lvm_batch scenario
this scenario doesn't exist in stable-3.1

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-03-04 16:26:56 +01:00
Guillaume Abrioux a16ab0cad5 tests: refact all stable-3.1 testing
refact the testing on stable-3.1 the same way it has been made for
stabe-3.2 and master.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-03-04 14:44:57 +01:00
Patrick Donnelly cb92299756 use shortname in keyring path
socket.gethostname may return a FQDN. Problem found in Linode.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 8cd0308f5f)
2019-01-30 15:01:04 +01:00
Rishabh Dave b39345751f ceph-common: disable unrequired NTP services
When one of the currently supported NTP services has been set up,
disable rest of the NTP services on Ceph nodes.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1651875
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 6fa757d343)
2019-01-14 16:37:35 +01:00
Rishabh Dave ada7a400c2 ceph-common: merge ntp_debian.yml and ntp_rpm.yml
Merge ntp_debian.yml and ntp_rpm.yml into one (the new file is called
setup_ntp.yml) since they are almost identical.

Since this is as a "as it is" backport for the original commit, it also
adds the feature of supporting multiple NTP daemons (namely, chronyd &
timesyncd). This is to maintain consistency across all branches
since the backport for stable-3.2 was auto-merged by mergify despite
of conflicts.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit b03ab60742)
2019-01-14 16:37:35 +01:00
Benjamin Cherian bb41a7da20 Add support for different NTP daemons
Allow user to choose between timesyncd, chronyd and ntpd
Installation will default to timesyncd since it is distributed as
part of the systemd installation for most distros.
Added note indicating NTP daemon type is not used for containerized
deployments.

Fixes issue #3086 on Github

Signed-off-by: Benjamin Cherian <benjamin_cherian@amat.com>
(cherry picked from commit 85071e6e53)
2019-01-14 16:37:35 +01:00
Sébastien Han c34027c3ba rolling_update: do not fail on missing keys
We don't want to fail on key that are not present since they will get
created after the mons are updated. They will be created by the task
"create potentially missing keys (rbd and rbd-mirror)".

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1650572
Signed-off-by: Sébastien Han <seb@redhat.com>
2018-11-29 15:50:07 +01:00
Guillaume Abrioux 741ef74629 update: fix a typo
`hostvars[groups[mon_host]]['ansible_hostname']` seems to be a typo.
That should be `hostvars[mon_host]['ansible_hostname']`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7c99b6df6d)
2018-11-26 19:36:30 +00:00
Guillaume Abrioux 9022f83450 rolling_update: refact set_fact `mon_host`
each monitor node should select another monitor which isn't itself.
Otherwise, one node in the monitor group won't set this fact and causes
failure.

Typical error:
```
TASK [create potentially missing keys (rbd and rbd-mirror) when mon is containerized] ***
task path: /home/jenkins-build/build/workspace/ceph-ansible-prs-dev-update_docker_cluster/rolling_update.yml:200
Thursday 22 November 2018  14:02:30 +0000 (0:00:07.493)       0:02:50.005 *****
fatal: [mon1]: FAILED! => {}

MSG:

The task includes an option with an undefined variable. The error was: 'dict object' has no attribute u'mon2'
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit af78173584)
2018-11-26 19:36:30 +00:00
Sébastien Han 5c9aa5ed66 rolling_update: create rbd and rbd-mirror keyrings
During an upgrade ceph won't create keys that were not existing on the
previous version. So after the upgrade of let's Jewel to Luminous, once
all the monitors have the new version they should get or create the
keys. It's ok to have the task fails, especially for the rbd-mirror
key, which only appears in Nautilus.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1650572
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 4e267bee4f)
2018-11-26 19:36:30 +00:00
Sébastien Han 46a2701b5e ceph_key: add a get_key function
When checking if a key exists we also have to ensure that the key exists
on the filesystem, the key can change on Ceph but still have an outdated
version on the filesystem. This solves this issue.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 691f373543)
2018-11-26 19:36:30 +00:00
Jairo Llopis a5aca6ebbc Fix problem with ceph_key in python3
Pretty basic problem of iteritems removal.

Signed-off-by: Jairo Llopis <yajo.sk8@gmail.com>
(cherry picked from commit fc20973c2b)
2018-10-26 16:23:34 +02:00
Guillaume Abrioux 10403b76e3 tox: fix a typo
the line setting `ANSIBLE_CONFIG` obviously contains a typo introduced
by 1e283bf69b

`ANSIBLE_CONFIG` has to point to a path only (path to an ansible.cfg)

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a0cceb3e44)
2018-10-26 16:22:46 +02:00
Sébastien Han d814644c4a rolling_update: fix upgrade when using fqdn
CLusters that were deployed using 'mon_use_fqdn' have a different unit
name, so during the upgrade this must be used otherwise the upgrade will
fail, looking for a unit that does not exist.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1597516
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 44d0da0dd4)
2018-10-24 12:42:14 +00:00
Guillaume Abrioux 7c9699ad51 tests: do not install lvm2 on atomic host
we need to detect whether we are running on atomic host to not try to
install lvm2 package.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d2ca24eca8)
2018-10-16 14:35:08 +02:00
Alfredo Deza f4a5551bfd tests: install lvm2 before setting up ceph-volume/LVM tests
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 3e488e8298)
2018-10-16 14:35:08 +02:00
Noah Watkins e089f46607 Stringify ceph_docker_image_tag
This could be a numeric input, but is treated like a string leading to
runtime errors.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1635823

Signed-off-by: Noah Watkins <nwatkins@redhat.com>
(cherry picked from commit 8dcc8d1434)
2018-10-16 14:35:08 +02:00
Noah Watkins 75c9130865 Avoid using tests as filter
Fixes the deprecation warning:

  [DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of
  using `result|search` use `result is search`.

Signed-off-by: Noah Watkins <nwatkins@redhat.com>
(cherry picked from commit 306e308f13)
2018-10-16 14:35:08 +02:00
Andy McCrae ee1b6dd83c Sync config_template with upstream for Ansible 2.6
The original_basename option in the copy module changed to be
_original_basename in Ansible 2.6+, this PR resyncs the config_template
module to allow this to work with both Ansible 2.6+ and before.

Additionally, this PR removes the _v1_config_template.py file, since
ceph-ansible no longer supports versions of Ansible before version 2,
and so we shouldn't continue to carry that code.

Closes: #2843
Signed-off-by: Andy McCrae <andy.mccrae@gmail.com>
(cherry picked from commit a1b3d5b7c3)
2018-10-15 22:00:35 +00:00
Sébastien Han d0b03f6faa switch: copy initial mon keyring
We need to copy this key into /etc/ceph so when ceph-docker-common runs
it can fetch it to the ansible server. Previously the task wasn't not
failing because `fail_on_missing` was False before 2.5, so now it's True
hence the failure.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit bae0f41705)
2018-10-15 13:59:21 +02:00