Commit Graph

213 Commits (31bd5e08a666f63daff5ec91f476a008c5f3b3f0)

Author SHA1 Message Date
Guillaume Abrioux 97ebcf0006 tests: update default value for CEPH_STABLE_RELEASE
- update value for `CEPH_STABLE_RELEASE`: next release will ship with
`nautilus`. This variable is used for stable branch only, this way, it
will be ready when next stable version will be released.

- test upgrade from mimic to ceph@master: don't run dev_setup.yml on update
scenario, and run it in [update] section so we update from mimic to
ceph@master.

- run lvm_setup.yml for all scenarios except `lvm_batch`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-01-24 11:46:32 +01:00
Guillaume Abrioux 715a64c899 tests: cleanup tox definition
remove useless environment variable definition since we know we only
test ceph@master on ceph-ansible master branch.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2019-01-24 11:46:32 +01:00
Noah Watkins 110049e825 playbook: report storage device inventory
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-12-18 10:51:31 +01:00
Sébastien Han 5419497726 test: use yaml stdout callback
This provides a much more readable output for tasks. It'll be easier to
debug traces.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-12-17 14:09:55 +01:00
Sébastien Han 656fbd2901 purge: tox add lvm-setup
Since we deploy > purge > deploy the LVs are gone so we much recreate
them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-12-11 09:59:25 +01:00
Sébastien Han efefcc3fb2 tox: add missing ceph_docker_image_tag in shrink
When calling shrink on containerized deployment, we were first doing the
setup with `latest-master` and then when calling the playbook we were
using the default value for `ceph_docker_image_tag` that comes from
ceph-defaults. Now we pass
`ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-master}` so the
play will run the right container image.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-12-04 19:01:25 +01:00
Guillaume Abrioux b04fe72f35 tests: add purge_lvm_osds_container scenario
This commits adds the purge_lvm_osds_container scenario.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-12-03 17:35:21 +01:00
Guillaume Abrioux 96ce8761ba tests: rgw_multisite allow clusters to talk to each other
Adding this rule on the hypervisor will allow cluster to talk to each
other.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-11-28 21:53:59 +00:00
Guillaume Abrioux 5af5ad6d61 tests: fix image tag for secondary rgw cluster (rgw_multisite)
the first cluster is using `latest-master` while the second is using
`latest` which is not the right version to be used here.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-11-28 11:22:04 +00:00
Guillaume Abrioux 3d8f4e6304 tests: apply dev_setup on the secondary cluster for rgw_multisite
we must apply this playbook before deploying the secondary cluster.
Otherwise, there will be a mismatch between the two deployed cluster.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-11-28 11:22:04 +00:00
Sébastien Han a96e910114 Add new container scenario
Test with podman instead of docker and also support for python 3 only.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-11-27 16:47:40 +00:00
Sébastien Han 661213a6a8 tox: add lvm setup to shrink mon
Fix shrink mon scenario by setting lvm so we can configure ceph-volume
lvm osds.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-11-13 18:31:10 +00:00
Guillaume Abrioux 811f043947 tests: test ooo_collocation agasint v3.0.3 ceph-container image
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-11-06 09:06:34 +00:00
Guillaume Abrioux 37970a5b3c tests: add rgw_multisite functional test
Add a playbook that will upload a file on the master then try to get
info from the secondary node, this way we can check if the replication
is ok.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-10-30 14:00:28 +01:00
Guillaume Abrioux 4d464c1003 rgw: add testing scenario for rgw multisite
This will setup 2 cluster with rgw multisite enabled.
First cluster will act as the 'master', the 2nd will be the secondary
one.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-10-30 14:00:28 +01:00
Sébastien Han 89e76e5baf tox: change container image to use master
We have a latest-master image which contains builds from upstream ceph
so let's use it to verify build.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-10-29 15:33:12 +01:00
Sébastien Han 2fd7da12bb test: remove ceph-disk CI tests
Since we are removing the ceph-disk test from the ci in master then
there is no need to have the functionnal tests in master anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-10-29 15:33:12 +01:00
Guillaume Abrioux a0cceb3e44 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>
2018-10-25 14:40:58 +00:00
Guillaume Abrioux 3632b26005 tests: add tests for day-2-operation playbook
Adding testing scenarios for day-2-operation playbook.

Steps:
- deploys a cluster,
- run testinfra,
- test idempotency,
- add a new osd node,
- run testinfra

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-10-17 11:26:11 +00:00
Guillaume Abrioux 40b7747af7 remove jewel support
As of now, we should no longer support Jewel in ceph-ansible.
The latest ceph-ansible release supporting Jewel is `stable-3.1`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-10-12 23:38:17 +00:00
Sébastien Han 31a0438cb2 ceph_volume: refactor
This commit does a couple of things:

* Avoid code duplication
* Clarify the code
* add more unit tests
* add myself to the author of the module

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-10-10 16:08:41 -04:00
Sébastien Han 90c66a5848 ci: test lvm in containerized
Signed-off-by: Sébastien Han <seb@redhat.com>
2018-10-10 16:08:41 -04:00
Guillaume Abrioux 6954ac184f tests: do not upgrade ceph release for switch_to_containers scenario
Using `UPDATE_*` environment variables here will make an upgrade of the
ceph release when running switch_to_containers scenario which is not
correct.

Eg:
If ceph luminous was first deployed, then we should switch to ceph
luminous containers, not to mimic.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-09-09 14:25:14 +02:00
Andrew Schoen 04df3f0802 lv-create: use copy instead of the template module
The copy module does in fact do variable interpolation so we do not need
to use the template module or keep a template in the source.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-08-16 16:38:23 +02:00
Andrew Schoen f5a4c89869 tests: cat the contents of lv-create.log in infra_lv_create
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-08-16 16:38:23 +02:00
Andrew Schoen 810cc47892 tests: adds a testing scenario for lv-create and lv-teardown
Using an explicitly named testing environment name allows us to have a
specific [testenv] block for this test. This greatly simplifies how it will
work as it doesn't really anything from the ceph cluster tests.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-08-16 16:38:23 +02:00
Andrew Schoen 6d431ec22d ceph-volume: implement the 'lvm batch' subcommand
This adds the action 'batch' to the ceph-volume module so that we can
run the new 'ceph-volume lvm batch' subcommand. A functional test is
also included.

If devices is defind and osd_scenario is lvm then the 'ceph-volume lvm
batch' command will be used to create the OSDs.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-08-09 09:41:58 -04:00
Guillaume Abrioux b89cc1746f tests: do not deploy all daemons for shrink osds scenarios
Let's create a dedicated environment for these scenarios, there is no
need to deploy everything.
By the way, doing so will save some times.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-07-23 18:30:06 +02:00
Guillaume Abrioux d8281e50f1 tests: support update scenarios in test_rbd_mirror_is_up()
`test_rbd_mirror_is_up()` is failing on update scenarios because it
assumes the `ceph_stable_release` is still set to the value of the
original ceph release, it means it won't enter in the right part of the
condition and fails.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-07-20 07:46:41 +02:00
Guillaume Abrioux 651ee469f6 tests: stop hardcoding ansible version
In addition to ceph/ceph-build#1082

Let's set the ansible version in each ceph-ansible branch's respective
requirements.txt.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-07-19 23:10:37 +02:00
Guillaume Abrioux 05852b0301 tests: add latest-bis-jewel for jewel tests
since no latest-bis-jewel exists, it's using latest-bis which points to
ceph mimic. In our testing, using it for idempotency/handlers tests
means upgrading from jewel to mimic which is not what we want do.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-07-17 09:10:15 +00:00
Guillaume Abrioux 103529c172 tox: test mimic deployment
Let's try to deploy mimic.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d2cdfd830c)
2018-07-06 16:31:49 +00:00
Guillaume Abrioux b6d09b510f tests: refact ci testing master
We should test ceph-ansible against the latest ansible stable version on
master.

This commit also remove the pinning to 1.7.1 version of testinfra
because ansible 2.5 requires a newer version.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-07-06 16:31:49 +00:00
Guillaume Abrioux 081600842f tests: reduce the amount of time we wait
This sleep 120 looks a bit long, let's reduce this to 30sec and see if
things go faster.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-06-27 10:13:26 +00:00
Guillaume Abrioux 775a77dcd9 Revert "tests: add more verbosity in testinfra"
This reverts commit 68eb850b27.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-06-20 16:56:48 +02:00
Guillaume Abrioux 68eb850b27 tests: add more verbosity in testinfra
that may be helpful to know why a test has been skipped.

from pytest doc:

```
  -r chars              show extra test summary info as specified by chars
                        (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed,
                        (p)passed, (P)passed with output, (a)all except pP.
                        Warnings are displayed at all times except when
                        --disable-warnings is set
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-06-20 13:54:18 +02:00
Guillaume Abrioux 21894655a7 tests: keep same ceph release during handlers/idempotency test
since `latest` points to `mimic`, we need to force the test to keep the
same ceph release when testing anything else than `mimic`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-06-15 11:45:51 -04:00
Guillaume Abrioux 752781e2c9 core: make ansible pinning to latest ansible 2.4
it looks "ansible~=2.4" install latest ansible release in 2.5 so we must
specify we want latest release but inferior to 2.5.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-06-12 14:26:29 +08:00
Guillaume Abrioux a351b08726 tests: set CEPH_DOCKER_IMAGE_TAG when ceph release is luminous
Since latest points to mimic for the ceph container images, we need to
set `CEPH_DOCKER_IMAGE_TAG` to `latest-luminous` when ceph release is
luminous

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-06-11 23:35:56 +08:00
Sébastien Han 41b4632abc test: do not always copy admin key
The admin key must be copied on the osd nodes only when we test the
shrink scenario. Shrink relies on ceph-disk commands that require the
admin key on the node where it's being executed.

Now we only copy the key when running on the shrink-osd scenario.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-06-05 09:39:30 +02:00
Guillaume Abrioux 98cb6ed8f6 tests: avoid yum failures
In the CI we can see at many times failures like following:

`Failure talking to yum: Cannot find a valid baseurl for repo:
base/7/x86_64`

It seems the fastest mirror detection is sometimes counterproductive and
leads yum to fail.

This fix has been added in the `setup.yml`.
This playbook was used until now only just before playing `testinfra`
and could be used before running ceph-ansible so we can add some
provisionning tasks.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Erwan Velu <evelu@redhat.com>
2018-05-28 22:04:35 +02:00
Sébastien Han 203c9af0ac ci: test ansible 2.5
Signed-off-by: Sébastien Han <seb@redhat.com>
2018-04-23 10:17:24 +02:00
Sébastien Han 14eff6b571 tox: use container latest tag for upgrades
Currently tag-build-master-luminous-ubuntu-16.04 is not used anymore.
Also now, 'latest' points to CentOS so we need to make that switch here
too.

We know have latest tags for each stable release so let's use them and
point tox at them to deploy the right version.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-04-09 13:54:55 +02:00
Andy McCrae 60d4b75f51 Cleanup plugins directories and references
Having callback_plugins, and action plugins in random locations causes
a lot of disparity.

We should centralize this into one place in the plugins directory and
fix up the ansible.cfg to reflect this.

Additionally, since the ansible.cfg already reflects action_plugins, we
don't need a link to action_plugins in the base of the repository.
2018-03-14 11:15:39 +01:00
Guillaume Abrioux 1e283bf69b tests: make CI jobs using 'ansible.cfg'
The jobs launches by the CI are not using 'ansible.cfg'.
There are some parameters that should avoid SSH failure that we are used
to see in the CI so far.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-02-28 13:51:52 +01:00
Guillaume Abrioux 707458c979 ci: add tripleo scenario testing
This should help to see earlier any failure in a tripleo deployment scenario.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-02-23 13:54:32 +01:00
Sébastien Han 7ba25b20dc ci: test on ansible 2.4.2
Signed-off-by: Sébastien Han <seb@redhat.com>
2018-01-11 17:27:42 +01:00
Andrew Schoen a8509fbc9c test: set UPDATE_CEPH_DOCKER_IMAGE_TAG for jewel tests
We want to be explict here and update to luminous and not
the 'latest' tag.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-01-06 14:07:55 +01:00
Guillaume Abrioux 73a20e9b50 Revert "tests: set CEPH_STABLE_RELEASE in ceph-build"
This reverts commit 7a1d7d92ff.
2017-12-12 09:48:50 +01:00
Guillaume Abrioux 7a1d7d92ff tests: set CEPH_STABLE_RELEASE in ceph-build
`CEPH_STABLE_RELEASE` needs to bet set in ceph-build according
to ceph/ceph-ansible#2165

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-14 13:39:54 +01:00
Guillaume Abrioux de0900eae1 tests: sync with ceph/ceph-build for ceph-ansible-nightlies
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-03 10:25:12 +01:00
Guillaume Abrioux 4596fbaac1 common: make the delegate_facts feature optional
Since we encountered issue with this on ansible2.2, this commit provide
the ability to enable or disable it regarding which ansible we are
running.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-31 16:44:26 +01:00
Guillaume Abrioux c28882c1cd tests: add missing test for rbd
Add a missing test `test_rbd_mirror_service_is_running_from_luminous()`.
Also using bash -c "<cmd>" to make testinfra aware that later in
the upgrade process we are now running `luminous` ceph release so we
must skip the rbd tests related to `jewel` ceph release.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-30 19:44:56 +01:00
Guillaume Abrioux 97b1cb0258 tests: followup on testing against ansible2.4
ceph-ansible is now being testing against ansible2.2 and ansible2.4. We
need to update tox.ini so we use the right version of testinfra
regarding which ansible version we are using.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-30 16:40:39 +01:00
Sébastien Han b3c9de90f4 Merge pull request #2090 from ceph/ansible-2.4
[skip ci] Test ansible 2.4.1
2017-10-27 17:39:05 +02:00
Sébastien Han c4ad247718 Test ansible 2.4.1
We now test with Ansible 2.4. We had to change testinfra's version since
only recent versions work with 2.4. See:
https://github.com/philpep/testinfra/issues/249

Closes: https://github.com/ceph/ceph-ansible/issues/2087
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-27 15:20:13 +02:00
Alfredo Deza f0364ba47f tests add the bluestore scenario in tox.ini
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-10-25 06:50:19 -04:00
Guillaume Abrioux 280de30484 tests: split purge_cluster, followup on a53aa9e
- split purge_cluster because we need to test filestore and bluestore
scenarios.
- clean some leftover.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-23 16:27:48 +02:00
Guillaume Abrioux db6b93d441 tests: only test upgrade jewel > luminous
Since it has been decided to stop testing against kraken, we have to
test upgrade from jewel to luminous instead of kraken.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-19 17:00:27 +02:00
Guillaume Abrioux 93f0856770 tests: re-add missing param in tox
this line has been removed by mistake in a53aa9e.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-19 17:00:27 +02:00
Sébastien Han a53aa9e8b4 ci: new osd scenarios
This commit add new osd scenarios, it aims to simplify the CI setup and
brings a better coverage on the OSD scenarios.
We decided to differentiate between filestore and bluestore, thinking
ahead when filestore won't be supported anymore.
So we now have two classes of tests:

* Filestore
* Bluestore

In each of those classes we have container and non-container.
Then for each we test the following:

* collocated
* collocated dmcrypt
* non-collocated
* non-collocated dmcrypt
* auto discovery collocated
* auto discovery collocated dmcrypt

This gives us a nice coverage and also reduces the footprint on the CI.
We are now up to 4 scenarios, each containing 6 OSD VMs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-18 09:26:06 +02:00
Sébastien Han 3e058bff06 ci: reboot with ansible instead of vagrant reload
vagrant is serialized and takes a lot of time compare to simple reboot.
See the benchmarks below for 3 VMs:

[leseb@rick docker]$ time ANSIBLE_SSH_ARGS="-F
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/vagrant_ssh_config"  ansible-playbook -i /home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/hosts reboot.yml

PLAY [mons]
****************************************************************************************************************************************************************************************************

TASK [Gathering Facts]
*****************************************************************************************************************************************************************************************
ok: [mon1]
ok: [mon2]
ok: [mon0]

TASK [restart machine]
*****************************************************************************************************************************************************************************************
changed: [mon2]
changed: [mon1]
changed: [mon0]

TASK [wait for server to boot]
*********************************************************************************************************************************************************************************
ok: [mon2 -> localhost]
ok: [mon0 -> localhost]
ok: [mon1 -> localhost]

TASK [uptime]
**************************************************************************************************************************************************************************************************
changed: [mon2]
changed: [mon0]
changed: [mon1]

PLAY RECAP
*****************************************************************************************************************************************************************************************************
mon0                       : ok=4    changed=2    unreachable=0
failed=0
mon1                       : ok=4    changed=2    unreachable=0
failed=0
mon2                       : ok=4    changed=2    unreachable=0
failed=0

real    0m35.112s
user    0m5.737s
sys     0m1.849s

[leseb@rick docker]$ time vagrant reload
==> mon0: Halting domain...
==> mon0: Starting domain.
==> mon0: Waiting for domain to get an IP address...
==> mon0: Waiting for SSH to become available...
==> mon0: Creating shared folders metadata...
==> mon0: Rsyncing folder:
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/
=> /home/vagrant/sync
==> mon0: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> mon0: flag to force provisioning. Provisioners marked to run always
will still run.
==> mon1: Halting domain...
==> mon1: Starting domain.
==> mon1: Waiting for domain to get an IP address...
==> mon1: Waiting for SSH to become available...
==> mon1: Creating shared folders metadata...
==> mon1: Rsyncing folder:
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/
=> /home/vagrant/sync
==> mon1: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> mon1: flag to force provisioning. Provisioners marked to run always
will still run.
==> mon2: Halting domain...
==> mon2: Starting domain.
==> mon2: Waiting for domain to get an IP address...
==> mon2: Waiting for SSH to become available...
==> mon2: Creating shared folders metadata...
==> mon2: Rsyncing folder:
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/
=> /home/vagrant/sync
==> mon2: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> mon2: flag to force provisioning. Provisioners marked to run always
will still run.

real    1m31.850s
user    0m7.387s
sys     0m0.796s

Reboot via Ansible: 0m35.112s
Reboot via vagrant: 1m31.850s

We save 1/3 time.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-13 09:04:26 +02:00
Major Hayden c233c874f5
Enable profile_tasks callback plugin
This patch adds the `profile_tasks` callback plugin to the whitelist
so that we can identify the tasks which are taking the longest amount
of time to run.
2017-10-12 11:43:29 -05:00
Sébastien Han e15302c284 tox: decrease sleep to 2min instead of 5.
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-09 17:25:44 +02:00
Guillaume Abrioux f0fd3aae79 tests: increase number of threads for testinfra
from 4 to 8 to make testing faster.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-04 16:51:32 +02:00
Sébastien Han 5968cf09b1 ci: add collocation scenario
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-04 11:19:12 +02:00
Sébastien Han 18e2ab4d07 test: add handler support
Add idempotency and handler test.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-03 14:44:00 +02:00
Sébastien Han 083c53c6bd ci: run purge cluster on centos not ubuntu
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 02:38:24 +02:00
Sébastien Han e113d94c9a tests: implement reboot after a deployment
We don't test server reboot, a lot of things can happen after that.
So now, we deploy, reboot then we run testinfra.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 02:38:24 +02:00
Sébastien Han 6bac613611 shrink: support for container
We can now shrink mon and osds on containerized deployment.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1492115
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-20 16:25:07 +02:00
Sébastien Han 4f325c7ebe ci: remove scenario bluestore_docker_cluster
We don't need to bootstrap a full cluster to bootstrap bluestore. We
have individual scenarios for that.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-08 19:33:24 +02:00
Sébastien Han e3386b771d Merge pull request #1803 from ceph/disk-auto
ceph-osd: fix autodetection activation
2017-09-07 22:51:40 +02:00
Sébastien Han 3753e6cfa7 ceph-osd: fix autodetection activation
Prior to this patch this activation sequence for autodetection was
always skipped because we were asking to activate on device without
partitions, which doesn't make sense.

We also fix the way we lookup for a device, since the data partition is
always numbered 1, we take the min element of the dict.

Closes: https://github.com/ceph/ceph-ansible/issues/1782
Signed-off-by: Sébastien Han <seb@redhat.com>
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-07 17:47:37 +02:00
Andrew Schoen 6748b5aae4 tests: set ceph_stable_release to luminous for rhcs
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-09-07 09:46:59 -05:00
Guillaume Abrioux d987d26719 tests: force docker variable for switch-to-containers scenario
we need to force the value of `docker` variable which is initially set
to `false` since it's a migration from non-containerized to
containerized cluster.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-06 18:03:52 +02:00
Sébastien Han b7db600caa switch-from-non-containerized-to-containerized: mask unit files
We must mask the image so we are sure that even if the system reboots
then the OSDs won't start.

Also remove Ceph udev rules if found on the system prior to deploy
containers. If we don't do this we are exposed to conflicts between udev
rules and sytemd unit files.

Also add the CI will now test the migration from a non-containerized cluster to a
containerized cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-05 15:20:31 +02:00
Sébastien Han 5b3ba28607 Merge pull request #1847 from ceph/luminous
ci: test luminous
2017-09-02 00:48:12 +02:00
Sébastien Han ab43588bcf ci: test luminous
Luminous is out so let's test it instead of Kraken.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-01 19:52:54 +02:00
Sébastien Han 298a63c437 shrink mon and osd
Rework shrinking a monitor and an OSD playbook. Also adding test
scenario.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1366807
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-01 19:12:00 +02:00
Sébastien Han ae2fd45994 common: refactor installation method
The installation process is now described as follow:

* you still have to choose a 'ceph_origin' installation method. The
origin can be a 'repository' (add a new repository), distro (it will use
the packages provided by the native repo source of your distribution),
local (only available on redhat system, it installs locally built
packages). This option is not well tested, so use it carefully

* if ceph_origin == 'repository' you will have to decide what kind of
repository you want to enable:
  - community: corresponds to the stable upstream/community version
  - enterprise: corresponds to the stable enterprise/downstream version
    (basically you are a red hat customer)
  - dev: it will install ceph from packages built out of the github
    development branches

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-30 10:52:01 +02:00
Andrew Schoen 24107b9b3d tests: always use sitepackages=True
This is mostly important in rhcs testing so that our tests can use
packages installed on the distro.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-28 09:59:28 -05:00
Andrew Schoen bed57572cc purge-cluster: adds support for purging lvm osds
This also adds a new testing scenario for purging lvm osds

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-23 10:33:35 -05:00
Gregory Meno c4cebdbcc4 change ansible environment to 2.3 release
Signed-off-by: Gregory Meno <gmeno@redhat.com>
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-09 10:52:23 -05:00
Andrew Schoen 661de0f3b0 tests: adds an lvm_osds testing scenario
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:13:09 -05:00
Sébastien Han 30991b1c0a osd: simplify scenarios
There is only two main scenarios now:

* collocated: everything remains on the same device:
  - data, db, wal for bluestore
  - data and journal for filestore
* non-collocated: dedicated device for some of the component

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-03 10:20:39 +02:00
Andrew Schoen 7293c40c40 tests: run all existing tests with shaman repos
If you use the 'dev' factor, the testing scenario will
use repos from shaman.ceph.com. You can define CEPH_DEV_BRANCH
and CEPH_DEV_SHA1 to specify which repo you'd like to test.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-07-17 14:42:32 -05:00
Guillaume Abrioux f16841e09e Tests: rename tests directories
Since we are hitting this bug :

https://bugzilla.redhat.com/show_bug.cgi?id=1324587
eg:

`failed: internal error: Monitor path /var/lib/libvirt/qemu/domain-bs-docker-cl
uster-dmcrypt-journal-collocation_mon0_1499294943_ba9faf7bf296533177f6/monitor.
sock too big for destination`

and we can't upgrade libvirt in our CI for some reason

we need to get the directories name shorter in order to workaround this
issue

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-12 15:02:39 +02:00
Guillaume Abrioux 94c3756167 Tests: Add bluestore scenarios
Since we started testing against Luminous, we need to add more scenarios
testing.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-12 15:02:32 +02:00
Alfredo Deza d5ee82d295 testing: add luminous factor for testing
Signed-off-by: Alfredo Deza <adeza@redhat.com>
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-11 22:08:15 +02:00
Guillaume Abrioux 1c8680ef2d Tests: Add bluestore tests
Add two scenarios bluestore_journal_collocation and bluestore_cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-04 19:07:23 +02:00
Andrew Schoen d15e464b81 tests: adds *-update_docker_cluster testing scenarios
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-06-13 08:56:43 -05:00
Andrew Schoen 22541a9c9a tests: use docker playbook when redeploying a purged cluster
When we purge a containerized cluster we need to use the correct
playbook when redploying the cluster.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-31 12:48:51 -05:00
Andrew Schoen ecdb6f4967 tests: adds a scenario for purging containerized clusters
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-25 08:41:36 -05:00
Andrew Schoen 8756c553cc tests: rhcs should set ceph_stable_release to jewel
rhcs is based off of jewel, so we need to set this var in the tests so
that the ceph-mgr role is skipped.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-15 09:54:01 -05:00
Ken Dreyer e2300d5b1d tox: bump ansible version to 2.2.3
The Ansible team has released v2.2.3, which fixes two CVEs:

CVE-2017-7481
CVE-2017-7466

https://www.ansible.com/security
2017-05-10 11:38:51 -06:00
Andrew Schoen 52d9fbd3d0 tests: update default of CEPH_STABLE_RELEASE to kraken
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-05 15:51:54 -05:00
Andrew Schoen cf037b5473 tests: use the xenial container for jewel instead of centos7
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-05 09:18:11 -05:00
Andrew Schoen 2fada9bd6b tests: allow for insecure docker registries when testing rhcs
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-02 16:21:48 -05:00
Andrew Schoen e384b24987 tests: switch to using key/value extra-vars instead of json
I continue to have issues with extra-vars as json. The latest issue
being that the ceph_docker_image_tag config option included in the json
was being ignored. I can't find the root cause, by using the key/value
format seems to work.

I've also removed several options here to simply the interface. We can
add those back if they become necessary.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-02 13:08:49 -05:00
Andrew Schoen 1fcc3283d8 tests: actually test a jewel container for the jewel-* docker tests
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-05-01 14:08:55 -05:00