Commit Graph

104 Commits (f27fada28a823fc9bc55629138edf2b9d89db521)

Author SHA1 Message Date
Sébastien Han 225e066db2 ceph-osd: add support for bluestore
With Jewel comes a new store to store Ceph object: BlueStore. Adding an
extra scenario might seem like a useless duplication however the
ultimate goal is remove the other roles later. Thus this is easier to
add new role instead of modifying existing one. Once we drop the support
for release older than Jewel we will just remove all the previous
  scenario files.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-25 16:02:02 +01:00
Sébastien Han b0f56590e0 docker: fix tons of issues
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-24 17:55:21 +01:00
Jim Curtis b06229bafb review feedback 2016-03-24 16:19:55 +01:00
Jim Curtis dae1bb072e Review feedback fixes from PR #518 2016-03-24 16:19:45 +01:00
Jim Curtis d5f642c206 Changes to allow ceph-ansible and vagrant to work on Openstack VMs 2016-03-24 16:18:46 +01:00
Huamin Chen 3b73b8f2d4 add missing osd systemd unit template
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen 04f7b5923f review feedback
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen 326db629a0 start osd daemon via systemd if supported
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen 6cf3fff436 split osd disk to prepare and activate
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen 0647cad7be containerized mon 2016-03-24 16:08:20 +01:00
Leseb e78826eefb Merge pull request #609 from ceph/fragment
fix fragment for osd directory scenario
2016-03-23 10:32:18 +01:00
Leseb 20c3c88995 Merge pull request #639 from ceph/enhance-regex
ceph-osd: fix regex to check partitions
2016-03-21 18:22:00 +01:00
Sébastien Han 488f8e6c63 ceph-osd: fix regex to check partitions
Thanks @dvusboy

closes: #636

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-21 16:27:02 +01:00
Sébastien Han c9071a6af0 ceph-osd: fix activate for osd on partitions
Since we want to activate the OSD when it's a partition we are looking
for a return code that is equal to 0 which means the device is a
  partition.

closes: #636

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-21 16:00:58 +01:00
Deepak C Shetty 2b908ed8cf ceph-osd: Set selinux to permissive
Currently we don't yet support runnings OSDs w/ selinux in
enforcing mode. Thus its better to ensure that ceph-ansible
explicitly makes selinux permissive. This should help in
scenarios such as hyperconverged where OSDs are colocated
with VMs on compute nodes which needs selinux enforcing, but
OSDs don't.

Signed-off-by: Deepak C Shetty <deepakcs@redhat.com>
2016-03-16 07:30:37 +00:00
Sébastien Han 6439396127 ceph-osd: fragment directory and files perms
works for all the ceph's distros now

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-08 14:32:32 +01:00
Sébastien Han 9363665019 fix fragment for osd directory scenario
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-08 00:40:50 +01:00
Derek Anderson 210e4d4a01 Added an additional task for starting/enabling a service based on a systemd target if systemd is available. Otherwise using the init script. 2016-03-07 18:04:39 -05:00
Sébastien Han d2359c1445 wip: galaxy roles dependencies
in order to have a build on the galaxy we need to have a proper
dependency set for ceph-common. On the galaxy ceph-common does not
exist, only ceph.ceph-common is available.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-02 13:52:56 +01:00
Leseb 40c61f5431 Merge pull request #580 from stpierre/generate-group-vars-sample
Generate all.sample automagically
2016-03-01 19:00:19 +01:00
Leseb 9bd561fa86 Merge pull request #563 from stpierre/dont-prepare-skipped-disks
Do not prepare skipped disks
2016-03-01 18:28:49 +01:00
Chris St. Pierre c4a9b1020f Generate group_vars samples automagically
This adds a script, generate_group_vars_sample.sh, that generates
group_vars/*.sample from roles/ceph-*/defaults/main.yml to avoid
discrepancies between the sets of files. It also converts the line
endings in the various main.yml from DOS to Unix, since generating the
samples was spreading the line ending plague around to more files.
2016-02-29 12:07:01 -06:00
Sébastien Han 51e4fe8e0b ceph-: update group_vars to reflect previous change
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 15:10:34 +01:00
Sébastien Han bb55860a7a ceph-: abitlity to copy admin on all the nodes
This commit allows you to set a new variable to 'true' if you want to
have ceph admin key copied over different kind of hosts such as MDS,
OSD, RGW. To enable this just set `copy_admin_key` to true.

Closes: #555

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-25 12:04:17 +01:00
Chris St. Pierre 49ad647f25 Fix activation of disks with auto discovery
With osd_auto_discovery enabled, the 'devices' list isn't
meaningful. We should activate ansible_devices instead.
2016-02-24 16:09:34 -06:00
Chris St. Pierre 8dcc802976 Do not prepare skipped disks
When autodiscovering disks, disks can be skipped if either they are
removable, or if they have partitions on them. Skipped actions have no
'rc' attribute, though, so the 'ceph prepare' conditional fails unless
we first check to ensure that the results were not skipped before
checking the return value.
2016-02-24 14:50:37 -06:00
Sébastien Han 3ce0621b44 ceph-osd: use fact logic to set permissions
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-21 18:27:36 +01:00
Sébastien Han 17fb38294e Octal file permissions must contain leading zero
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-21 18:21:19 +01:00
Sébastien Han 59b96e9f11 ceph-osd: fix the autodiscovery osd scenario
the parted command wasn't getting the devices properly and the partition
count is not necessary.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-13 23:07:44 +01:00
Sébastien Han 64c458bfcf ceph-osd: fix register variable
as stated in https://github.com/ansible/ansible/issues/4297
if we register a variable twice and even if a task is skipped the
  register will not get overwritten... So we use the fact variant as
  mentionned in the ansible issue.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-12 00:54:09 +01:00
Sébastien Han b285a5ae8f ceph-osd: simply the regex to check the device
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 22:51:23 +01:00
Sébastien Han ea0979cbbe ceph-osd: fix the auto discovery scenario
While this is not widly used (AFAIK :p) the feature was broken. Thanks
to @zmc for reporting it. You can now set `osd_auto_discovery` to
true in your group_vars/osd and it will go through all the devices
available and will make them OSDs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 22:43:09 +01:00
Sébastien Han a3cc055e61 ceph-osd: docker: fix type
use ceph_osd_docker_devices and not ceph_osd_docker_device

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 17:57:10 +01:00
Sébastien Han fa610cabf7 ceph-ansible: allow to run containerized daemons
run containerized daemons in virtual machines.
to enable it simply do:

`cp site-docker.yml.sample site-docker.yml`

and set `docker: true` in `vagrant_variables.yml`

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-07 22:30:32 +01:00
Leseb d050179121 Merge pull request #512 from guits/quick_fix
Refact code using `set_fact` to handle 'legacy' versions
2016-02-05 16:41:35 +01:00
Guillaume Abrioux dcec63adc8 Refact code using `set_fact`
At the moment, all the tasks using the file module are duplicated to have differents ownerships depending on the fact `is_ceph_infernalis`.
The goal of this commit is to have a new logic for this:
- First set facts depending on the `is_ceph_infernalis` fact
- Create the files or directories using the setted facts as ownerships.
2016-02-05 16:14:01 +01:00
Sébastien Han c0a3837d6e ceph-common: replace 'sudo' by 'become'
to avoid warning from ansible v2. works for both `1.9.4` and `2.0.0.2`.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-04 12:36:46 +01:00
Sébastien Han 17bc64e1ea use dnf when yum is not available
fixes the `importError: No module named yum` see here:
https://jenkins.ceph.com/job/ceph-ansible-pull-requests/45/console

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-28 19:11:22 +01:00
Sébastien Han f35a665634 Fix pip package name on debian
use python-pip and not pip

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-28 15:55:53 +01:00
Huamin Chen 63bd78c12a review feedback: convert to yml format
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-13 14:13:30 +00:00
Huamin Chen 519a9e91b1 make systemd enable work for osd instance
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-13 00:40:56 +00:00
Sébastien Han e6a9727478 Support infernalis for rh storage
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-15 22:07:45 +01:00
Eric Cook 46af3496d4 Add ceph_stable_releases array to ceph-common/defaults/main.yml
rework the various `when' tests to use that array.
2015-12-09 15:52:23 -05:00
Eric Cook ab884c7cb2 fixes ceph_stable_release logic mentioned in issue #446
I changed the argument used for starting the mds server. (pre
infernalis)
```
service ceph start mds
```
errors, while
```
service ceph start mds.$hostname
```
correctly starts the service.

I changed the mds directory ownership from ceph:cephh to root:root
again, for pre-infernalis.

And finally, add the ceph_stable_releases checks for the upstart
activation task `for or after infernalis release'.
2015-12-04 17:36:24 -05:00
Leseb 0e6f509876 Merge pull request #440 from eikef/master
Add systemd-specific start/restart tasks/handlers for el7/infernalis
2015-11-24 14:20:54 +01:00
Sébastien Han d60f5fddd0 Check partition status
Verify that partitions (for both osd disks and journal disks) are sane
before attempting to prepare the device. Fail if parted fails for
whatever reason.

Closes: #437

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-23 16:20:08 +01:00
Eike Frost d49e8bd904 Add systemd-specific start/restart tasks/handlers for el7/infernalis 2015-11-20 22:34:29 +01:00
Sébastien Han 2fa995a889 Use new Infernalis release
Add proper fixes for the new ceph user and dir/files permissions

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-18 11:47:38 +01:00
Sébastien Han fcfac5c1e1 Install pip before using it
Fixes: #430

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-16 11:47:23 +01:00
Huamin Chen 860125ff8f various fixes for CentOS
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-11-05 20:39:03 +00:00