Commit Graph

1958 Commits (c5e4e62ab5b836fc40cc24b9ac3402ff2828743d)

Author SHA1 Message Date
John Fulton d73f751b63 Make openstack_keys param support no acls list
A recent change [1] required that the openstack_keys
param always containe an acls list. However, it's
possible it might not contain that list. Thus, this
param sets a default for that list to be empty if it
is not in the structure as defined by the user.

[1] d65cbaa539
2017-11-16 11:29:59 -05:00
Sébastien Han f31d8557dd
Merge pull request #2182 from ceph/fix_reboot_rbd
rbd: enable ceph-rbd-mirror.target on releases prior to luminous
2017-11-16 16:55:39 +01:00
Sébastien Han 932345ab2a osd: remove leftover from osd partition
We used to support osds that are a partition. This is long gone so
removing this task.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-11-16 14:58:40 +01:00
Sébastien Han b1c1322357 osd: remove failed_when on activation
There is no need to continue if the activation fails.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-11-16 14:57:49 +01:00
Sébastien Han 80d3a242d0 osd: fix bad activation for dmcrypt
We were activating dmcrypt devices with the wrong command. Basically the
first task execute the wrong activate command. The task fails but
continues because of the 'failed_when: false'. Then the right activation
sequence is being done by the next task.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-11-16 14:55:08 +01:00
Sébastien Han cc264d6ba6
Merge pull request #2151 from hwoarang/add-opensuse
Add openSUSE Leap 42.3 support
2017-11-16 14:35:28 +01:00
Sébastien Han a98f14784a
Merge pull request #2172 from ceph/lvm-raw-device
lvm: add support for --data to be a raw device or partition
2017-11-16 14:14:23 +01:00
Guillaume Abrioux ccad0ebf26 rbd: enable ceph-rbd-mirror.target for releases <= luminous
when `ceph-rbd-mirror.target` is not enabled, the service won't start
after a reboot because there is a dependency between these two units.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-16 14:12:59 +01:00
Yixing Yan 097249371f fix: remove the duplicated code 2017-11-16 16:45:03 +08:00
Andrew Schoen 3c604f1115 lvm: support --data as a raw device or partition in ceph-volume
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-11-15 09:36:17 -06:00
Andrew Schoen 04f02910a9 lvm: ensure the data_vg exists before using it
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-11-15 09:36:17 -06:00
John Fulton d65cbaa539 Set permissions and ACLs of OpenStack keys on all ceph-mons
If ceph-ansible deploys a Ceph cluster with "openstack_config: true"
and sets the openstack_keys map to have certain ACLs or permissions,
the requested ACLs or permissions are only set on one of the monitor
nodes [2] when they should be set on all of them.

This patch solves [3] the above issue by having the chmod and setfacl
tasks iterate the list of mon nodes (including the mon node that the
task was delegated to) to apply the chmod of setfacl to the keys in
openstack_keys.

[1]
```
openstack_keys:
  - { name: client.openstack, key: "$(ceph-authtool --gen-print-key)", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=images, allow rwx pool=vms, allow rwx pool=volumes, allow rwx pool=backups", mode: "0600", acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"] }
```
[2]
```
$ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring"
192.168.1.26 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.29 | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
group::r--
other::r--getfacl: Removing leading '/' from absolute path names

192.168.1.23 | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
group::r--
other::r--getfacl: Removing leading '/' from absolute path names

$
```
[3]
```
(undercloud) [stack@hci-director ceph-ansible]$ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring"
192.168.1.25 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.29 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.27 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

(undercloud) [stack@hci-director ceph-ansible]$
```
2017-11-15 10:09:24 -05:00
Guillaume Abrioux aa0b1ed118 tests: remove OSD_FORCE_ZAP variable from tests
according to ceph/ceph-container#840, this variable is no longer needed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-14 17:55:01 +01:00
Markos Chandras f8e3d4bb76 ceph-docker-common: Add support for openSUSE Leap distributions
Add support for the openSUSE Leap distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras 8c321b8416 ceph-nfs: Add support for openSUSE Leap distributions
Add support for the openSUSE distributions. The required packages
are available either in the distribution repositories or in the
OBS one.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras 173959cfc7 ceph-rgw: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras a868c52f3f ceph-restapi: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras ddb468bfb3 ceph-rbd-mirror: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras fb46950373 ceph-osd: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras 34a40adcf7 ceph-mon: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras f944ee3980 ceph-mgr: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras 8135638c58 ceph-mds: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras c6103a0f13 ceph-fetch-keys: Add support for openSUSE Leap distributions
Add support for openSUSE Leap distributions

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras 3e4a7c8b61 ceph-config: Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras 211b0c33a0 ceph-client: Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras e06c108442 ceph-agent: Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras dd6ee72547 ceph-common: Don't check for ceph_stable_release for distro packages
When we consume the distribution packages, we don't have the choise on
which version to install, so we shouldn't require that variable to be
set. Distributions normally provide only one version of Ceph in the
official repositories so we get whatever they provide.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:23 +00:00
Markos Chandras 849786967a ceph-common: Add initial support for openSUSE Leap distributions
openSUSE Leap 42.3 provides support for Ceph Luminous in both the
distribution package and the latest available version in the OBS
repository so add these as the only available installation methods for
openSUSE.

Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14 10:51:22 +00:00
Guillaume Abrioux 44df3f9102 defaults: fix rgw restart script in handlers
Like 80d32dec, the path to the fact is not correct.
In any case, we will retrieve the IP address in hostvars, the variable
is the way we get the interface name according where it has been set
(eg.: inventory host file vs. group_vars/)

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-13 16:30:03 +01:00
Guillaume Abrioux 0369bd59e2
Merge pull request #2146 from mslovy/wip-fix-crush-location
osd: fix crush location for non-containerized deployment
2017-11-13 12:23:44 +01:00
Sébastien Han 7b0743be52
Merge pull request #2144 from ceph/quick_fix_lvm
osd: skip some set_fact when osd_scenario=lvm
2017-11-13 21:50:37 +11:00
Sébastien Han 17d1ff61d5
Merge pull request #2141 from Arano-kai/run_restart_scripts_in_noexec_tmp
FIX: run restart scripts in `noexec` /tmp
2017-11-13 21:37:35 +11:00
Guillaume Abrioux c06faf2deb
Merge pull request #2154 from ceph/fix_auto_discover
osd: avoid using non desired loop device in autodiscovery
2017-11-10 01:19:20 +01:00
Guillaume Abrioux a695b2c08f
Merge pull request #2153 from ceph/fix_disk_list_test
osd: always run disk_list test
2017-11-09 23:50:32 +01:00
Guillaume Abrioux 591d77220e osd: always run disk_list test
there is no need to have a condition on this task, this test should be
always run since the result will be interpreted later.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-09 11:51:16 +01:00
Guillaume Abrioux 43975a7332 osd: avoid using non desired loop device in autodiscovery
This will prevent ceph-ansible from using a loop device while it
shouldn't in auto_discovery mode.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-09 10:26:24 +01:00
Guillaume Abrioux 80d32decd3 config: fix config generation
The path to the fact is not correct.
In any case, we will retrieve the IP address in hostvars, the variable
is the way we get the interface name according where it has been set
(eg.: inventory host file vs. group_vars/)

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-09 08:50:57 +01:00
Guillaume Abrioux d5dfc63c89 osd: fix automatic prepare when auto_discover
Use `devices` variable instead of `ansible_devices`, otherwise it means
we are not using the devices which have been 'auto discovered'

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-08 10:20:44 +01:00
yaoning d82a09dddd fix crush location for non-containerized deployment
crush location only set for containerized deployment

Signed-off-by: yaoning <yaoning@unitedstack.com>
2017-11-08 12:05:10 +11:00
Sébastien Han 0930f14915 osd: do not use dm when osd_auto_discovery
The current code will also return lvm devices such as /dev/dm-2, this
kind of device type is not supported by ceph-disk at the moment. Now we
just ignore them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-11-08 11:33:10 +11:00
Guillaume Abrioux 238754a844 osd: skip some set_fact when osd_scenario=lvm
these tasks are not needed when using `osd_scenario: lvm`

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-07 15:30:08 +01:00
Guillaume Abrioux 39b584e540 osd: fix a typo in roles/ceph-osd/defaults/main.yml
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-11-07 10:06:16 +01:00
Arano-kai 5cde3175ae FIX: run restart scripts in `noexec` /tmp
- One can not run scripts directly in place, that mounted with `noexec`
option. But one can run scripts as arguments for `bash/sh`.

Signed-off-by: Arano-kai <captcha.is.evil@gmail.com>
2017-11-06 16:02:47 +02:00
Sébastien Han d4ed9a2064 osd: enhance backward compatibility
During the initial implementation of this 'old' thing we were falling
into this issue without noticing
https://github.com/moby/moby/issues/30341 and where blindly using --rm,
now this is fixed the prepare container disappears and thus activation
fail.
I'm fixing this for old jewel images.

Also this fixes the machine reboot case where the docker logs are
purgend. In the old scenario, we now store the log locally in the same
directory as the ceph-osd-run.sh script.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-11-03 11:15:23 +01:00
Sébastien Han ab7eb79212 config: fix monitor_interface when not passed in the inventory file
Setting monitor_interface in group_vars/all.yml makes the
hostvars[host]['monitor_interface'] non-existing.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1507922
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-11-03 09:25:02 +01:00
Jan Provaznik 589cd27ce4 Include ganesha dbus config file
This file was (accidentally) not included in a previous
commit 87b1da09e7.
2017-10-31 08:30:12 +01:00
Sébastien Han faccd0acf0 Merge pull request #2100 from ceph/lvm-bluestore
ceph-volume lvm bluestore support
2017-10-27 17:36:16 +02:00
Alfredo Deza 517a2b3feb ceph-osd skip lvm creation if they are already in use
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-10-27 11:33:54 -04:00
Sébastien Han 6ea92756c0 Merge pull request #2117 from ceph/rm-dup
default: remove dup variable
2017-10-27 13:49:52 +02:00
Sébastien Han d2575c7f5e default: remove dup variable
ceph_repository_type was declared multiple times. This commit fixes
this.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-27 11:46:15 +02:00
Sébastien Han d6a0d2f9be Merge pull request #2071 from jtaleric/master
Docker image pull retry
2017-10-27 09:49:03 +02:00
Sébastien Han 5a10b048b0 Merge pull request #2105 from major/really-fix-always-run
Really fix always run
2017-10-27 09:33:47 +02:00
John Fulton ae156e9f34 Make acls and mode parameters of opentack_keys optional
Only chmod or setfacl the requested keyring(s) in the
opentack_keys data structure when the mode or acls keys
of that data structure exist.

User may specify four permission combinations for the
keyring file(s): 1. only set ACL, 2. only set mode,
3. set neither mode nor ACL, 4. set mode and then ACL.

Fixes: #2092
2017-10-26 12:45:17 +00:00
Joe Talerico ab58764288 Docker image pull retry
This change sets a default timeout of 300s for the image pull. If the
image pull times out (300s), we will retry 3 times by default.

fixes 1954
2017-10-25 13:37:10 -04:00
Sébastien Han 5f9e50dabe Merge pull request #2103 from andymcc/tcmalloc_settings
Option to set TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
2017-10-25 17:36:04 +02:00
Sébastien Han 613b6a30f1 Merge pull request #2104 from ceph/rgw-section
rgw/nfs: fix section duplication
2017-10-25 17:35:01 +02:00
Sébastien Han 07e2a783f8 Merge pull request #2084 from ceph/backward-osd-2.4
osd: bring backward compatibility with old Jewel images
2017-10-25 17:33:49 +02:00
Major Hayden f73232caa4
Use check_mode instead of always_run
This patch changes the `always_run: yes` task option to
`check_mode: no` to avoid Ansible warnings.
2017-10-25 09:53:34 -05:00
Major Hayden c2b5118c1b
Revert "Avoid deprecated always_run"
This reverts commit 620fb37dd4.
2017-10-25 09:48:09 -05:00
Sébastien Han 8670b45ef2 rgw/nfs: fix section duplication
Once and for all, hopefully...

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-25 15:45:37 +02:00
Andy McCrae 7f6c39102d Option to set TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
Use "ceph_tcmalloc_max_total_thread_cache" to set the
TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES value inside /etc/default/ceph for
Debian installs, or /etc/sysconfig/ceph for Red Hat/CentOS installs.

By default this is set to 0, so the default package value will be used,
if specified this value will be changed to match the variable, and ceph
osd services will be restarted.
2017-10-25 14:38:36 +01:00
Alfredo Deza d3b427e169 ceph-osd lvm scnearios are no longer limited to filestore
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-10-25 08:23:45 -04:00
Alfredo Deza df05e63c10 ceph-osd use --cluster in ceph-volume calls
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-10-25 08:23:45 -04:00
Alfredo Deza 628d98a92c ceph-osd add the CEPH_VOLUME_DEBUG env var to all ceph-volume commands
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-10-25 06:50:22 -04:00
Alfredo Deza b89309e2a3 ceph-osd update the examples in defaults for lvm bluestore
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-10-25 06:46:39 -04:00
Alfredo Deza bbc3672253 ceph-osd: lvm support for bluestore
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-10-25 06:46:39 -04:00
Guillaume Abrioux f21859656b Merge pull request #2102 from yanyixing/fix_miss_word
add the miss word
2017-10-25 10:49:38 +02:00
Yixing Yan b6296c13ac update sample file 2017-10-25 16:39:08 +08:00
Sébastien Han 049729b8d3 Merge pull request #2097 from fultonj/issue/2095
Require osd_scenario parameter to be provided in containerized deploy
2017-10-24 13:59:51 +02:00
Sébastien Han 751da93b08 Merge pull request #2096 from andymcc/regex_defaults
Add regexp check for setting CLUSTER_NAME
2017-10-23 17:24:44 +02:00
John Fulton 7a7ddab6c2 Require osd_scenario parameter to be provided in containerized deploy
Fixes: #2095
2017-10-23 15:16:03 +00:00
Andy McCrae 9ebef8ba3c Add regexp check for setting CLUSTER_NAME
Minor fix to ensure that existing CLUSTER_NAME is changed, and avoid duplicates.
2017-10-23 14:42:07 +01:00
Andy McCrae 05a1f965c8 Typo fix for radosgw@ systemd file
systemd script for radosgw is radosgw@ not rgw@, the directory needs to
match the path.
2017-10-23 14:07:23 +01:00
Jan Provaznik 291e6b604d ceph-nfs - add bind address variable 2017-10-23 09:34:51 +02:00
Sébastien Han 968ef04324 osd: bring backward compatibility with old Jewel images
There was a huge resync from luminous to jewel in ceph-docker:
https://github.com/ceph/ceph-docker/pull/797

This change brought a new handy function to discover partitions tight to
an OSD. This function doesn't exist in the old image so the
ceph-osd-run.sh script breaks when trying to deploy Jewel OSD with that
old Jewel image version.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-20 16:26:41 +02:00
Sébastien Han 54de2efc5d Merge pull request #2082 from ceph/restapi-cephconf
common: move restapi template to config
2017-10-20 14:07:48 +02:00
Sébastien Han 4413511b66 all: backward compatibility between stable-2.2 and 3.0
stable-3.0 brought numerous changes in ceph-ansible variables, this PR
aims to maintain backward compatibility for someone running stable-2.2
upgrading to stable-3.0 but keeps its groups_vars untouched.
We will then determine the right options to make sure the upgrade works
but we are expecting that new variables should be used.

We will drop this in a near future, maybe 3.1 or 3.2.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-20 11:54:10 +02:00
Sébastien Han fccb9472cd mgr: force module addition
Some module require --force to be enabled.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-20 11:54:10 +02:00
Sébastien Han ba5c6e66f0 common: move restapi template to config
Closes: github.com/ceph/ceph-ansible/issues/1981
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-20 11:14:13 +02:00
Guillaume Abrioux 5b1087f1e5 mgr: play 'enable modules' sequence only on luminous
This feature isn't available before luminous, therefore, we need to play
them only on luminous and after otherwise the playbook will fail.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3f3d4b9c727d06154c422d445fc2a245aceaed89)
2017-10-19 20:54:23 +02:00
Sébastien Han c527515502 Merge pull request #2000 from ceph/merge-osd-scenarios
[skip ci] ci: new osd scenarios
2017-10-19 09:18:02 +02:00
Guillaume Abrioux ff228e2d88 mgr: fix broken task on jewel
3a58757 introduced an issue for Jewel deployments, since this role is
skipped, `enabled_ceph_mgr_modules.stdout` doesn't exist, therefore, it
ends up with an attribute error.

Uses `.get()` to retrieve `stdout` with a default value so it won't fail
if this attribute doesn't exist (jewel).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-18 14:11:46 +02:00
Sébastien Han 1579f1c5b1 Merge pull request #2073 from ceph/fix_rbd_handler
[skip ci] rbd: fix restart script for jewel
2017-10-18 11:12:05 +02:00
Guillaume Abrioux c2850b11be rbd: fix restart script for jewel
In Jewel, we don't use bootstrap-rbd keyring for rbd-mirror nodes, it
results with a socket path/name different according to which ceph
release you are deploying.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-18 11:10:49 +02:00
Sébastien Han 2936d152c9 Merge pull request #2053 from Fbrachere/mgr-modules
Add ability to enable ceph mgr modules.
2017-10-18 10:27:31 +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 90b75185d5 defaults: fix handlers for collocation
When doing collocation the condition "inventory_hostname in play_hosts"
is breaking the restart workflow.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-17 19:23:16 +02:00
Guillaume Abrioux 2aa53fb0f5 Merge pull request #2055 from ceph/update-mirror-nfs
upgrade: support for rbd mirror and nfs
2017-10-17 14:51:39 +02:00
Christian Berendt 4c380c9ef8 Cleanup readme files in roles directories
The contents of the README files are no longer up to date.
Documentation for all roles is located below the docs directory.
2017-10-17 11:22:06 +02:00
Sébastien Han d920d4839d upgrade: support for rbd mirror and nfs
- Add upgrade support for rbd mirror and nfs daemons.
- Only works with systemd (remove sysvinit and upstart occurence)
- A bit of cleanup

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-17 10:54:47 +02:00
Christian Berendt cf901f0171 In docker start scripts replace \u00a0 with \u0020
This will solve the following issue when starting docker containers on ubuntu:

invalid argument "1\u00a0" for --cpus=1 : failed to parse 1  as a rational number

Closes-bug: #2056
2017-10-16 15:16:48 +02:00
Fabien Brachere 3a587575d7 Add ability to enable ceph mgr modules. 2017-10-16 15:04:23 +02:00
Guillaume Abrioux 7ee9aa94b5 Merge pull request #1963 from ceph/pull-in-para
site-docker.yml try to fetch images in //
2017-10-13 19:35:11 +02:00
Sébastien Han 71d819620c mds: fix fs pool creation
1. add the variables to docker_collocation
2. trigger the check when a MDS is part of the inventory file, not when
we run on an MDS...

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-13 16:03:04 +02:00
Sébastien Han b34a04ea41 site-docker.yml try to fetch images in //
The container deployment is serialized, adding this task as a best
effort. If docker is already present we pull the image otherwise we wait
for the role to play.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-13 11:24:40 +02:00
Guillaume Abrioux 7d4b3f9989 Merge pull request #2047 from ceph/enable_ceph-rbd-mirror.target
rbd-mirror: enable ceph-rbd-mirror.target
2017-10-13 10:34:10 +02:00
Sébastien Han f7832e5eb9 Merge pull request #2031 from major/simplify-ntp
Simplify NTP checks/install
2017-10-13 09:16:20 +02:00
Guillaume Abrioux 59ca1065e9 rbd-mirror: enable ceph-rbd-mirror.target
on jewel `ceph-rbd-mirror.target` isn't enabled, therefore, if the node
is rebooted, the service doesn't get started.

from ceph-rbd-mirror unit file:
```
[Install]
WantedBy=ceph-rbd-mirror.target
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-13 08:27:43 +02:00
Sébastien Han b685aceede Merge pull request #2044 from major/avoid-jinja-in-when
Remove jinja2 delimiters from `when` keys
2017-10-12 22:23:06 +02:00
Major Hayden a1c76e834c
Simplify NTP checks/install
This patch simplifies the checks and installation tasks for NTP.

Debian and Red Hat had a check for NTP's presence but would then
install NTP right afterwards anyways. In addition, there were
tasks for atomic that weren't used anywhere else in the role.

This patch also uses a dynamic include to reduce delays from
skipped tasks.
2017-10-12 12:31:07 -05:00
Sébastien Han 9c3d749f7c Merge pull request #2038 from major/fix-cmd-warning
Suppress yum/dnf/rpm command warnings
2017-10-12 18:46:52 +02:00
Major Hayden c01851325e
Remove jinja2 delimiters from `when` keys
This patch changes the `when:` keys so that they have no jinja2
delimiters. This avoids Ansible warnings which could turn into
errors in a future Ansible release.
2017-10-12 11:27:42 -05:00
Guillaume Abrioux 17623a2157 Merge pull request #2036 from ceph/cephfs-pool
mds: precisely define cephfs pool
2017-10-12 17:47:10 +02:00
Sébastien Han b49f9bda21 mds: precisely define cephfs pool
We now have a variable called ceph_pools that is mandatory when
deploying a MDS.
It's a dictionnary that contains a pool name and a PG count. PG count is
mandatory and must be set, the playbook will fail otherwise.

Closes: https://github.com/ceph/ceph-ansible/issues/2017
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-12 15:56:04 +02:00
Major Hayden 33b200d43a
Suppress yum/dnf/rpm command warnings
Ansible throws warnings when using yum/dnf/rpm with the command
module:

    [WARNING]: Consider using yum module rather than running yum

This patch adds the `warn: no` argument to suppress the warnings
in the Ansible output.
2017-10-12 08:38:05 -05:00
Major Hayden 620fb37dd4
Avoid deprecated always_run
The `always_run` key is deprecated and being removed in Ansible 2.4.
Using it causes a warning to be displayed:

    [DEPRECATION WARNING]: always_run is deprecated.

This patch changes all instances of `always_run` to use the `always`
tag, which causes the task to run each time the playbook runs.
2017-10-12 08:29:44 -05:00
Sébastien Han 739a41ae91 Merge pull request #2030 from major/ceph-common-pass-pkgs-as-list
Pass list of packages instead of with_items
2017-10-12 09:15:58 +02:00
Major Hayden 9d62630303
Pass list of packages instead of with_items
Modern versions of Ansible can handle a list of packages passed
directly to the package modules. This patch optimizes the package
install process by passing the list of packages directly to the
module.
2017-10-11 12:18:15 -05:00
Sébastien Han aa70b07ae2 config: proper render ceph.conf when doing collocation
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-11 18:29:34 +02:00
Sébastien Han f50b170a49 Merge pull request #2022 from ceph/fix-purge-iscis
[skip ci] purge-iscsi: fix group name
2017-10-11 14:21:19 +02:00
Sébastien Han d0a9e57bfc osd: rollback bindmount of /run/udev
This is causing unknown issues when trying to start a dmcrypt container.
Basically the container is stuck at mount opening the LUKS device. This
is still unknown why this is causing trouble but we need to move
forward. Also, this doesn't seem to help in any ways to fix the race
condition we've seen.

Here is the log for dmcrypt:

cryptsetup 1.7.4 processing "cryptsetup --debug --verbose --key-file
key luksClose fbf8887d-8694-46ca-b9ff-be79a668e2a9"
Running command close.
Locking memory.
Installing SIGINT/SIGTERM handler.
Unblocking interruption on signal.
Allocating crypt device context by device
fbf8887d-8694-46ca-b9ff-be79a668e2a9.
Initialising device-mapper backend library.
dm version   [ opencount flush ]   [16384] (*1)
dm versions   [ opencount flush ]   [16384] (*1)
Detected dm-crypt version 1.14.1, dm-ioctl version 4.35.0.
Device-mapper backend running with UDEV support enabled.
dm status fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush ]
[16384] (*1)
Releasing device-mapper backend.
Trying to open and read device /dev/sdc1 with direct-io.
Allocating crypt device /dev/sdc1 context.
Trying to open and read device /dev/sdc1 with direct-io.
Initialising device-mapper backend library.
dm table fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush
securedata ]   [16384] (*1)
Trying to open and read device /dev/sdc1 with direct-io.
Crypto backend (gcrypt 1.5.3) initialized in cryptsetup library
version 1.7.4.
Detected kernel Linux 3.10.0-693.el7.x86_64 x86_64.
Reading LUKS header of size 1024 from device /dev/sdc1
Key length 32, device size 1943016847 sectors, header size 2050
sectors.
Deactivating volume fbf8887d-8694-46ca-b9ff-be79a668e2a9.
dm status fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush ]
[16384] (*1)
Udev cookie 0xd4d14e4 (semid 32769) created
Udev cookie 0xd4d14e4 (semid 32769) incremented to 1
Udev cookie 0xd4d14e4 (semid 32769) incremented to 2
Udev cookie 0xd4d14e4 (semid 32769) assigned to REMOVE task(2) with
flags         (0x0)
dm remove fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush
retryremove ]   [16384] (*1)
fbf8887d-8694-46ca-b9ff-be79a668e2a9: Stacking NODE_DEL [verify_udev]
Udev cookie 0xd4d14e4 (semid 32769) decremented to 1
Udev cookie 0xd4d14e4 (semid 32769) waiting for zero

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-11 13:21:37 +02:00
Major Hayden 10e1d464e5
Remove duplicate 'package' key
This patch fixes a typo where "package:" was used twice in the same
task.
2017-10-10 15:39:20 -05:00
Sébastien Han f6d1be269f Merge pull request #2015 from ceph/fix_nfs-ganesha-repos
nfs: move repository configuration in ceph-nfs role
2017-10-10 17:15:33 +02:00
Guillaume Abrioux 5dc9c640e8 nfs: add missing condition for debian_rhcs
in addition to c4dcdaa20 this commit adds the missing condition on
install tasks for debian_rhcs deployment. Without them, these tasks are
played on any kind of deployment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-10 16:27:00 +02:00
Jan Provaznik 87b1da09e7 Ceph-nfs dynamic exports fixes
* DBus on host should include ganesha service file
* to allow ganesha container to respond on DBus it needs to run
  in --privileged mode (ganesha folks contacted to look at this)
* ceph_nfs_include_exports_dir variable replaced with more general
  ceph_nfs_dynamic_exports
2017-10-10 13:59:01 +02:00
Guillaume Abrioux fbd1a57b11 iscsi-gw: move repository configuration to ceph-iscsi-gw
This is something that has nothing to do in `ceph-common`, this
is too specific to `ceph-iscsi-gw` role.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-10 11:36:03 +02:00
Guillaume Abrioux c4dcdaa201 nfs: move repository configuration in ceph-nfs role
This is something that has nothing to do in `ceph-common`, this
is too specific to `ceph-nfs` role.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-10 11:35:58 +02:00
Guillaume Abrioux 9e8204d9e8 nfs: move packages installation to own role
Make role `ceph-nfs` handling itself the installation of nfs
packages.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-09 19:10:15 +02:00
Guillaume Abrioux 3c64abe07d mds: move installation packages in role itself
Make role `ceph-mds` handling itself the installation of `ceph-mds`
package.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-09 17:25:46 +02:00
Sébastien Han 4032f102fe iscsi: move package install to ceph-iscsi-role
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-09 17:25:46 +02:00
Guillaume Abrioux 1581a1c078 mgr: move installation packages in role itself
Make role `ceph-mgr` handling itself the installation of `ceph-mgr`
package because it's complicated to manage it regarding we are going to
install `jewel vs. luminous`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-09 17:25:45 +02:00
Sébastien Han bf99751ce1 osd: bindmount /run/udev
Ensures that "udevadm" is able to check the status of udev's event queue.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-09 17:25:45 +02:00
Sébastien Han 1bd891232c config: do not duplicate sections when doing collocation
Prior to this commit, when collocating a RGW and NFS on the same box the
ceph.conf layout was the following:

[client.rgw.rgw0]
host = mds0
host = rgw0
rgw frontends = civetweb port=192.168.15.50:8080
num_threads=100[client.rgw.mds0]
rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100
rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100
keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring
keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring
rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0
log file = /var/log/ceph/test-rgw-mds0.log
log file = /var/log/ceph/test-rgw-rgw0.log

[mds.mds0]
host = mds0

[global]
rgw override bucket index max shards = 16
fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5
rgw bucket default quota max objects = 1638400
osd_pool_default_size = 1
public network = 192.168.15.0/24
mon host = 192.168.15.10,192.168.15.11,192.168.15.12
osd_pool_default_pg_num = 8
cluster network = 192.168.16.0/24

[mds.rgw0]
host = rgw0

[client.rgw.mds0]
host = mds0
rgw data = /var/lib/ceph/radosgw/test-rgw.mds0
keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring
rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100
log file = /var/log/ceph/test-rgw-mds0.log

Basically appending all the sections. This commits solves that.
Now the sections appear like this:

-bash-4.2# cat /etc/ceph/test.conf
[client.rgw.rgw0]
log file = /var/log/ceph/test-rgw-rgw0.log
host = rgw0
keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring
rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100

[client.rgw.mds0]
log file = /var/log/ceph/test-rgw-mds0.log
host = mds0
keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring
rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100

[global]
cluster network = 192.168.16.0/24
mon host = 192.168.15.10,192.168.15.11,192.168.15.12
osd_pool_default_size = 1
public network = 192.168.15.0/24
rgw bucket default quota max objects = 1638400
osd_pool_default_pg_num = 8
rgw override bucket index max shards = 16
fsid = 77a21980-3033-4174-9264-1abc7185bcb3

[mds.rgw0]
host = rgw0

[mds.mds0]
host = mds0

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-09 17:25:44 +02:00
Sébastien Han 7054abef99 Merge pull request #2009 from ceph/fix-clean-pg
[skip ci] handler: do not test if pgs_num = 0
2017-10-07 03:39:26 +02:00
Sébastien Han 9f1bd3d6dd handler: add serial restart back
We now restart daemons on each machine in a serialized fashion.

Closes: https://github.com/ceph/ceph-ansible/issues/1989
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-07 03:39:10 +02:00
Sébastien Han a4dcef73d4 common: fix debian rhcs installation
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-07 03:39:09 +02:00
Sébastien Han c693e95cbf purge-docker: rework device detection
we don't need "devices" and other device variable anymore, the playbook
detects that for us.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-07 03:39:04 +02:00
Sébastien Han ac29e8f977 Merge pull request #1983 from jprovaznik/suffix
Allow to override systemd service instance id
2017-10-06 22:40:57 +02:00
Sébastien Han 5d39f378da Merge pull request #1984 from jprovaznik/exportdir
Include exports dir in ceph-nfs config file
2017-10-06 22:38:13 +02:00
Ali Maredia 28862a99d9 nfs: missing conditional for setting rgw key permissions
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2017-10-06 15:21:35 -04:00
Sébastien Han 11f51df1fc Merge pull request #2005 from ceph/wip-nfs-export-id
nfs: config var changes
2017-10-06 17:05:21 +02:00
Sébastien Han 779f642fa8 use get to check stdout_lines
During the initial play, the docker command doesn't not exist and then
there is no stdout_lines to the command. So get allows us to fix this by
declaring an array if the command fails.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-06 16:57:46 +02:00
Sébastien Han d5ae0a3340 handler: do not test if pgs_num = 0
We don't need to wait if they are no PGS.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-06 16:57:46 +02:00
Guillaume Abrioux 6b027557e6 osd: fix `set_fact build dedicated_devices`
Use an intermediate variable to build the final `dedicated_devices` list
to avoid duplicate entry in that array. (We need a 1:1 relation between
`dedicated_devices` and `devices` since we are using a `with_together`
later.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-06 15:00:32 +02:00
Guillaume Abrioux d363b0f741 rbd: fix bug when trying to fetch key
With jewel, `bootstrap_rbd_keyring` is not set because of this condition:

```
when:
  - ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
```

Therefore, the task `try to fetch ceph config and keys` will fail.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-06 11:34:29 +02:00
Jan Provaznik 3c16af5ef2 Allow to override systemd service instance id
It's useful to have constant service instance id when ceph-nfs
is managed by pacemaker.
2017-10-06 08:20:37 +02:00
Ali Maredia 0c09cd3e2e nfs: config var changes
- remove unused ganesha config vars,

- set different default Export_ids for each FSAL

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2017-10-05 16:51:23 -04:00
Sébastien Han 1121a840ef Merge pull request #2003 from ceph/debian-iso
[skip ci] common: iso install on Debian is supported by rhcs
2017-10-05 18:57:47 +02:00
Sébastien Han feaf5ff9c6 common: iso install on Debian is supported by rhcs
Also adds support for RCSH installation on Debian.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-05 18:57:09 +02:00
Sébastien Han 425ecb3c7d common: fix ga verison for debian rhcs
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-05 18:45:30 +02:00
Sébastien Han 639389b9cd Merge pull request #1985 from ceph/debian-rhcs
[skip ci] common: fix rhcs installation on debian
2017-10-05 18:42:46 +02:00
Sébastien Han 0d833657c1 Merge pull request #2001 from ceph/iscsi
iscsi: fix wrong group name for iscsi
2017-10-05 18:29:06 +02:00
Sébastien Han 29888649e5 osd: do not do unique on dedicated_devices
This is needed later, if we do unique, only the first OSD will get a
journal.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-05 18:20:18 +02:00
Sébastien Han 9193e88878 common: fix rhcs installation on debian
* Change version from 2 to 3.
* use ceph_rhcs_cdn_debian_repo_version to use other repositories along
* with ceph_rhcs_cdn_debian_repo

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-05 17:42:21 +02:00
Sébastien Han b6b24a5ca9 iscsi: fix wrong group name for iscsi
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1498490
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-05 17:25:32 +02:00
Sébastien Han 9304bb6c74 Merge pull request #1997 from rrmichel/osd_fragment
Fixing path to osd_fragment.yml
2017-10-05 15:58:49 +02:00
Sébastien Han 164c77acd1 Merge pull request #1995 from ceph/remove-rbd-check
jewel: remove rbd check
2017-10-05 15:31:48 +02:00
Guillaume Abrioux 8fb68297a2 common: remove unusuable conditions
`ceph_release` isn't available at this step of the playbook because it
is set later based on the installed binaries.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-05 14:59:37 +02:00
Sébastien Han c803dedec8 Merge pull request #1993 from jprovaznik/log
Fix bind mount for /var/lib/nfs/ganesha directory
2017-10-05 14:43:26 +02:00
Michel Rode b462b68e65 Fixing path to osd_fragment.yml 2017-10-05 14:42:10 +02:00
Jan Provaznik b8916ecbc1 Include exports dir in ceph-nfs config file
Exports dir is used when dynamic exports creation is enabled.
2017-10-05 14:37:15 +02:00
Sébastien Han b545080d71 Merge pull request #1988 from ceph/fix_keyrings
docker: fix keyrings copied on all nodes
2017-10-05 14:30:09 +02:00
Sébastien Han bbf6bebe32 jewel: remove rbd check
The value of doing this is fairly low compare to the added value.
So we remove these tasks, if rbd pool on Jewel doesn't have the right PG
value you can always increase it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-05 14:21:37 +02:00
Jan Provaznik 62ea6f6e7f Fix bind mount for /var/lib/nfs/ganesha directory 2017-10-05 13:44:43 +02:00
Jan Provaznik 43e57abfd8 Evaluate cephfs pool variables
Otherwise pools with names 'cephfs_data' and 'cephfs_metadata'
are created.
2017-10-05 10:00:20 +02:00
Guillaume Abrioux 70e2787fe2 docker: fix keyrings copied on all nodes
All keyring are getting copied to all nodes.
This commit fixes a leftover from a previous code refactor.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-05 09:23:22 +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 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 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 f37e014a65 Merge pull request #1974 from ceph/mgr-upgrade-luminous
upgrade: a support for mgrs
2017-10-03 19:57:31 +02: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 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 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 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
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
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 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
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 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 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 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 77fc8ba87f Merge pull request #1931 from ceph/re-enable-iscsi
iscsi: re-enable the scenario
2017-09-28 19:44:52 +02:00
Sébastien Han 67c78da056 iscsi: re-enable the scenario
CentOS 7.4 vagrant box is now available so re-enabling this scenario.
For more info:
https://seven.centos.org/2017/09/updated-centos-vagrant-images-available-v1708-01/

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-28 18:46:28 +02:00
Sébastien Han 0010979412 Merge pull request #1641 from fullerdj/wip-djf-key-timeout
mon/ceph_keys: Add timeout flag to ceph-create-keys
2017-09-28 09:40:50 +02:00
Guillaume Abrioux d20dc54202 docker-common: fix wrong syntax
there is no need to backslash the quotes here.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-28 00:30:08 +02:00
Douglas Fuller 9bcbf748a3 mon/ceph_keys: Add timeout flag to ceph-create-keys
Specify the timeout flag to ceph-create-keys, which causes it to time out
if a monitor quorum isn't achieved. This overrides the default timeout
of 10 minutes, causing ceph-ansible to fail faster in the event of cluster
network issues.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-09-27 18:05:59 -04:00
Zack Cerza 70b321f34c ceph-common: Fix logic for ceph_repository_type
It's failing if a *valid* choice is specified.

Signed-off-by: Zack Cerza <zack@redhat.com>
2017-09-25 15:28:27 -06:00
Sébastien Han e4ac736071 Merge pull request #1943 from ceph/mgr-site
handler: enhance socket detection
2017-09-25 18:43:32 +02:00
Sébastien Han 4266bb5d3f Merge pull request #1933 from ceph/osd-container-reboot
[skip ci] osd: fix container reboot
2017-09-25 18:36:25 +02:00
Sébastien Han 8b6456dc8a handler: enhance socket detection
We have seen issues with leftover socker. So now, if a socket is found
we also check if it's accessed by a process. If so, we can run the
handler, if not we remove it and continue the playbook.

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-25 13:44:51 +02:00
Sébastien Han 45797ab968 osd: fix container reboot
It's sad but we can not rely on the prepare container anymore since the
log are flushed after reboot. So inpecting the container does not return
anything.
Now, instead we use a ephemeral container to look up for the
journal/block.db/block.wal (depending if filestore or bluestore) and
build the activate command accordingly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-25 13:34:47 +02:00
Guillaume Abrioux be757122f1 config: fix path to set `interface` in ceph.conf
need to use `hostvars[host]['XXX']` to retrieve the monitor
interface and/or radosgw interface.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-23 14:18:28 +02:00
Sébastien Han f3851df0c7 Merge pull request #1940 from ceph/rgw-interface
config: fix rgw interface when using different interfaces
2017-09-22 18:52:51 +02:00
Sébastien Han 8f71c08e7b handler: display ceph status properly
Fix bash error, doing ceph "$CEPH_CLI" -s gives us

ceph '--name client.bootstrap-osd --keyring
/var/lib/ceph/bootstrap-osd/test.keyring --cluster test' -s

which results in a wrongly formatted command. Removing the double quotes
expands the array properly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-22 17:45:35 +02:00
Sébastien Han 2e0c2928e9 nfs: fix docker_exec_cmd_nfs default value
the default is not an array, default is empty.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-22 16:22:36 +02:00
Sébastien Han 4a55085914 config: fix rgw interface when using different interfaces
Conf file generation failing on rgw nodes when nodes have different
interface names.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1493552
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-22 15:41:11 +02:00
Sébastien Han 64824baa83 nfs: fix undefined variable
This is what happens when you don't run all the jobs from the CI...

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-22 15:37:43 +02:00
Sébastien Han 839bc11df0 Merge pull request #1923 from ceph/nfs-container
[skip ci] tests: add nfs container test
2017-09-22 12:22:10 +02:00
Sébastien Han aa5c36f19c nfs: several fixes
- move the file fetch/push to the existing task
- rename the include
- generate the ganesha template from ansible
- re-arrange role structure
- re-use tasks for non-container and container
- configure keys for non-container and container
- fix rgw container key collection;

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-22 00:37:32 +02:00
Guillaume Abrioux 599429dd31 common: fix debian install
in addition to #1926 this commit fixes the error when trying to include
`install_debian_rhcs_packages.yml`

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-21 13:26:29 +02:00
Guillaume Abrioux b8c3fa9727 nfs: change ownership on /var/log/ganesha
to fix selinux capability issue that prevent nfs to start.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-21 09:56:37 +02:00
Guillaume Abrioux 1886a69b8b docker-common: refact `stat_ceph_files.yml`
there is no need to build the `ceph_config_keys` fact in several steps
for rbd-mirror keyring.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-21 09:56:37 +02:00
Guillaume Abrioux 62cd0bae54 rbd: fix missing keyring on nodes
the rbd key was not pushed on rbd nodes because its keyring path was not
added in `ceph_config_keys`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-21 09:56:37 +02:00
Guillaume Abrioux 295c1b0610 docker-common: fix ceph_health check
`docker ps` will always return `0`
(see: https://github.com/docker/cli/issues/538).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-21 09:56:37 +02:00
Guillaume Abrioux 6c9f3a08a7 rgw: refact start_docker_rgw.yml
remove usage of `shell` module in favor of `systemd` module.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-21 09:56:37 +02:00
Guillaume Abrioux 90c4066ce5 mgr: add missing admin key for mgr container
Followup on #1761.
Add missing admin key for mgr node in containerized deployment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-21 09:56:37 +02:00
Sébastien Han adf5017924 config: remove max open file
This is only used by the old sysvinit scripts

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-20 23:06:01 +02:00
Sébastien Han a4baed1025 config: no not generate osd section if bluestore
This section is not needed when running a bluestore osd.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-20 18:14:48 +02:00
Sébastien Han cb05172605 docker: we don't need to copy the ceph.conf on all the nodes
We generate the ceph.conf on all the nodes through the
ceph-docker-common so there is no need to push it to the Ansible file.

Also this is breaking the ceph.conf template generation since we only
generate sections based on the host the ansible task is running on.

For example, what's typically happening, we bootstrap the monitor, we
get a ceph.conf generated for a mon only, we go on an osd, we generate
the ceph.conf with osd section (done by ceph-docker-common) but this
gets overwritten by the copy_config task of the ceph-osd role.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-20 16:33:29 +02:00
Sébastien Han 7aab133617 Merge pull request #1920 from jprovaznik/ganesha
Make ceph-nfs service enablement/start optional
2017-09-20 14:48:36 +02:00
Sébastien Han a89363b0ae Merge pull request #1926 from ceph/rhcs-debina
common: fix rhcs debian install
2017-09-19 19:50:40 +02:00
Sébastien Han 75e77f5948 common: fix rhcs debian install
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1493231
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-19 19:49:44 +02:00
Ali Maredia 3ba1a68cf5 nfs: ganesha.conf template fixes
- Change capitalization of config options to be
in line with what config.txt in the nfs-ganesha
tree says

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2017-09-19 12:45:24 -04:00
Sébastien Han dd7f21bd92 common: fix rhcs installation and rgw package for nfs
RHCS install wasn't working at all prior to this commit as the name of
the include was pointing to a non-existing file.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1492056
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-19 12:12:22 +02:00
Sébastien Han 87e2dae9d8 Merge pull request #1919 from ceph/iscsi-check
common: fix rhel check
2017-09-19 12:10:10 +02:00
Sébastien Han ace97e8720 Merge pull request #1904 from ceph/name-include-fact
name includes and set_fact for clarity
2017-09-19 12:09:25 +02:00
Jan Provaznik 8c510ab9f9 Make ceph-nfs service enablement/start optional
When ceph-nfs service is managed by pacemaker, it's useful to
not enable and start ceph-nfs service through systemd but let
pacemaker to start the service in a next step.
2017-09-19 11:59:54 +02:00
Sébastien Han dbe64f66f7 common: fix rhel check
Looks like Ansible is now using "RedHat" instead of "Red Hat Enterprise
Linux"

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-19 11:55:26 +02:00
Sébastien Han 773010ee49 Merge pull request #1911 from fghaas/1910
Introduce ceph_nfs_ceph_user
2017-09-19 10:03:46 +02:00
Florian Haas ada2f147f5 Introduce ceph_nfs_ceph_user
In analogy to ceph_nfs_rgw_user, we should be able to define a user
with which the nfs-ganesha Ceph FSAL connects to the cluster.

Introduce a ceph_nfs_ceph_user variable, setting its default to
"admin" (which preserves the prior behavior of always connecting as
client.admin).

Fixes #1910.
2017-09-19 09:07:28 +02:00
Sébastien Han d100b4e596 name includes and set_fact for clarity
When Ansible is not run with verbose options it's difficult to see which
include and/or set_fact does what. So adding a name for each clarifies.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-18 23:39:46 +02:00
Sébastien Han 66d41f342d Merge pull request #1889 from ceph/client-containers
client: ability to create keys and pool with no ceph binaries
2017-09-18 17:27:32 +02:00
Sébastien Han 2749368a2d Merge pull request #1915 from ceph/state-leftover
docker-common: re-introduce state for leftover files
2017-09-18 15:46:07 +02:00
Sébastien Han aa5d94fc87 docker-common: re-introduce state for leftover files
The variable "statleftover" was removed by commit
a60c74f61e
and never added back to the new playbook,
yet it is still being referenced.

Adding it back

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1492224
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-18 15:01:32 +02:00
Sébastien Han 85d73e3be2 client: ability to create keys and pool with no cpeh binaries
On a container env, machines don't have any ceph binaries so we need to
use a container to run the commands.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-18 14:41:52 +02:00
Sébastien Han 68a1390dc9 Merge pull request #1898 from ceph/restart-mon
defaults: restart docker daemon higher delay
2017-09-15 06:23:51 -06:00
Sébastien Han ed3003cf41 defaults: restart docker daemon higher delay
Use default delay since the mon (in particular) can take more time to
restart.
Solves error with:

STDERR:

Error response from daemon: No such container: ceph-mon-mon0

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-14 13:38:11 -06:00
Sébastien Han fb02b1d9d3 mon: create the mgr key for release >= luminous
This fixes RHCS builds. We know which Ceph version we are running on.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-14 11:06:44 -06:00
Sébastien Han 6f0b1fe803 rgw: remove old variables
Since the only support civetweb these variables are obsolete.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-14 09:42:50 -06:00
Sébastien Han 660893e70e osd: add meaningful message for journal_size
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-13 23:49:15 -06:00
Sébastien Han ef8d37dd0d Merge pull request #1800 from ceph/wip-osd-start-fix
ceph-osd: Fix osd start sequence
2017-09-13 17:20:10 -06:00
Sébastien Han 2f51f0de28 Merge pull request #1880 from ceph/wip-rgw-nfs
nfs: configure RGW FSAL to start up correctly
2017-09-13 14:20:14 -06:00
Sébastien Han f67b47d056 Merge pull request #1882 from ceph/multi-journal
osd: drop support for device partition
2017-09-13 11:43:48 -06:00
Sébastien Han ac62437609 Merge pull request #1883 from ceph/quick_refact
osd: refact include of `activate_osds.yml`
2017-09-12 22:11:31 -06:00
Sébastien Han c3866fc4bd Merge pull request #1747 from ceph/add-iscsi
resync ceph-iscsi-gw with old upstream
2017-09-13 02:06:50 +02:00
Sébastien Han aa364264cd resync ceph-iscsi-gw with old upstream
Taken from https://github.com/pcuzner/ceph-iscsi-ansible/tree/tcmu-fixes

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1454945 and
https://bugzilla.redhat.com/show_bug.cgi?id=1484083
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-12 18:06:10 -06:00
Sébastien Han 2a1b8a1997 Merge pull request #1884 from ceph/mon-container-ip
mon: add support for monitor_address block for containers
2017-09-13 01:46:18 +02:00
Sébastien Han fdf924401f osd: drop support for device partition
We have been struggling with this, it's still broken and breaking other
things too now.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1490283
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-12 17:42:07 -06:00
Guillaume Abrioux 49ad8528e5 osd: refact include of `activate_osds.yml`
remove duplicate code.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-12 16:53:11 -06:00
Sébastien Han 02ba65dbbe mon: add support for monitor_address block for containers
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-12 16:28:08 -06:00
Sébastien Han 6b8ed0440e Merge pull request #1761 from ceph/split_copy_keys
docker: split the task 'copy ceph configs&keys'
2017-09-13 00:21:50 +02:00
Ali Maredia 52efe92a87 nfs: configure RGW FSAL to start up correctly
- Add RGW keyring to nfs node
- Add RGW section to ganesha.conf
- Add RGW section to ceph.conf onf nfs node

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2017-09-12 16:27:16 -04:00
Guillaume Abrioux 20946f7220 ceph-osd: remove deprecated comment in sample file
Since #1724 has been merged, this comment is deprecated

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-12 16:48:10 +02:00
Guillaume Abrioux 0f506f4f0a Docker: split the task 'copy ceph configs&keys'
All keys are copied to all nodes.
This commit split that task in each roles so keys are copied to their
respective nodes.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-11 21:14:13 +02:00
Sébastien Han 2ea7f287fa docker: simplify variable declaration
Less configuration for the user, the container inherit from the global
variables. No more container specific variables.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-09 01:22:06 +02:00
Sébastien Han 4767eaaab3 Merge pull request #1878 from ceph/add-rbd-mirror
Add rbd mirror
2017-09-09 01:21:12 +02:00
Sébastien Han 7054615551 ci: deploy rbd mirror
Deploy rbd mirorr in cluster scenario

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-09 01:17:10 +02:00
Sébastien Han 477f86e305 switch to container: fix ceph nfs
The service is nfs-ganesha where ceph-nfs@{{ ansible_hostname }} will be
the name of the container.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-08 22:43:50 +02:00
Sébastien Han d46d453b83 Merge pull request #1780 from ceph/wip-rgw-nfs
Wip RGW NFS
2017-09-08 19:26:02 +02:00
Guillaume Abrioux b59e9cc732 Merge pull request #1871 from ceph/handler-collocate
defaults: do not restart unconfigured (yet) daemons
2017-09-08 18:15:02 +02:00
Sébastien Han a05c58ba37 Merge pull request #1874 from ceph/rbd-mirror-mem
ceph-rbd-mirror; docker fix typo
2017-09-08 17:50:55 +02:00
Sébastien Han 7a93d88025 ceph-rbd-mirror; docker fix typo
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-08 17:47:48 +02:00
Ali Maredia f8171e8b4a nfs: rename host to have ceph- prefix
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2017-09-08 11:38:05 -04:00
Ali Maredia f3e2235b3a nfs-ganesha: add config overrides section
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2017-09-08 11:37:58 -04:00
Sébastien Han d53f55e807 Merge pull request #1870 from Logan2211/omit-default-release
Omit the apt default_release if it is not needed
2017-09-08 16:55:03 +02:00
Guillaume Abrioux 44fd928e23 mds: rename mds_socket fact
Rename this fact to keep consistency with handlers in `ceph-defaults`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-09-08 15:57:58 +02:00
Ali Maredia 55724c6e93 nfs-ganesha: add dev, stable, and rhcs nfs-ganesha's for ceph-nfs role
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2017-09-08 09:13:20 -04:00
Sébastien Han 12f6e53090 defaults: do not restart unconfigured (yet) daemons
In a collocated scenario, where you might put a rgw, a mds and a mon on
the same node you don't want the handler blindly restart all the daemons
on the node. Indeed some of them might not be configured yet.
Implementing a more precise socket detection, for each daemon type.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1488813
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-08 12:02:37 +02:00
Logan V d8cb62c981 Omit the apt default_release if it is not needed
The apt module will fail to downgrade packages properly when defualt
release is unnecessarily defined.

Closes #1869
2017-09-07 11:50:57 -05: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
Sébastien Han 27b3f9a7d4 Merge pull request #1850 from fultonj/issue/1848
Add option to create client keyring file but not import it
2017-09-07 13:51:11 +02:00
Sébastien Han cf88c136f5 Merge pull request #1859 from ceph/container-limit
container: introduce resource limitation for containers
2017-09-07 12:51:34 +02:00
Sébastien Han d2032c92af Merge pull request #1862 from ceph/fail-ansible
fail if ansible version < 2.3
2017-09-07 08:44:01 +02:00
Sébastien Han fc3300ea4f fail if ansible version < 2.3
We only test and support 2.3.x at the moment.

Closes: https://github.com/ceph/ceph-ansible/issues/1858
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-07 07:53:17 +02:00
John Fulton a57f61efd9 Add option to create client keyring file but not import it
Add new boolean parameter for client config create_key_file_only
with a default of false. When create_key_file_only is true, the
client tasks to connect to the external ceph cluster to verify
the key `ceph auth import` the key are skipped.

Fixes: #1848
2017-09-06 13:56:06 +00:00
Sébastien Han 2fa151b9e8 container: introduce resource limitation for containers
This can be controlled via 2 options:

* ceph_$DAEMON_docker_memory_limit
* ceph_$DAEMON_docker_cpu_limit

All daemons default to 1GB for memory and 1 CPU by default.
Recommendations from:
https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-06 14:52:21 +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 b6c1a0c68f Merge pull request #1853 from ceph/fix-prepare
ceph-osd: do not re-prepare if already prepared
2017-09-05 13:59:40 +02:00
Sébastien Han 5ed1a91aeb Merge pull request #1819 from ceph/no-container-log
ceph-docker-common: do not log inside the container
2017-09-05 11:47:11 +02:00
Sébastien Han 1dd976d28e ceph-osd: do not re-prepare if alreadyy prepared
I forgot to re-add the partition check while refactoring the osd

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-05 09:51:57 +02:00
Sébastien Han 23a0c26c4f client: do not copy admin key by default
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-02 00:54:17 +02:00
Sébastien Han 58f664fd17 ceph-rgw: fix systemd unit layout
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-09-01 19:02:48 +02:00
Sébastien Han 967e875fd0 Merge pull request #1827 from andymcc/rgw_systemd_fix
Fix RGW systemd directory
2017-09-01 18:12:23 +02:00
Alfredo Deza 98d107cebb common do not filter by distro when dev is set for figuring out ceph_release
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-08-31 16:18:08 -04:00
Sébastien Han 673938ec96 Merge pull request #1839 from ceph/colonwq-update-docker-rgw-exec
Update ceph_rgw_docker_extra_env to add bind ip
2017-08-31 19:47:16 +02:00
Sébastien Han ea9b6395cb Merge pull request #1838 from ceph/rgw-units
Rgw units
2017-08-31 19:38:23 +02:00
Andrew Schoen 29df79e54e Merge pull request #1841 from ceph/lvm-partitions
lvm-osds: test with a partition and an lv as journals
2017-08-31 12:09:19 -05:00
Sébastien Han 3dd47a45cb ceph-defaults: fix handlers for mds and rgw
The way we handle the restart for both mds and rgw is not ideal, it will
try to restart the daemon on the host that don't run the daemon,
resulting in a service file being created (see bug description).

Now we restart each daemon precisely and in a serialized fashion.

Note: the current implementation does NOT support multiple mds or rgw on
the same node.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1469781
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-31 19:02:21 +02:00
Sébastien Han 7ee1f88ee5 ceph-common: remove useless changed task
There is no need to show a "changed" at the end of the play for a
"command" module task.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-31 18:27:43 +02:00
Keith Schincke eaccc12797 Update ceph_rgw_docker_extra_env to add bind ip
This patch adds passing the RGW_CIVETWEB_IP to the docker
container. This IP defaults to the value of radosgw_civetweb_bind_ip.
radosgw_civetweb_bind_ip default to ipv4.default

Without this value, the RGW containter will bind to 0.0.0.0
2017-08-31 15:50:34 +02:00
Sébastien Han e581539e20 ceph-rgw: do not run a privileged rgw container
There is no need for a privileged rgw container

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-31 15:50:15 +02:00
Sébastien Han 7ccd10a15e rgw: cleanup old code and remove systemd condition
Remove the old check prior systemd.
We only support systemd so there is no need to run a condition on
systemd. The playbook will fail if systemd is not present.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-31 08:29:30 +02:00
Andrew Schoen fcba9d17f0 ceph-osd: add support for --journal vg/lv for lvm osds
This also updates the tests

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-30 15:55:16 -05:00
Alfredo Deza da90edce3e common dev repos should not need to specify a 'release'
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-08-30 13:37:24 -04:00
Alfredo Deza 6565c38238 common: ceph_repository should not be rhcs or dev
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-08-30 13:33:04 -04:00
Alfredo Deza 8fd2bf7e2c common: use the value of ceph_repository in the error message
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-08-30 13:33:04 -04:00
Sébastien Han 13aac5027a Merge pull request #1741 from ceph/refactor-installation
common: refactor installation method
2017-08-30 17:42:29 +02:00
Sébastien Han b05271f464 Merge pull request #1724 from ceph/container-multi-journal
osd: allow multi dedicated journals for containers
2017-08-30 17:41:42 +02:00
Sébastien Han a60c74f61e ceph-docker-common: re-organize stat ceph file
Use a single file to run the checks instead of duplicating code.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-30 14:44:34 +02:00
Sébastien Han e0a264c7e9 osd: allow multi dedicated journals for containers
Fix: https://bugzilla.redhat.com/show_bug.cgi?id=1475820
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-30 12:34:06 +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
Andy McCrae a9d91c3d69 Fix RGW systemd directory
The ceph RGW systemd services are actually named "ceph-radosgw" and not
"ceph-rgw", this patch fixes that for the systemd overrides file.
2017-08-29 17:24:52 +01:00
Sébastien Han 5743916092 common: add mimic release facts
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-29 17:21:37 +02:00
Sébastien Han fa9f2313d5 Merge pull request #1822 from ceph/rhcs-container-release
ceph-docker-common: detect ceph version
2017-08-29 12:16:20 +02:00
Sébastien Han d0515cb704 Merge pull request #1825 from ceph/fix-item
ceph-docker-common: fix empty array
2017-08-29 12:15:46 +02:00
Sébastien Han b3e5206289 Merge pull request #1814 from ceph/handler-defaults
handler: default to empty array if task skipped
2017-08-29 11:09:35 +02:00
Sébastien Han cfddd2903c ceph-docker-common: fix empty array
The list can not be evaluated properly if it containers '[]', which is
the case when using the filter "default([])". To fix this, we have to
properly merge the lists.

This is fixing the issue: "list object has no element 1"

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-29 10:25:46 +02:00
Sébastien Han 764e697186 ceph-docker-common: detect ceph version
By detecting the ceph version running in the container we can easily
apply conditions like:
ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous

We do that already, in ceph-docker-common/tasks/fetch_configs.yml.

This fixes the error:

TASK [ceph-docker-common : register rbd bootstrap key]
******************************************************

fatal: [magna005]: FAILED! => {"failed": true, "msg": "The conditional
check 'ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous'
failed. The error was: error while evaluating conditional
(ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous):
'dict object' has no attribute 'dummy'\n\nThe error appears to have been
in
'/home/ubuntu/ceph-ansible/roles/ceph-docker-common/tasks/fetch_configs.yml':
line 2, column 3, but may\nbe elsewhere in the file depending on the
exact syntax problem.\n\nThe offending line appears to be:\n\n---\n-
name: register rbd bootstrap key\n  ^ here\n"}

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1486062
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-28 23:28:47 +02:00
Sébastien Han aa69c2c007 ceph-docker-common: do not log inside the container
Logging inside the container is not useful since it writes to the
overlayfs partition, resulting in potential performance degradation on
the container.

If you need to check the logs, just look at journald.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-28 12:04:49 +02:00
Sébastien Han 29753da05c handler: default to empty array if task skipped
with_items is evaluated before the when condition so if the task that
registers the 'results' is skipped the task will fail with:

{"failed": true, "msg": "'dict object' has no attribute 'results'"}

Defaulting to an empty array fixes the issue.

Reverts: abdd66619e
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1482061
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-25 18:39:00 +02:00
Sébastien Han 972eb45d31 ceph-docker-common: apply 0600 to key permissions
Keys should only be readable and writable by their respective owners and that's all.

Closes: https://github.com/ceph/ceph-ansible/issues/1760
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-25 18:14:28 +02:00
Boris Ranto 5f1b8fcd75 ceph-osd: Fix osd start sequence
The script can fail to get the osd id because the osds are activated by
udev and it can take a while for them to activate. This commit fixes
that by trying to get all the osds per node in a loop.

This commit also makes the osd services enabled so that they are
available after reboot.

Signed-off-by: Boris Ranto <branto@redhat.com>
2017-08-25 13:40:04 +02:00
Sébastien Han 1f4082f200 update meta for ansible galaxy
Closes: https://github.com/ceph/ceph-ansible/issues/1637
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-25 00:05:44 +02:00
Sébastien Han aee8267be4 Merge pull request #1808 from ceph/role-path
ceph-mon: detect ANSIBLE_ROLES_PATH if present
2017-08-24 23:49:41 +02:00
Andrew Schoen 910bb036c6 ceph-config: when using local_action set become: false
There should be no need to use sudo when writing or using these files.
It creates an issue when the user running ansible-playbook does not
have sudo privs.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-24 10:07:03 -05:00
Sébastien Han 76ac9b077b ceph-mon: detect ANSIBLE_ROLES_PATH if present
Some deployments can't copy infrastructure playbooks outside of the
infrastructure-playbooks directory. Thus they use ANSIBLE_ROLES_PATH to
overcome this. However some roles have 'playbook_dir' hardcoded, which
results in wrong path since the execution comes from
infrastructure-playbooks. Basically the role triggered by a playbook
from infrastructure-playbooks believes that the roles are in
infrastructure-playbooks/roles. This commit fixes that.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-24 16:19:39 +02:00
Andrew Schoen d0a3034857 ceph-config: write ceph_conf_overrides_temp to fetch_directory
because /tmp is not always writable, but we can assume that the
fetch_directory will be

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-24 11:33:03 +02:00
Sébastien Han 80dc5eead7 ceph-config: add missing meta and files for the galaxy
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-24 11:33:03 +02:00
Guillaume Abrioux 539197a2fc Introduce new role ceph-config.
This will give us more flexibility and the possibility to deploy a client node
for an external ceph-cluster.

related BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1469426

Fixes: #1670

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-24 11:33:03 +02:00
Sébastien Han 6d894e556c ceph-mon: remove hardcoded ipv4 in containers
Before this commit we were forcing ipv4 which might not be available.
Now setting ip_version to ipv4 or ipv6 will give you the right support.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1484189
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-24 11:33:02 +02:00
Andrew Schoen 758c31b1cd ceph-osd: ceph-volume requires --data to be in vg/lv format
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-23 13:43:31 -05:00
Alfredo Deza e651469a2a Merge pull request #1797 from ceph/purge-lvm
adds purge support for the lvm_osds osd scenario
2017-08-23 14:28:29 -04:00
Sébastien Han f2499ff5ac Merge pull request #1788 from ceph/improve-switch
switch-from-non-containerized-to-containerized: simplify
2017-08-23 19:47:26 +02:00
Sébastien Han 4f0ecb7f30 switch-from-non-containerized-to-containerized: simplify
This commit eases the use of the
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml
playbook. We basically run it with a couple of pre-tasks and then we let
the playbook run the docker roles.

It obviously expect to have proper variables configured in order to
work.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-23 18:39:45 +02:00
Andrew Schoen 594d5e017a ceph-osd: restructure lvm_volumes variable for more flexiblity
The lvm_volumes variable is now a list of dictionaries that represent
each OSD you'd like to deploy using ceph-volume. Each dictionary must
have the following keys: data, journal and data_vg. Each dictionary also
can optionaly provide a journal_vg key.

The 'data' key represents the lv name used for the OSD and the 'data_vg'
key is the vg name that the given lv resides on. The 'journal' key is
either an lv, device or partition. The 'journal_vg' key is optional and
must be the vg name for the journal lv if given. This key is mainly used
for purging of the journal lv if purge-cluster.yml is run.

For example:

  lvm_volumes:
    - data: data_lv1
      journal: journal_lv1
      data_vg: vg1
      journal_vg: vg2
    - data: data_lv2
      journal: /dev/sdc
      data_vg: vg1

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-23 10:14:14 -05:00
Sébastien Han d9b3d4a981 Merge pull request #1731 from SirishaGuduru/rgw-civetwebIP-conf
Common: changed civetweb line in rgw section(conf)
2017-08-23 15:33:08 +02:00
Sébastien Han e0c43ccc53 Merge pull request #1784 from ceph/fix-restart-osd-container
ceph-defaults: fix handler for osd container
2017-08-23 12:40:01 +02:00
SirishaGuduru 1359869497 Common: changed civetweb line in rgw section(conf)
Resolves issue: Multiple RGW Ceph.conf Issue #1258

In multi-RGW setup, in ceph.conf the RGW sections
contain identical bind IP in civetweb line. So this
modification fixes that issue and puts the right IP
for each RGW.

Signed-off-by: SirishaGuduru SGuduru@walmartlabs.com

Modified ceph-defaults and ran generate_group_vars_sample.sh

group_vars/osds.yml.sample and group_vars/rhcs.yml.sample are
not part of the changes. But they got modified when
generate_group_vars_sample.sh is ran to generate group_vars/
all.yml.sample.

Uncommented added variables in ceph-defaults

Updated tests by adding value for radosgw_interface

Added radosgw_interface to centos cluster tests

Modified ceph-rgw role,rebased and ran generate_group_vars_sample.sh

In ceph-rgw role removed check_mandatory_vars.yml.
Rebased on master.
Ran generate_group_vars_sample.sh and then the below files got
modified.
2017-08-23 15:03:37 +05:30
Jason Dillaman b70d54ac80 rbd-mirror should use per-host user id keyring
The rbd-mirror daemon will be HA under luminous and new daemon health
features require a way to uniquely identify rbd-mirror instances.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-08-22 18:55:29 -04:00
Jason Dillaman 70c2b934ca distribute rbd bootstrap key if available
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-08-22 18:55:29 -04:00
Sébastien Han 07821d9bb1 Merge pull request #1786 from ceph/re-arrange-skipped
mon, osd: fix skipped condition
2017-08-22 19:44:48 +02:00
Sébastien Han a359fc35b4 mon, osd: fix skipped condition
To be properly evaluated the "skipped" conditions must always have the
first place on the list of condition, otherwise the other conditions are
evaluated before and make the task fail.

Closes: https://github.com/ceph/ceph-ansible/issues/1733
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-22 18:34:51 +02:00
Yoann Moulin a7e4562297 fix radosgw-admin call with another cluster name than "ceph" 2017-08-22 16:57:12 +02:00
Sébastien Han 38d575ce55 Merge pull request #1654 from andymcc/master
Allow ceph-mon systemd overrides to be specified
2017-08-22 15:32:39 +02:00
Sébastien Han abdd66619e ceph-defaults: fix handler for osd container
Problem: task "check for a ceph socket in containerized deployment" will
be skipped if we are not an OSD.

with_items are still evaluated before when conditions so if the task was
skipped the dict will be empty and then fail.
Adding a "not skipped" condition skips the execution of the task.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1482061
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-22 11:56:05 +02:00
Sébastien Han 19ae8b42e6 resync group_vars files
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-22 11:31:49 +02:00
Sébastien Han b8af5fc5a0 Merge pull request #1695 from fullerdj/wip-djf-docker-multimds
ceph-mds: Enable multimds under docker
2017-08-21 10:23:21 +02:00
Guillaume Abrioux e0e9bb33b1 common: install ceph-common on all nodes
This commits force ceph-common to be installed early in deployment on
nodes.

For instance, ceph-rbdmirror doesn't have the CLI installed while it is
needed for some tasks which uses it to set some facts.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-17 14:44:38 +02:00
Andy McCrae 4671b9e74e Allow ceph service systemd overrides to be specified
ceph services can fail to start under certain circumstances (for
example, when running in a container) because the default systemd
service configuration causes namespace issues.

To work around this we can override the system service settings by
placing an overrides file in the ceph-<service>@.service.d directory.
This can be generic so as to allow any potential changes required to
the ceph-<service> service files.

The overrides file is only setup when the
"ceph_<service>_systemd_overrides" config_template override variable is
specified.

The available service systemd override files are as follows:
ceph_mds_systemd_overrides
ceph_mgr_systemd_overrides
ceph_mon_systemd_overrides
ceph_osd_systemd_overrides
ceph_rbd_mirror_systemd_overrides
ceph_rgw_systemd_overrides
2017-08-16 17:57:06 +01:00
John Fulton c04559181e Set the permissions mode on all of the OpenStack keys
The original fix to issue #1755 only set the permissions on
the monitors to which the key was copied, but not the original
monitor where the key was created. Thus, we use a separate task
to set the permission of the key.
2017-08-10 13:50:08 -04:00
John Fulton 7d42941090 Allow user to specify the mode of the openstack keys
The openstack_keys structure now supports a key called mode
whose value is a string that one could pass to chmod to set
the mode of the key file. The ansible file module applies the
mode to all openstack keys with this property.

Fixes: #1755
2017-08-10 15:34:39 +00:00
Andrew Schoen 30f9b0e075 ceph-common: render ceph_conf_overrides into fetch_directory
Writing into /tmp is not always allowed, but we can assume the
fetch_directory is writable.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 12:19:12 -05:00
Douglas Fuller aab3318802 ceph-mds: Enable multimds under docker
This is under the MDS role instead of the mon role because that role
does not create the filesystem under docker.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-08-04 10:46:11 -04:00
Andrew Schoen be78bc1a90 ceph-defaults: fix containerized osd restarts
This needs to check `containerized_deployment` because
socket_osd_container is undefined otherwise.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:38:38 -05:00
Andrew Schoen d1c7ec81c1 ceph-common: move release-rhs.yml after ceph_version is set
These tasks needs to be run after we set ceph_version or
they fail because it's undefined.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:38:37 -05:00
Andrew Schoen 1d5f876729 ceph-osd: devices is not required when osd_scenario == lvm
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:38:37 -05:00
Andrew Schoen e597628be9 lvm: update scenario for new osd_scenario variable
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:38:36 -05:00
Andrew Schoen 3b5a06bb3c lvm-osds: reorder mandatory vars checks
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:13:10 -05:00
Andrew Schoen 96c92a154e lvm-osds: check for osd_objectstore == 'filestore'
ceph-volume currently only has support for filestore, not bluestore

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:13:10 -05:00
Andrew Schoen 61d63f8468 lvm-osds: make task name and files consistent
Removes capitilization and newlines to keep these files consistent in
style with the existing tasks.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:13:10 -05:00
Andrew Schoen 63b7e3d36c lvm_osds: ensure osd daemons are started
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:13:09 -05:00
Andrew Schoen b93794bed4 adds a new 'lvm_osds' osd scenario
This scenario will create OSDs using ceph-volume and is only available
in ceph releases greater than Luminous.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 06:13:09 -05:00
Sébastien Han e6a5c3b815 Merge pull request #1734 from ceph/debian-repo
common: automate setting up online repositories for ceph deployments …
2017-08-03 22:45:31 +02:00
Sébastien Han 7559a2deff common: automate setting up online repositories for ceph deployments on debian nodes
This commits automates the process of setting up online repositories for
Red Hat Ceph Storage on Debian nodes. The manual steps are currently
described here:
https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/installation_guide_for_ubuntu/prerequisites#online_repositories

If you are an RHCS customer and run a Debian based system you can now
access package through the Red Hat CDN.
For this set: ceph_rhcs and ceph_rhcs_cdn_install to true. Then set your
customer credentials in ceph_rhcs_cdn_debian_repo. Replace
customername:customerpasswd with your details.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1434175
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-03 17:15:07 +02:00
Andrew Schoen d2f4d3666f Merge pull request #1725 from ceph/simplify-osd-scenario
osd: simply osd scenario declaration
2017-08-03 09:31:57 -05:00
Sébastien Han af1e4d16d2 common: override and autodetect ceph_stable_release
For ceph_dev and rhcs installation we need to detect the release since
we do not declare it explicitly. Keeping the default ceph_stable_release
could lead to several things going wrong and some have already been
reported.

Fixes: https://github.com/ceph/ceph-ansible/issues/1712 and
https://bugzilla.redhat.com/show_bug.cgi?id=1476210
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-08-03 14:13:31 +02: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
Guillaume Abrioux 608bad901d docker-common: Fix bug when updating config
in containerized deployment, if you try to update your `ceph.conf` file
it won't be actually updated on your nodes because it is overwritten by
the copy of the file which is present in your fetch directory.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-02 17:12:20 +02:00
Guillaume Abrioux 7a333d05ce Add handlers for containerized deployment
Until now, there is no handlers for containerized deployments.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-02 17:12:20 +02:00
Guillaume Abrioux fc6b6e9859 Move basics facts to `ceph-defaults`
Move `fsid`,`monitor_name`,`docker_exec_cmd` and `ceph_release` set_fact
to `ceph-defaults` role.
It will allow to reuse these facts without having to play `ceph-common`
or `ceph-docker-common`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-02 17:12:20 +02:00
Guillaume Abrioux 5adbf0fdaa Move role dependencies in site.yml/site-docker.yml
This will give us more flexibility and avoid a lot of useless when
skipping all tasks from a non-desired role.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-02 17:12:14 +02:00
Guillaume Abrioux 7322526838 Add new role `ceph-defaults`
Add a new role `ceph-defaults`.
This role aims to handle all defaults vars for `ceph-docker-common` and
`ceph-common` and set basic facts (eg. `fsid`)

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-02 14:46:57 +02:00
Guillaume Abrioux 1d003aa887 merge docker-common and common defaults vars
Merge `ceph-docker-common` and `ceph-common` defaults vars in
`ceph-defaults` role.
Remove redundant variables declaration in `ceph-mon` and `ceph-osd` roles.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-08-02 14:46:51 +02:00
Sébastien Han 511750f31e Merge pull request #1018 from ceph/profile-examples
profiles: introducing cluster profiles
2017-07-28 15:38:06 +02:00
Sébastien Han 050807471a Merge pull request #1723 from ceph/mount-skip
osd: fail check mount partition if not skipped
2017-07-28 14:39:33 +02:00
Sébastien Han 078e5f8e64 Merge pull request #1713 from ceph/ceph-stable
common: make ceph_stable_release mandatory
2017-07-27 17:23:20 +02:00
Sébastien Han 26f4752bc4 common: only add a daemon section if we run on the host
We don't want to have heterogeous ceph.conf anymore and believe that we
should have the right section for the running daemon.
If we don't do this and use profiles, e.g: rgw, we will get a new rgw
section on some of the nodes.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-27 16:34:17 +02:00
Sébastien Han af431a0802 Merge pull request #1596 from czunker/restart_with_crush_location
Restart OSDs during initial setup when crush location is used
2017-07-27 14:22:45 +02:00
Sébastien Han 63cbcc8260 osd: fail check mount partition if not skipped
We forgot to handle the case where "check if any of the raw partitions
are mounted" task gets skipped.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-27 11:39:19 +02:00
Sébastien Han da4cce2c74 common: make ceph_stable_release mandatory
It is mandatory now to set the Ceph version you want to install, e.g:
ceph_stable_release: luminous

To find the release names, you can look at the release not doc:
http://docs.ceph.com/docs/master/release-notes/

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-27 09:49:21 +02:00
Sébastien Han 8ac7d2e4c9 osd: do not enable osd@id unit file
ceph-disk is responsable for enabling the unit file if needed. Actually
since https://github.com/ceph/ceph/pull/12241 it seems that it's not
even needed. On an event of a restart, udev rules will be trigger and
they will ceph-disk activate the device too so the 'enabled' is not
needed.

Closes: https://github.com/ceph/ceph-ansible/issues/1142
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-26 17:17:57 +02:00
Christian Zunker 381600a092 Restart OSDs during initial setup when crush location is used
OSDs get started by ceph-disk before the ceph.conf file is written
with a crush location. That results in a crush map without configured
crush location.

To prevent this, we have to restart the OSDs during the initial setup
after the crush location was added to the ceph.conf file.
2017-07-25 12:06:12 +02:00
Guillaume Abrioux cfd7ae87e4 Merge pull request #1707 from ceph/admin-ker-perms
mon: add mgr cap to admin key
2017-07-24 17:06:59 +02:00
Sébastien Han 2566db3e7c mon: add mgr cap to admin key
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-24 16:00:06 +02:00
Sébastien Han afa29889c1 ceph-docker-common: update etcd kv port
New registered port is 2379

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-24 15:40:44 +02:00
Sébastien Han 33c1f0cb03 osd: refactor osd scenarios
We have multiple issues with ceph-disk's cli with bluestore and Ceph
releases. This is mainly due to cli changes with Luminous. Luminous
introduced a --bluestore and --filestore options which respectively does
not exist on releases older than Luminous. The default store being
bluestore on Luminous, simply checking for the store is not enough so we
have to build a specific command line for ceph-disk depending on the
Ceph version we are running and the desired osd_store.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-24 13:48:08 +02:00
John Fulton 73633f05a0 Allow user to define ACLs for OpenStack keys
The keys and openstack_keys structure now supports an optional
key called acls whose value is a list of strings one could pass
to setfacl. The ansible ACL module applies the ACLs to all
openstack keys with this property.

Fixes: #1688
2017-07-20 13:20:16 +00:00
Guillaume Abrioux 07fb79ce13 Mon: Copy openstack keyring files on all mons
Copies all created openstack keys on all mons.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-19 16:28:18 +00:00
Guillaume Abrioux 233696d1b1 Common: Add profiles
Remove `rgw enable static website` and `rgw enable usage log` from
ceph.conf and make it usable with ceph_config_overrides as profiles.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-19 11:50:03 +02:00
Guillaume Abrioux 894df4b8c8 Common: Avoid duplicate section in ceph.conf
See:
 - https://github.com/ceph/ceph-ansible/pull/1018#issuecomment-253491094
 - https://github.com/ceph/ceph-ansible/pull/1018#issuecomment-260276588

The workaround here is rendering `ceph_conf_overrides` before passing it
to `config_template` to be sure we won't have a section added twice in
ceph.conf

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-19 11:50:03 +02:00
Sébastien Han fcba2c801a profiles: introducing cluster profiles
This commit introduces a new directory called "profiles" which
contains some set of variables for a particular use case. These profiles
provide guidance for certain scenarios such as:

* configuring rgw with keystone v3

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-19 11:50:03 +02:00
Alfredo Deza 92fc34eb9f Merge pull request #1693 from batrick/debian-obsolete-key
remove obsolete debian devel repo key
2017-07-18 15:08:33 -04:00
Patrick Donnelly 8800a23c38
remove obsolete debian devel repo key
According to Alfredo, this was used for gitbuilders. Right now shaman/chacra
dev repos are unsigned.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-07-18 08:47:47 -07:00
Guillaume Abrioux 151d59db4e Mon: Create rbd pool on luminous
There is no more an rbd pool that comes with luminous.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-18 01:01:53 +02:00
Guillaume Abrioux 14d2d08340 Docker-common: Make `fsid` available for all roles.
Move condition at task level and not at include level to make `fsid`
variable available for all roles.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-17 21:11:01 +02:00
Guillaume Abrioux d11975800c Common: change path for fetch_directory
Some tasks fetch file to `{{ fetch_directory }}/docker_mon_files` and
then try to copy from `{{ fetch_directory }}/{{ fsid }}`. That causes
the playbook to fail.

Fixes: #1683

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-17 21:11:01 +02:00
Guillaume Abrioux d0311c6aa3 Client: keep consistency between `openstack_key` and `keys`
To keep consistency between `{{ openstack_keys }}` and `{{ keys }}`
respectively in `ceph-mon` and `ceph-client` roles.
This commit also add the possibility to set mds caps.

Fixes: #1680

Co-Authored-by: John Fulton <johfulto@redhat.com>
Co-Authored-by: Giulio Fidente <gfidente@redhat.com>
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-17 21:11:01 +02:00
yanyx 7e56b5c531 ceph-osd: when ceph relase >= luminous add --filestore config 2017-07-14 09:53:59 +08:00
Andrew Schoen 4e87c1f0f5 ceph-common: make sure monitor_interface or monitor_address is defined
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-07-12 16:34:41 +02:00
Andrew Schoen a9a3d24a3d ceph-common: fixes bug related to monitor_interface set in inventory
The ceph.conf template needs to look for the value of monitor_interface
in hostvars[host] because there might be different values set per host.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-07-12 16:34:41 +02:00
Guillaume Abrioux 30a0fa31e3 Docker: Fix bug "waiting for /dev/XXX to show up"
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-12 15:02:39 +02:00
Guillaume Abrioux 0a38bfaadc Osd: Fix bug 'uniq' command not found
Due to a breaking space introduced by d2320e412e the command here is
broken.

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
Guillaume Abrioux a517ab5583 Osd: Force filestore and bluestore usage
In Luminous, ceph-disk defaults to bluestore so all our scenarios are
using bluestore, we need to force testing both.

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-12 11:30:30 +02:00
Sébastien Han f678b11d3d Merge pull request #1663 from ceph/add_docker_custom_admin_secret
Doc: containerized deploy with custom admin secret
2017-07-07 16:46:03 +02:00
Guillaume Abrioux da755cb317 Doc: containerized deploy with custom admin secret
In addition to ceph/ceph-docker@69d9aa6, this explains how to deploy a
containerized cluster with a custom admin secret.
Basically, just need to pass the `admin_secret` defined in your
`group_vars/all.yml` to the `ceph_mon_docker_extra_env` variable.

Eg:

`ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }}
-e MON_NAME={{ monitor_name }} -e ADMIN_SECRET={{ admin_secret }}`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-07 16:29:56 +02:00
Sébastien Han 0f1f4388da Merge pull request #1644 from fullerdj/wip-djf-check-devices
osd: validate devices variable input
2017-07-07 15:48:39 +02:00
Sébastien Han 5245473b3c Merge pull request #1662 from fullerdj/wip-djf-install-rsync
common: ensure rsync is installed for local install
2017-07-07 15:46:22 +02:00
Douglas Fuller e5d06a449f osd: validate devices variable input
Fail with a sane message if the devices or raw_journal_devices variables
are strings instead of lists during manual device assignment.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-07-07 13:37:29 +00:00
Douglas Fuller 79ba50cd9f common: ensure rsync is installed for local install
rsync is required by the ansible synchronize package. Ensure
it is installed when local installation is selected.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-07-06 17:29:43 +00:00
Sébastien Han 035846217e Merge pull request #1627 from ceph/ceph-osd-prepare-script
osd: docker, refactor ceph-osd-run.sh.j2
2017-07-06 16:08:59 +02:00
Sébastien Han d2320e412e osd: docker, refactor ceph-osd-run.sh.j2
Easier to read and enhance.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-06 15:49:14 +02:00
Guillaume Abrioux 7e1df484db Mon: Allow to deploy with custom admin secret
Add a new parameter `admin_secret` that allow to deploy a ceph cluster
with a custom admin secret.

Fix: #1630

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-05 14:57:49 +02:00
Sébastien Han e7ae65b6f9 Merge pull request #1632 from ceph/bluestore-redundant-options
osd: remove redundant options to enable bluestore
2017-07-04 19:33:54 +02:00
Sébastien Han 7d657ac643 osd: ability to set db and wal to bluestore
This commits refactors how we deploy bluestore. We have existing
scenarios that we don't want to change too much. This commits eases the
user experience by now changing the way you use scenarios. Bluestore is
just a different interface to store objects but the scenarios more or
less remain the same.

If you set osd_objectstore == 'bluestore' along with
journal_collocation: true, you will get an OSD running bluestore with DB
and WAL partitions on the same device.

If you set osd_objectstore == 'bluestore' along with
raw_multi_journal: true, you will get an OSD running bluestore with a
dedicated drive for the rocksdb DB, then the remaining
drives (used with 'devices') will have WAL and DATA collocated.

If you set osd_objectstore == 'bluestore' along with
raw_multi_journal: true and declare bluestore_wal_devices you will get
an OSD running bluestore with a dedicated drive for rocksdb db, a
dedicated drive partition for rocksdb WAL and a dedicated drive for
DATA.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-04 19:07:16 +02:00
Sébastien Han adf752f241 Merge pull request #1597 from czunker/openstack_pools_with_rule
Create OpenStack pools with crush rule
2017-07-04 18:34:00 +02:00
Sébastien Han fc0e54c59e osd: remove redundant options to enable bluestore
There is no need for 2 variables to enable bluestore, prior to this
patch one had to do the following to activate bluestore:

osd_objectstore: bluestore
bluestore: true

Now you just need to set `osd_objectstore: bluestore`.

Fixes: https://github.com/ceph/ceph-ansible/issues/1475
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-07-04 18:22:03 +02:00
Guillaume Abrioux 896d62d78b Refact: remove ceph_mon_docker_interface variable
remove `ceph_mon_docker_interface` and use `monitor_interface` instead
for both containerized and non-containerized deployment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-04 18:08:59 +02:00
Guillaume Abrioux f16037fac5 Common: monitor_address_block is always defined
monitor_address_block is always defined.
We need to check for true or false instead.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-04 17:50:30 +02:00
Guillaume Abrioux a951b7f957 Docker-common: Add missing variables declaration
Some variables are missing from ceph-docker-common role since the
include of check_mandatory_vars.yml has been re-added in the ceph-mon
role.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-04 17:50:23 +02:00