Commit Graph

102 Commits (80c62e05e7584d45a6f9f3a6e08fa941a5ac702b)

Author SHA1 Message Date
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
Andrew Schoen 63983fa0b7 tests: remove CEPH_STABLE environment variable
I'm removing this because when we use an 'rhcs' scenario then we attempt
to set CEPH_STABLE=false as an environment variable. The issue with that
is because the value is coming from an environment variable it is always
treated as a string and ansible treats that as a boolean True. I plan to
set the ceph_stable value with our rhcs_setup.yml playbook instead of
relying on ---extra-vars and environment variables.

Related ansible issue: https://github.com/ansible/ansible/issues/17193

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-04-12 07:50:41 -05:00
Andrew Schoen 16e889c30a tests: add docker environment variables to tox.ini
This allows us to control the docker registry, image name and tag name
for the containers.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-04-06 10:29:16 -05:00
Andrew Schoen 4ca0f7fa71 tests: add an alias of cluster for the centos7_cluster scenario
When testing this downstream it makes more sense for this scenario to be
named just 'cluster' because have 'centos7' in the name is misleading.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-04-05 13:36:51 -05:00
Sébastien Han 3c59ed58a5 Merge pull request #1411 from ceph/bump-ansible
tests: bump the version of ansible to 2.2.2
2017-04-05 16:03:20 +02:00
Alfredo Deza 3f6cdbb646 tests: bump the version of ansible to 2.2.2
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-04-05 07:38:58 -04:00
Andrew Schoen 1b6b6d6255 tests: run all tests for jewel and kraken
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-04-03 16:11:55 -05:00
Andrew Schoen 5c34c9ccf1 tests: when testing rhcs default CEPH_STABLE=false
This will keep ceph-ansible from installing the upstream repo file on
the testing nodes.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-23 06:42:43 -05:00
Andrew Schoen 66f3f31702 tests: adds a task to download a repo file for nightly rhel7 packages
This is a url to an actual repo file, not a baseurl to use in a repo.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-22 16:18:57 -05:00
Andrew Schoen b0caeed682 tests: fix task in rhcs_setup that changes vagrant box to rhel7
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-22 12:38:12 -05:00
Andrew Schoen 28f1f24759 tests: use the rhcs_setup.yml playbook in tox.ini
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-22 10:14:41 -05:00
Andrew Schoen 1fce790128 test: docker dmcrypt tests should use the site.docker.yml playbook
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-22 09:16:06 -05:00