Commit Graph

1950 Commits (be8ed2f59a0e863fcbf21c203e64646f1effdefa)
 

Author SHA1 Message Date
Ivan Font be8ed2f59a Add devices variable for Vagrantfile docker case 2016-12-08 23:14:18 -08:00
Sébastien Han f7322baf54 Merge pull request #1168 from Logan2211/fix-mons-check
Fix the mons running check to use group name var
2016-12-08 21:15:13 +01:00
Logan V 034fc1a791 Fix the mons running check to use group name var
mon_group_name variable can be used to override mons group, but
this task assumes the group is always 'mons'. So we need to use
the var to find the group name instead.
2016-12-08 13:16:02 -06:00
Sébastien Han 7b0602c224 Merge pull request #1157 from ceph/ceph-fsid
common: do not regenerate a cluster fsid if cluster exits
2016-12-08 18:55:21 +01:00
Andrew Schoen 7812e0b32e Merge pull request #1162 from ceph/timeout-collect-keys
mon: remove collect keys
2016-12-08 10:28:28 -06:00
Alfredo Deza 33331cb962 Merge pull request #1150 from ceph/testinfra
tests: use testinfra to verify cluster setup in our CI tests
2016-12-08 10:22:24 -05:00
Sébastien Han 173d37e033 Merge pull request #1164 from guits/master
git: update gitignore
2016-12-08 11:24:11 +01:00
Guillaume Abrioux f7420f31c6 git: update gitignore
* ignore `*.retry` files in general

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2016-12-08 08:17:35 +01:00
Andrew Schoen 6baf2192cd tests: adds an osds parameter to the node fixture
The osds are named differently for systemd in containerized deployments
so this new parameter is used to make that change transparent in the
tests.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:27:42 -06:00
Andrew Schoen ae18b2db65 tests: mark tests with no_docker that fail on containerized deployments
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:19:43 -06:00
Andrew Schoen 239b0d0f96 tests: adds a docker property to the node fixture
This is used to skip tests that will not work with containerized
deployment or atomic hosts.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:17:09 -06:00
Andrew Schoen 55fee14bd0 tests: adds a docker: true var to the docker_cluster scenario
This lets the CI tests know that this scenario is using docker and
should skip certain tests.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:15:29 -06:00
Andrew Schoen 9942b5028a docker: fix ceph.conf generation for multiple mons
Before this patch only the address for the first mon would show
in the ceph.conf even if there were multiple mons in the inventory.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 17:22:10 -06:00
Andrew Schoen 26a0e8a084 tests: account for multiple osd hosts when testing if all are up and in
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 14:31:31 -06:00
Andrew Schoen f5fb924189 tests: ensure all osds are listening on the cluster network
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 10:36:07 -06:00
Andrew Schoen a184b9a64f tests: test that all osds are listening on the public network
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 10:36:07 -06:00
Andrew Schoen e2ffd66ca8 tests: add num_devices to node fixture
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 10:36:06 -06:00
Sébastien Han 93c3988bfe mon: remove collect keys
Once the monitor process starts it will also trigger `ceph-create-keys`
which will collect the admin key and bootstrap keys. We used to force
this command because we were having issues on some distros like centos
7.0 and 7.1 not triggering this. This is fixed on centos 7.2 and not an
issue on ubuntu 14.04 or 16.04 so we can remove this task. If the
monitor hangs or fails to start the playbook will fail right after at
the "wait for client.admin key exists" task after 300sec.

Closes: #1161

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-07 14:38:39 +01:00
Sébastien Han de07ba8fbf common: do not regenerate a cluster fsid if cluster exists
This commit solves the situation where you lost your fetch directory and
you are running ansible against an existing cluster. Since no fetch
directory is present the file containing the fsid doesn't exist so we
are creating a new one. Later the ceph.conf gets updated with a wrong
fsid which causes problems for clients and ceph processes.

Closes: #1148

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-07 11:26:48 +01:00
Andrew Schoen 9b959d10ff tests: adds a comment to the setup.yml playbook for clarification
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -06:00
Andrew Schoen e3521b0830 tests: skip installing net-tools on atomic hosts
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -06:00
Andrew Schoen 4323607c2e tests: dmcrypt_journal_collocation should run journal collocation tests
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -06:00
Andrew Schoen 13333d9724 tests: use cluster_name in tests when needed
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -06:00
Andrew Schoen 4effce1c31 tests: use node["conf_path"] instead of hardcoding the path in tests
This also accounts for the cluster having a custom cluster name

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:06 -06:00
Andrew Schoen 4e3eb7b627 tests: add cluster_name and conf_path to the node fixture
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:05 -06:00
Andrew Schoen 2464b69612 tests: include the number of mons as a attribute on node
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:57:20 -06:00
Andrew Schoen 1abbc948d9 tests: update skip messages in conftest.py
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen d79188c8b6 tests: rename vars to ansible_vars in conftest.node
This is to avoid redefining the builtin vars()

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 5f81638b5e tests: rename CephNode to node and add a bit of documentation
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 73705933c9 tests: with testinfra we don't need scenario.py files anymore
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 1e79bc6726 tests: tests for collocated journals
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 1b3aca44d7 tests: add a journal_collocation tag to collocated journal tests
The test will be skipped if journal_collocation is not True in the
group_vars for the scenario.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen dddfe6d9de tests: ensure ceph-mon is installed on mons
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 8ed8dfd907 tests: make sure all osds are mounted
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 0665167afa tests: adds some basic tests for OSD nodes
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen e13da73a5e testing: CephNode should return osd_ids
This is an empty list on anything but an OSD node. These ids will be
used for further OSD testing.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 0e7133cfd0 tests: remove test files that are not used anymore
These tests have been replaced by the ones in test_install.py

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 20f6831f8b tests: test ceph.conf using testinfra modules
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 4810b38ece tests: ensure tests marked with 'all' run on every node
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen cd9b47ceb8 tests: the CephNode fixture should provide the cluster subnet
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen a31c86c191 tests: tests mon services to ensure they are running correctly
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 7c1a45260d tests: run testinfra with --sudo
It needs this so that the modules can use sudo

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 465bafc444 tests: run the setup.yml playbook with tox
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 4d5a3510e4 tests: include a playbook to install net-tools for socket checks
This playbook could be used in the future to install anything else we
need on these nodes for testing purposes.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Andrew Schoen 05be43c546 tests: return address and ansible vars from CephNode
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Andrew Schoen b5552239e7 tests: port tests/functional/test_install.py to use testinfra fixtures
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Andrew Schoen c02ffdb0e0 tests: change conftest.py to support dynamic markers and test selection
This applies correct markers to tests depending on their file path.
Tests that live at the root of tests/functional/tests will be given a
marker of 'all' and apply to any type of ceph node.

Tests that live in tests/functional/tests/mon will get the
'mons' marker and will only run for nodes in the 'mons' group.

Tests that live in tests/functional/tests/osd will get the 'osds'
marker and will only run for nodes in the 'osds' group.

All tests must use the CephNode fixture for this to work and be
parameterized by testinfra.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Andrew Schoen 870a4358f0 tests: use testinfra in tox.ini instead of pytest directly
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Sébastien Han a23007e7db Merge pull request #1155 from ceph/take-over-fix
take-over: use more precise ceph.conf detection
2016-12-06 16:04:52 +01:00
Sébastien Han 9dac195200 take-over: use more precise ceph.conf detection
Prior to this patch we were just looking for any *.conf file which
sometimes could results in multiple matches. The new command looks for a
.conf file that must contain [global] and 'fsid' patterns. This will
definitely get us the ceph.conf file. We can not directly use ceph.conf
because of a different cluster name.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-06 16:02:48 +01:00