Commit Graph

307 Commits (c80ba7a307237a44d29990da8e730605bc811685)

Author SHA1 Message Date
Daniel Marks ba0f16f485 Better --check compatibility for ceph-osd role
Carefully chosen "always_run: true" parameters for read-only tasks that
register variables. This enables --check runs (at least on deployed
clusters).
2016-11-27 15:00:10 +01:00
Sébastien Han 829e2b6598 Merge pull request #1077 from font/rolling_update
Support containerized rolling update
2016-11-22 16:56:46 +01:00
Ivan Font 92ffc5307d Fix error caused by missing OSD cluster keyring
Ansible task was not properly fetching OSD cluster keyring causing
the keyring to be missing when we needed to authenticate. Similarly, we
were not properly waiting on the OSD keyring to be available before
continuing.

Signed-off-by: Ivan Font <ifont@redhat.com>
2016-11-17 23:03:11 -08:00
Ivan Font 3ff17f1c8f Support containerized rolling update
- Update rolling update playbook to support containerized deployments
  for mons, osds, mdss, and rgws
- Skip checking if existing cluster is running when performing a rolling
  update
- Fixed bug where we were failing to start the mds container because it
  was missing the admin keyring. The admin keyring was missing because
  it was not being pushed from the mon host to the ansible host due to
  the keyring not being available before running the copy_configs.yml
  task include file. Now we forcefully wait for the admin keyring to be
  generated before continuing with the copy_configs.yml task include file
- Skip pre_requisite.yml when running on atomic host. This technically
  no longer requires specifying to skip tasks containing the with_pkg tag
- Add missing variables to all.docker.sample
- Misc. cleanup

Signed-off-by: Ivan Font <ifont@redhat.com>
2016-11-17 11:25:25 -08:00
Sébastien Han 81a72cb85d Merge pull request #1068 from ceph/v2.2
moving to ansible v2.2 compatibility
2016-11-16 16:33:40 +01:00
Sébastien Han a2fcd222d2 moving to ansible v2.2 compatibility
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Julien Francoz julien@francoz.net
2016-11-04 10:09:38 +01:00
Sébastien Han 32018f80a1 osd dmcrypt: add ability to check devices
Even for dmcrypt we need to check the "devices" status and
"raw_journal_devices" as well so we can fix them if there is something
wrong with them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-03 15:20:07 +01:00
Eduard Egorov 4895c2864e Make {{ raw_journal_devices }} list optional: define it as empty list by default, remove unneccessary 'default([])' checks
Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
2016-11-01 09:57:25 +00:00
Eduard Egorov f33c1cd2d2 Make {{ devices }} list optional: define it as empty list by default, remove unneccessary 'default([])' checks
Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
2016-11-01 09:57:25 +00:00
Leseb fb8167cf79 Merge pull request #1052 from verdurin/revert-1042-centos-extras-ini_file
Revert "Change enabling of extras repo for CentOS to use ini_file"
2016-10-31 16:31:51 +01:00
Andrew Schoen 4146edb3d2 raw_multi_journal is not required when using dmcrypt_dedicated_journal
Fixes: https://github.com/ceph/ceph-ansible/issues/1054

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: issue#1054
2016-10-28 11:12:55 -05:00
Adam Huffman 3b9f4f7de3 Revert "Change enabling of extras repo for CentOS to use ini_file" 2016-10-26 10:04:59 +02:00
Andrew Schoen 3b2bd02c14 ceph-osd: use ini_file instead of yum_repository to enable Centos extras
Fixes issue #1041

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: issue#1041
2016-10-25 14:16:42 -05:00
Adam Huffman 68bafc1fd0 Change enabling of extras repo for CentOS to use ini_file
Signed-off-by: Adam Huffman <bloch@verdurin.com>
2016-10-19 22:15:14 +01:00
Simon Weald 5973f67b7b fixed breakage on Debian under ansible v2.0 caused by #74d73d1e65b6720c0372c61aea7a627e4e571a3b 2016-10-19 12:36:49 +01:00
Adam Huffman 9de16e4d94 Ensure extras repo enabled for CentOS across different roles
Signed-off-by: Adam Huffman <bloch@verdurin.com>
2016-10-17 21:44:30 +01:00
Sébastien Han 9753e29bae osd: clarify osd scenarios
Co-Authored-By: Rachana Patel <racpatel@redhat.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-10-06 12:01:29 +02:00
Leseb bceb892a8e Merge pull request #1006 from ceph/fix-autodiscovery
osd: fix autodiscovery disk
2016-10-06 11:34:43 +02:00
Sébastien Han 860303c265 osd: fix autodiscovery disk
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Christoph Dwertmann
2016-10-06 11:12:23 +02:00
Musee Ullah 564a8486b0
Remove dupes in raw_journal_devices in a consistent manner 2016-10-05 14:36:41 -07:00
Leseb 45898739bb Merge pull request #994 from ceph/bz-1203603
fix non skipped task for ansible v1.9.x
2016-10-04 11:41:14 +02:00
Sébastien Han f162db1202 fix non skipped task for ansible v1.9.x
please refer to
https://bugzilla.redhat.com/show_bug.cgi?id=1376283

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-10-03 16:48:04 +02:00
James Saint-Rossy 982c44d41c Rebased with upstream master 2016-09-25 23:22:16 -04:00
Sébastien Han 381af6c18d ceph-osd: get full link path when testing if a partition
This allows us to test devices set with persistent naming such as
/dev/disk/by-*
When registering devices we can use persisent (/dev/disk/by-*) or
non-persistent (/dev/sd*). Both declarations are supported by
ceph-ansible. There was just two tasks that were not compatible with
this. Since we support using partitions directly we need to test that
because the device activation will be different. To test if the device
is a partition we use a regular expression which wasn't compatible with
the persistent device naming format (/dev/disk/by-*).

This commit solves this issue by reading the path of the symlink since
devices like /dev/disk/by-* are symlinks to devices like /dev/sd*

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-09-20 10:15:06 +02:00
James Saint-Rossy d4a60a9394 Added ceph_release generation and fixed missing whitespace in ceph_release checks 2016-09-09 18:16:41 -04:00
James Saint-Rossy 666637f715 Replaced is_before is_after is_ booleans with numerical version dictionary 2016-09-09 17:34:26 -04:00
Sébastien Han 708c43a04e docker: fix osd configuration
use the activation scenario instead of the full ceph_disk one, we
already have a task to prepare osds so we just need to activate the
device.

working for me using vagrant :)

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-24 09:05:14 +02:00
Sébastien Han f351329897 docker: use cluster name
Fix cluster name for docker scenario and other playbooks.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-24 09:04:49 +02:00
James Saint-Rossy 32f6ef7747 Merged with Upstream Master 2016-08-17 12:00:36 -04:00
James Saint-Rossy 35a26068ef Fixed quotes and removed combined_ prefix from variables that no longer need it 2016-08-16 17:49:30 -04:00
Daniel Gryniewicz 2fd9bbbe09 NFS for FSAL_RGW
Add support for FSAL_RGW to the NFS gateway.  Both standard and
containerized versions are supported.
2016-08-12 11:49:16 -04:00
Sébastien Han 673f54a100 osd: fix collocation spelling and declare dmcrypt variables
* changed s/colocation/collocation/
* declare dmcrypt variable in ceph-common so the variables check does
not fail

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-10 10:34:23 +02:00
James Saint-Rossy 5f61ff7867 ceph_devices.yml cleanup and optimization 2016-08-09 18:57:41 -04:00
Ivan Font 8c67689d08 Add option to enable ntp
This fixes #845 for containerized deployments. We now also mount the
/etc/localtime volume in the containers in order to synchronize the host
timezone with the container timezone.

Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-08-08 10:16:48 -07:00
Leseb f72d748bce Merge pull request #891 from ceph/dmcrypt
ceph-osd: add dmcrypt scenario
2016-08-08 16:27:34 +02:00
Sébastien Han 788b75efec ceph-osd: re-arrange osd scenario numbers
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-08 15:55:12 +02:00
Ivan Font 08e54d7722 Fix to check if cluster is running
Update each role's task to use the respective role's username, image
name, and image tag to check if a container is already running. This was
causing false failures because we were not matching any running
containers and subsequently running checks.yml to check the status of
cluster files being left behind.

Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-07-28 18:10:49 -07:00
Chengwei Yang 1bfab44aa9 sgdisk: remove duplicated option `-g`
Option `-g` of sgdisk is duplicated with `--mbrtogpt`, so lets remove it.

This fix #896

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
2016-07-26 08:55:43 +08:00
Sébastien Han 5978d55d22 ceph-osd: add dmcrypt scenario
add the ability to encrypt osd data store using dm-crypt

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-07-19 18:02:11 +02:00
pprokop a11eb03aae Fixing typos 2016-07-13 10:25:05 +02:00
pprokop 69cce9c135 Removing --rm flag from prepare osd 2016-07-13 10:22:17 +02:00
pprokop 41386c7bde Adding missing tag 2016-07-13 10:22:17 +02:00
pprokop 09d104f297 Fixing typos 2016-07-13 10:22:17 +02:00
pprokop 26688d10dc Removing creating symbolic links and fixing systemctl enable not working on CoreOS and migrating form docker module to shell in prepare image 2016-07-13 10:22:15 +02:00
pprokop 3950751317 Adding an option to choose an etcd port and tag of docker images 2016-07-13 10:19:50 +02:00
Ivan Font 6f5f6610a8 Support for docker image tags
Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-07-12 15:49:07 -07:00
Leseb ede7a2afd1 Merge pull request #874 from KGoreczny/docker_module_for_ansible_2_1_support
Fix docker deployment for Ansible 2.1
2016-07-12 15:36:07 +02:00
KGoreczny 11bed371ac remove trailing spaces
Signed-off-by: KGoreczny <krzysztof.goreczny@intel.com>
2016-07-12 14:50:56 +02:00
Leseb 55216e0a4d Merge pull request #880 from cdwertmann/patch-1
Use correct object names when zapping GPT header
2016-07-12 13:41:47 +02:00
Leseb f6daa79916 Merge pull request #873 from erikh/fixups
Container fixups
2016-07-12 13:37:20 +02:00
Christoph Dwertmann 8cfaa05743 Use correct object names when zapping GPT header 2016-07-12 21:11:38 +10:00
Erik Hollensbe 6b218a36d9 ceph-osd: fix an item propagation error while partitioning disks
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2016-07-12 03:57:11 -07:00
Austin Brown efeb63c577 ceph-osd: Use the use_systemd fact when start directory-scenario OSDs 2016-07-12 11:00:49 +09:00
KGoreczny 13e0b60cbe Fix for Ansible 2.1: install docker-py in version matched to ansible docker module
Signed-off-by: KGoreczny <krzysztof.goreczny@intel.com>
2016-07-11 11:35:32 +02:00
Sébastien Han a83e5d6b10 remove withspaces
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-07-07 16:17:49 +02:00
Daniel Gryniewicz 21166168e3 Add DNF for RedHat
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-06-23 10:24:14 -04:00
Leseb d9d1d7856e Merge pull request #812 from rootfs/fix
some fixes for container deployment
2016-06-09 15:33:32 +02:00
Leseb 58f9a6cfe0 Merge pull request #804 from dang/docker-dev
Allow running on local dev docker images
2016-06-06 11:12:43 +02:00
Daniel Gryniewicz 9d08d74385 Allow running on local dev docker images
Docker makes it difficult to use images that are not on signed
registries.  This is a problem for developers, who likely won't have
access to a registry with proper signed certificates.

This allows the ability to use any docker image on the machine running
vagrant/ansible.  The way it works is that the image in question is
exported locally, then sent to each target box and imported there.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-06-03 14:52:21 -04:00
Huamin Chen c4f9bf8d13 update osd default vars
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-03 16:42:22 +00:00
Huamin Chen 6b84f5475b fix containerized deployment on centos
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-03 15:24:00 +00:00
Alfredo Deza 2fa57b4cdb ceph-osd: do not ignore ceph-disk errors in raw multi journal
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: rhbz#1342117
2016-06-02 17:16:21 -04:00
Alfredo Deza d287959107 ceph-osd: do not ignore ceph-disk errors in journal_collocation
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: rhbz#1342117
2016-06-02 17:16:05 -04:00
Alfredo Deza 195ee33dcf ceph-osd: do not ignore ceph-disk errors in bluestore
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: rhbz#1342117
2016-06-02 17:15:35 -04:00
Sébastien Han c6232bed21 ceph-common: uniformize template path calls
In order to align all Ansible versions, we now use the full path for the
template. We rely on `role_path` variable. Now all the tasks using
the template module have a uniform syntax.

Might fix issue raised in #483

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-06-02 18:19:03 +02:00
Marcus Pamelia d694c59278 allow dash in cluster name 2016-05-29 09:20:46 +02:00
Huamin Chen a124078612 in containerized deployment, use the right interface name variable in mon; remove one line inline files
cleanup on docker osd tasks

Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-05-25 18:17:37 +00:00
Alfredo Deza 41bb446857 ceph-osd: fix typo when calling sgdisk second time around
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-05-19 14:46:43 -04:00
Alfredo Deza 52f73f30c5 ceph-osd: fail when ceph-disk fails to prepare an OSD
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-05-18 08:09:26 -04:00
Andrew Schoen d2b94c2a4c Do not create symlinks for systemd manually
Instead use 'systemctl enable' to create the symlinks.

This fixes: https://github.com/ceph/ceph-ansible/issues/779

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-13 13:21:08 -05:00
Leseb f748f8683c Merge pull request #749 from SamYaple/unified_when
Unify formatting of when conditional
2016-05-09 18:25:37 +02:00
Sam Yaple 069c93a238 Unify formatting of when conditional
This is purely a refactor. Converts when 'and' conditionals into lists
rather than multiline strings. This does not work for nested
conditionals, but those can be formated with indents.

Moves one line when statements onto the same line as the when command
itself.

A small logic bug was found in ceph-osd/tasks/check_devices.yml which
which was also fixed.

Signed-off-by: Sam Yaple <sam@yaple.net>
2016-05-09 14:08:33 +00:00
Alfredo Deza 2aea592b21 try to zap a device again if sgdisk fails on the first try
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-05-09 09:12:28 -04:00
Andrew Schoen 5669b6ba7c use the use_systemd fact when starting OSDs
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-05 13:59:36 -05:00
Leseb 27bbcd2161 Merge pull request #750 from ceph/osd-id-fix
Get the correct OSD ID when the cluster name includes numbers
2016-05-04 16:40:46 +02:00
Leseb 480cb68892 Merge pull request #755 from mattt416/fix_issue_741
Set init_system fact and reference in ceph-osd role
2016-05-04 16:39:41 +02:00
Matt Thompson ed2b7757d4 Set init_system fact and reference in ceph-osd role
The ceph-osd role currently uses ansible_service_mgr, which is a fact
only available on ansible 2.x and greater.  This commit sets a similar
fact called init_system which will store the contents of /proc/1/comm
(systemd, init, etc.) and then references it ceph-osd instead.

Closes #741
2016-05-04 12:05:31 +01:00
Ivo Jimenez 216ab2d776 Mounts /run when executing osd container 2016-05-03 15:47:01 -07:00
Andrew Schoen 4a181d420d Get the correct OSD ID when the cluster name includes numbers
If the ceph cluster name includes numbers, the grep used to find the OSD
IDs from /var/lib/ceph/osd/ would also return the numbers that were in
the cluster name.

For example, if the cluster was named 'mine123' and there was only one
OSD on the node, then the task that finds the OSD IDs would return
'123' and '0'.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-03 14:47:47 -05:00
Daniel Gryniewicz 256775cb0f Docker fixes and cleanups
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-05-02 10:56:52 -04:00
Leseb 4bfae5fc7a Merge pull request #733 from jimcurtis/master
docker: fixes for OpenStack VMs
2016-04-28 14:45:37 -05:00
Alfredo Deza 9d21a3c56c ceph-osd: port activate_osds task to use new ceph version facts
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-27 13:46:57 -04:00
Jim Curtis 6c9e3ab2a3 docker: typo in comment 2016-04-27 10:31:27 -07:00
Jim Curtis 78eb4f5c24 docker: fixes for OpenStack VMs 2016-04-26 08:20:02 -07:00
Leseb f3d98a64f9 Merge pull request #731 from ivotron/issue-730
bind-mounts /dev in osd containers
2016-04-25 14:56:52 -05:00
Ivo Jimenez 9ac9103e0d bind-mounts /dev in osd containers
This is needed in order to make ceph-disk work
2016-04-25 11:45:23 -05:00
Ivo Jimenez ea7a79c385 Modifies docker image variable being reference
These reference ceph_mon_docker_username instead of the corresponding
one
2016-04-24 14:32:17 -07:00
Huamin Chen 9d81f32538 set path to find mon and osd systemd unit file templates
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-04-14 21:57:27 +00:00
Leseb afad22c5a1 Merge pull request #708 from ceph/docker-img
docker: do not hardcode image and user name
2016-04-12 12:08:35 +02:00
Sébastien Han 7424ad6d68 docker: do not hardcode image and user name
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-04-12 12:01:53 +02:00
Alfredo Deza 441d83fe77 if ceph-disk fails to activate an OSD then bubble up the error
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-11 15:29:29 -04:00
Sébastien Han 4b93fc9dbd ceph-osd: docker fix typo again...
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-04-01 17:33:11 +02:00
Sébastien Han fbf36716c5 ceph-osd: docker start typo...
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-04-01 17:31:34 +02:00
Sébastien Han 00819ab7b8 ceph-docker: osd fix container prep and start
We now check if the device has already been prepared, if we detect a
ceph partition we do not prepare the device.
Also fixed some issues while running on Atomic or CoreOS.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-04-01 15:40:19 +02:00
Sébastien Han df6c3f4f72 ceph-docker: fix permissions on directories
fixing the can't open /var/lib/ceph/bootstrap-osd/ceph.keyring: can't
open /var/lib/ceph/bootstrap-osd/ceph.keyring: (13) Permission denied

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-04-01 14:43:33 +02:00
Leseb 9f2556315f Merge pull request #665 from PiotrProkop/ceph-osd-kv
Adding support for non atomic and non CoreOS machines for deploying containerized osds with kv backend
2016-04-01 13:16:22 +02:00
pprokop 604ea77ecc Changes due to review 2016-04-01 12:57:58 +02:00
Sébastien Han 450feaac0a ceph: implement cluster name support
we now have the ability to enable the `cluster` variable with a specific
value that will determine the name of the cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-30 18:08:38 +02:00
pprokop 5705cc71a3 Changing when statements 2016-03-30 12:40:57 +02:00
pprokop 9e252c6c44 Adding missing space 2016-03-30 12:22:32 +02:00
pprokop d7d83273e7 Adding support for non atomic and non CoreOS machines for deploying containerized osds with kv backend 2016-03-30 12:22:15 +02:00
Leseb 4c31c3bcb5 Merge pull request #661 from PiotrProkop/ceph-osd-kv
Adding ceph-osd continerized deployment with kv store.
2016-03-29 14:15:40 +02:00
pprokop ec9a96e570 Adding ceph-osd continerized deployment with kv store 2016-03-29 10:23:31 +02:00
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