Commit Graph

3272 Commits (97b1cb02584e3947633aed91f3029fe8317792bc)
 

Author SHA1 Message Date
Sébastien Han 163c87af79 Merge pull request #1976 from ceph/rbd_pool
Only perform actions on the rbd pool after it has been created
2017-10-04 18:52:49 +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
Guillaume Abrioux cdb5023d84 tests: fix brokens tests for mds
5968cf0 broke the test on mds because of leftover.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-04 16:48:23 +02:00
Guillaume Abrioux 8fac8f54a6 iscsi-gw: Create a rbd pool if it doesn't exist
iscsi-gw needs a 'rbd' pool to configure iscsi target.
Note: I could have used the facts already set in `ceph-mon` but I voluntarily
didn't do it to not create a dependancy between these two roles.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-04 15:40:10 +02:00
Guillaume Abrioux 2c4258a0fd Refact code for set_osd_pool_default_*
This commit refacts the code regarding all `set_osd_pool_default_*`
related tasks by avoiding usage of useless `set_fact` to determine
whether a key is present in `ceph_conf_overrides`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-04 15:40:10 +02:00
Al Lau 6aca67bc9c Only perform actions on the rbd pool after it has been created
The rbd pool is the default pool that gets created during ceph cluster
initializaiton.  If we act on the rbd related operations too early, the
rbd pool does not exist yet.  Move the call to perform rbd operations
to a later stage after other pools have been created.

The rbd_pool.yml playbook has all the operations related to the rbd pool.

Replace the always_run (deprecated) directive with check_mode.

Most of the ceph related tasks only need to run once.  The run_once directive
executes the task on the first host.

The ceph sub-command to delete a pool is delete (not rm).

The changes submitted here were tested with this ceph version.
ceph version 0.94.9-9.el7cp (b83334e01379f267fb2f9ce729d74a0a8fa1e92c)

This upload includes these changes:
  - Use the fail module (instead of assert).
  - From luminous release, the rbd pool is no longer created by default.
    Delete the code to create the rbd pool for luminous release
  - Conform the .yml files to use the suggested syntax.

The commands are executed on the mcp nodes and I think shell ansible module
is the right one to use.  The command module is used to execute commands on
remote nodes.  I can make the change to use command module if that is
prefrerred.
2017-10-04 15:40:10 +02:00
Sébastien Han ee8aa8bf39 Merge pull request #1986 from ceph/fixes
[skip ci] defaults: fix check socket non-container handler
2017-10-04 15:38:33 +02:00
Sébastien Han cac7d034bf defaults: fix check socket non-container handler
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-04 15:33:52 +02:00
Sébastien Han f146829e9e Merge pull request #1953 from ceph/colocation
[skip ci] Colocation
2017-10-04 15:02:57 +02:00
Sébastien Han c751c2dc6b nfs: add run once to user creation
The create user call is idempotent but it's also blocking for some
reasons.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-04 15:01:13 +02:00
Guillaume Abrioux 784cc73da0 set docker_exec_cmd fact early in each role
This is to ensure `docker_exec_cmd` fact is set with the correct value
in case of daemons collocation

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-04 11:31:09 +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 f92eaea0fd Merge pull request #1977 from ktdreyer/doc-master-ansible-version
docs: master requires ansible 2.3.1
2017-10-03 22:55:22 +02:00
Sébastien Han a5a9c64e8f Merge pull request #1978 from ktdreyer/doc-installing-ansible
[skip ci] docs: add instructions for installing Ansible
2017-10-03 21:36:27 +02:00
Sébastien Han f37e014a65 Merge pull request #1974 from ceph/mgr-upgrade-luminous
upgrade: a support for mgrs
2017-10-03 19:57:31 +02:00
Ken Dreyer a1273f3dc8 docs: add instructions for installing Ansible
Add RPM and DEB instructions for installing Ansible.
2017-10-03 11:39:39 -06:00
Ken Dreyer 07edf7e38a docs: master requires ansible 2.3.1
We require Ansible 2.3.1 or greater to run ceph-ansible's master branch.
2017-10-03 11:26:43 -06:00
Sébastien Han 0ce76113bf Merge pull request #1956 from ceph/osd-container-id
Osd container
2017-10-03 18:52:24 +02:00
Sébastien Han 5a7204d200 Merge pull request #1975 from ceph/nfs-site
site: always play ceph-defaults and ceph-docker-common
2017-10-03 18:45:10 +02:00
Sébastien Han 99466e79a1 upgrade: a support for mgrs
Also we now play ceph-config to have everything being generated for new
daemons bootstrap during upgrade.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1497959
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-03 16:57:31 +02:00
Sébastien Han 27808a64a4 iscsi: fix when condition
generate_crt|bool|default(false) won't apply the default value, this
generate_crt|default(false)|bool will

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-03 16:48:17 +02:00
Sébastien Han b47c4fd1a0 site: always play ceph-defaults and ceph-docker-common
So we can later evaluate the conditions.
Also fix the variable, we are comparing ceph_release not
ceph_stable_release

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1486062
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-03 15:22:39 +02:00
Sébastien Han 3bd341f6c0 osd: container use id instead of dev name
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1494127
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-03 14:44:00 +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 ba42894516 osd: do not copy admin key on collocated scenario
ceph-disk used to have a bug requiring the admin key to store the
encrypted key in the mon kv store. This was reported in:
http://tracker.ceph.com/issues/17849

Fixed and backported here: https://github.com/ceph/ceph/pull/11996

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-03 14:44:00 +02:00
Sébastien Han 39ee25637b test: add test for device with 'by-path'
We now test devices to be passed like:
/dev/disk/by-path/pci-0000:00:01.1-ata-1.0

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-03 14:43:57 +02:00
Sébastien Han 91e2a0b4f4 Merge pull request #1973 from ceph/refact_ceph-defaults
defaults: change running order in main.yml
2017-10-03 11:58:35 +02:00
Guillaume Abrioux 081f226106 defaults: change running order in main.yml
The task which sets `ceph_current_fsid` in `facts.yml` in case of containerized
deployment, will definitely fail because `docker_exec_cmd` is not set
yet.
This commits simply makes `facts.yml` played after `check_socket.yml` so
`docker_exec_cmd` is set properly.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-02 18:42:43 +02:00
Sébastien Han 30ce781c79 Merge pull request #1968 from ceph/bz-1488999
refact MDS role
2017-10-02 14:42:08 +02:00
Sébastien Han 3c2c31a591 Merge pull request #1964 from vatelzh/master
purge-cluster: delete block partitions if using bluestore
2017-10-02 12:10:26 +02:00
Guillaume Abrioux 62770cd7de refact MDS role
This commits refacts the role ceph-mds

The goal here is to create cephfs in `ceph-mon` for both containerized
and non-containerized cases so we don't need the admin keyring on mds
nodes anymore.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-02 09:12:31 +02:00
Sébastien Han 0e5e7dc439 Merge pull request #1971 from ceph/expose-part
osd: add cluster name support
2017-09-30 14:22:30 +02:00
Sébastien Han 46a01df434 osd: add cluster name support
I forgot to add cluster name support so some partition were never
mounted correctly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 20:30:54 +02:00
Sébastien Han 0da6d8e356 Merge pull request #1967 from ceph/use_systemd_module
Use systemd module instead of service.
2017-09-29 16:35:10 +02:00
Sébastien Han de44f125bb Merge pull request #1939 from ceph/ci-reboot
tests: implement reboot after a deployment
2017-09-29 16:34:46 +02:00
Guillaume Abrioux 466f6f35b7 Use systemd module instead of service.
Using systemd module allows us to do in one task what we did in three
tasks:

- enable unit file,
- issue a `daemon-reload`,
- start the service

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-29 14:54:00 +02:00
Sébastien Han b9050d6229 update: fix var register
Even if the task is skipped, ansible registers the var as 'skipped' so
this task the task using this variable for its next usage.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 14:27:55 +02:00
zhangwentao 86a6db0d58 purge-cluster: delete block partitions if using bluestore 2017-09-29 14:04:17 +08:00
Sébastien Han ca76c46981 site: only support nfs on luminous and above
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 02:38:24 +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 e121bc58e9 defaults: add missing handlers for rbd mirorr and mgr
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 02:38:24 +02:00
Sébastien Han 048b55be4a defaults: only run socket checks on their specific roles
Running the socket check on all the hosts will override the default
value of docker_exec_cmd, leaving it with the last value (currently
rbd-mirror), as a result the subsequent docker_exec_cmd usage for the
:x

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 02:38:24 +02:00
Sébastien Han 341c9e077b nfs: fix container setup and re-arrange files
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 02:38:24 +02:00
Sébastien Han b4bec52442 tests: add tests for rgw-nfs
rgw-nfs is part of servicemap so we should use it to make sure the
process is up and running.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-29 02:38:24 +02:00
Sébastien Han fc29ccd0ad rbd-mirror: force sercice enable ceph-rbd-mirror.target
There is a bug in the rbd mirror unit file, the upstream fix is here:
https://github.com/ceph/ceph/pull/17969.
This should be reverted once the patch is merged and backport is done.

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 deb5d3ba1f Merge pull request #1962 from ceph/fix_mgr_sestatus
[skip ci] mgr: add condition to run selinux tasks only on rhel os family
2017-09-29 02:37:03 +02:00
Guillaume Abrioux 913ad53709 docker: add condition to run selinux tasks only on rhel os family
This fixes the error :

```
The conditional check 'sestatus.stdout != 'Disabled'' failed.
```

that occurs when running on non rhel based system since the
`sestatus` fact is registered only on rhel based distribution.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-29 02:35:07 +02:00
Sébastien Han 0e817ce14c Merge pull request #1959 from ceph/update-check
rolling_update: clarify mon quorum command
2017-09-29 02:32:17 +02:00
Sébastien Han 38e6ae7ce0 Merge pull request #1961 from ceph/site-condition-2
[skip ci]  site: s/ceph_stable_release/ceph_release
2017-09-29 02:28:48 +02:00