Commit Graph

312 Commits (2dc2e1d48c55a4c9dc9322726429efcd98482bea)

Author SHA1 Message Date
Alfredo Deza 312f72dc5b ceph-common: include the new install_rh_storage_on_redhat playbook when ceph_stable_rh_storage is on:
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: rhbz#1339096
2016-05-25 08:45:22 -04:00
Alfredo Deza aced6751f7 ceph-common: create a new install task for rh storage on redhat
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: rhbz#1339096
2016-05-25 08:45:16 -04:00
Alfredo Deza 130d425d26 ceph-common: specify file path for repo key
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: rhbz#1339068
2016-05-24 08:28:34 -04:00
Leseb 866fcb7794 Merge pull request #789 from ceph/default-ceph-path
ceph-common: fix ceph options default path again
2016-05-24 10:32:15 +02:00
Leseb cc894d4044 Merge pull request #800 from ceph/BZ-1337320
ceph-common: on rh storage on debian add the repositories and keys (ISO)
2016-05-20 14:18:07 +02:00
Alfredo Deza c78313d19f ceph-common: on rh storage on debian do not add the rh key by default
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-05-19 15:16:18 -04:00
Alfredo Deza 329ac01d49 ceph-common: on rh storage on debian add the repositories and keys
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-05-19 14:20:47 -04:00
Andrew Schoen eb92cb57e4 install ceph-mds on debian systems when using red hat ceph storage
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-19 09:56:06 -05:00
Andrew Schoen 7157afc7ce install radosgw on debian systems when using red hat ceph storage
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-19 09:52:18 -05:00
Alfredo Deza 7b8c16b4e9 ceph-common: remove RedHat-only constraint for RH ISO install
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-05-18 16:40:28 -04:00
Sébastien Han 1d5d438e5d ceph-common: list impacted versions
For the ceph option default path

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-18 15:25:49 +01:00
Sébastien Han e071b773d8 ceph-common: add explanation message
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-16 18:55:54 +02:00
Sébastien Han e7aae27801 ceph-common: fix ceph options default path again
closes: #788

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-16 18:37:28 +02:00
Andrew Schoen 85fb03fc99 fix the /etc/default/ceph path on debian when setting cluster name
In ceph version 10.2.1 a bug was fixed that corrects the path:

791eba81a5

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-13 15:22:24 -05:00
Leseb 82a249e742 Merge pull request #771 from ceph/client-role
ceph-client: introduce new client role
2016-05-11 14:40:15 +02:00
Sébastien Han 40df8fb814 ceph-client: introduce new client role
By default, this roles will create a ceph config file and get the admin
key. You can optionnally add other users, keys and pools for your tests.

Closes: #769

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-11 14:36:35 +02:00
Samuel Matzek 9fec57a583 Add Debian ppc64le support
Add support to allow ceph-ansible to install and
configure Ceph on Debian on the ppc64le architecture.

Canonical has ppc64le Debian packages in Ubuntu distros
and on Ubuntu Cloud Archive.  Both of which can be installed
and configured using the 'distro' or 'uca' options in
ceph-ansible when this patch is used.

Signed-off-by: Samuel Matzek <smatzek@us.ibm.com>
2016-05-10 14:26:30 -05: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
Leseb 30f7208334 Merge pull request #748 from ceph/use-jewel
ceph: use jewel release
2016-05-09 01:13:54 +02:00
Leseb 1b8d021ef0 Merge pull request #764 from ceph/systemd
Several fixes
2016-05-09 01:00:02 +02:00
Sébastien Han b3971354bf ceph-mds: fix the handler
Moving the mds_name fact in the common role so the MDS can properly
be restarted.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-09 00:39:03 +02:00
Sébastien Han c4f3ab5649 ceph-common: install ceph-mds package
We kinda ommitted this package, now Jewel is out and the metadata server
is considered as stable.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-07 02:37:09 +02:00
Andrew Schoen 5139ed0592 strip any newlines from the init_system fact
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-06 14:47:45 -05:00
Andrew Schoen 9eed0ea4e7 Adds an use_systemd fact
This adds a helper fact that uses the ``init_system`` fact to determine if
we should be using systemd or not when controlling services.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-05 11:53:08 -05: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
Samuel Matzek ae239aaf09 Add support for install from Ubuntu Cloud Archive
This adds support to allow the install of Ceph from the
Ubuntu Cloud Archive.  The Ubuntu Cloud Archive provides newer
release of Ceph than the normal Ubuntu distro repository.

Signed-off-by: Samuel Matzek <smatzek@us.ibm.com>
2016-05-03 10:51:39 -05:00
Sébastien Han 94ce2be758 ceph: use jewel release
Also fix the repo url.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-03 14:02:44 +02:00
Sébastien Han 6513cdb313 ceph-common: install ceph-mon/osd for ceph dev
Since developement versions of Ceph are after infernalis a package split
happened. So basically ceph-mon, ceph-osd, ceph-mds need to be
installed.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-02 14:18:33 +02:00
Andrew Schoen f81140d21f Adds a use_server_package_split var
This will allow a user to conditionally install the ceph package on rpm
based systems. Installing this package is not required or wanted in
versions passed infernalis.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-04-28 09:15:05 -05:00
Alfredo Deza 3af17a3137 ceph-common: port main handler to use new ceph version facts
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-27 13:46:52 -04:00
Alfredo Deza df31745911 ceph-common: port main task to use new ceph version facts
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-27 10:21:16 -04:00
Alfredo Deza be8ae40bfb create is_before_RELEASE vars as well
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-27 10:21:16 -04:00
Alfredo Deza 8f35f1fb9b ceph-common: include the facts task always
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-27 10:21:16 -04:00
Alfredo Deza 25cc1ec1d3 ceph-common: create a facts task to define ceph versions
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-27 10:21:16 -04:00
Leseb f950afef92 Merge pull request #664 from jsaintrocc/master
Add infernalis to list of stable releases comment
2016-04-19 10:09:48 +02:00
Chris St. Pierre de22ae0a06 Fix creation of RBD client directories
Need to use a template, not a bare variable name.
2016-04-13 15:10:44 -05:00
James Saint-Rossy fc270bb772 fixed handling of new ceph_version 2016-04-12 21:26:59 -04:00
James Saint-Rossy ee1e470757 moved string parsing of ceph version into ansbile for better error handling 2016-04-12 21:08:42 -04:00
Leseb 74e3e04dcd Merge pull request #696 from stpierre/dedup-rbd-client-dirs
Deduplicate RBD client directory creation
2016-04-12 12:03:56 +02:00
James Saint-Rossy 3f9bd5c1b7 Removed infernalis workaround because ceph_stable_releases now includes it by default 2016-04-09 17:21:36 -04:00
James Saint-Rossy 4e7b93d725 Rebasing fork to account for upstream commits 2016-04-09 14:40:00 -04:00
Chris St. Pierre 1efe62252c Deduplicate RBD client directory creation
Instead of creating the RBD client socket path three different places
in three different ways, this creates it once. Ceph on OpenStack users
have the option to customize the permissions of the RBD client
directories.

Fixes #687
2016-04-08 13:50:00 -05:00
Leseb 0047e83dad Merge pull request #684 from bengland2/when-hammer-try2
fix when clauses for installation of ceph RPM
2016-04-06 19:38:05 +02:00
Ben England ee9093d570 Sebastien's suggestion - add infernalis to list of releases with no separate ceph-mon or ceph-osd 2016-04-06 13:14:24 -04:00
Ben England dc2fc3665e create /etc/sysconfig/ceph if it doesn't already exist 2016-04-05 21:33:05 -04:00
Ben England b199bdcfab fix when clauses for installation of ceph RPM 2016-04-05 21:11:37 -04:00
James Saint-Rossy b55df73061 Cleanup is_ceph_infernalis logic 2016-04-04 18:19:49 -04: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
runsisi a2d1d99ec3 ceph-common: use variable rgw_group_name instead of hard coded group
name 'rgws' when checking rgw port.

Signed-off-by: runsisi <runsisi@hust.edu.cn>
2016-03-28 18:59:09 +08:00
Leseb f27fada28a Merge pull request #649 from ceph/bluestore-ceph-disk
ceph-osd: add support for bluestore
2016-03-25 17:00:41 +01:00
Sébastien Han 9098eb0a8a ceph-common: pass journal check if using bluestore
bluestore does not need any journal so we skip this test if
osd_objectstore = bluestore

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-25 15:49:39 +01:00
Chris St. Pierre 23e40e3113 Make RBD client directory owner/group configurable
Some versions (?) of libvirt provide a 'libvirt' group instead of
'libvirtd'. (Observed with libvirt-daemon-1.2.17-13.el7_2.2.x86_64.)
This makes the RBD client directory owner and group configurable to
allow for this.
2016-03-25 08:51:20 -05:00
Andrew Schoen 959d525f81 Provide the ability to provide monitor_address instead of an interface
This would allow users who don't know what interface to provide to
give an IP address to use for the monitor instead.

Note: the includes are needed in ceph.conf.j2 because without them
jinja2 can not properly evaluate the template and will complain about a
missing 'ansible_interface' variable. The includes allow the template to
be evaluated correctly and then the correct include will be used during
render time.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-23 07:30:01 -05:00
Leseb db746e03cb Merge pull request #627 from ceph/fix-ceph-install
ceph-common: fix ceph install for centos distros
2016-03-18 14:02:22 +01:00
Sébastien Han 1764b5337f ceph-common: fix ceph install for centos distros
closes: #616

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-17 11:55:33 +01:00
Leseb 6e60fb5c0d Merge pull request #610 from fcharlier/install_ceph_mds_only_if_required
Install ceph-mds on Debian platforms only if mds_group_name is set
2016-03-16 14:04:20 +01:00
Andrew Schoen 565e2b280f adds the rh storage apt-key for jewel on ubuntu
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 16:08:53 -06:00
Andrew Schoen e09bb11dc9 the ceph package does not exist in jewel rh storage
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 16:06:56 -06:00
Andrew Schoen 3035f45c51 adds the ability to install red hat ceph storage packages on Ubuntu
This will only work for jewel or later releases.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 15:23:32 -06:00
Andrew Schoen 60746d9327 subscription manager tasks should not run on debian systems
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 14:56:23 -06:00
François Charlier 59f151f374 Install ceph-mds on Debian platforms only if mds_group_name is set
Fixes #547
2016-03-08 19:08:24 +01:00
Andrew Schoen 9f1b437e9d find the rhcs version right before setting is_ceph_infernalis
Where it was located before meant it might be skipped if you don't run
tasks with the package-install tag. This fixes the situation where you
want to configure an rhcs node, but do not want to do any package
installs.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-07 14:50:05 -06:00
Andrew Schoen ad6ebbcb32 make sure ceph_origin != "upstream" when using rhcs
When installing RHCS there is an option to install from distro provided
packages, this commit modifies the check to allow that to happen.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-07 14:47:09 -06:00
Sébastien Han 443f3465fd ceph-common: fix mon startup for dev installation
closes: #602 and #587

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-07 13:28:54 +01:00
Alfredo Deza 44e68923d1 install centos or rhel dependencies depending on ansible_distribution
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-03-02 18:05:37 -05:00
Sébastien Han 1ebb4de7f3 rollback previous change for ceph-common change
changing the name of the directory causes issues with git subtree which
will create new commits. Creating a symlink for vagrant to be happy.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-02 18:44:36 +01: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
Zack Cerza b27684d912 Optionally install ceph-test
We want this to enable testing with existing teuthology jobs.

https://github.com/ceph/teuthology

Signed-off-by: Zack Cerza <zack@redhat.com>
2016-03-01 16:23:06 -07:00
Chris St. Pierre a157186ef6 Fix pre-infernalis RBD client directory mode
0644 should never be a directory mode. 1777 makes it so that any user
can create a ceph client, not just root. (This is helpful if, for
instance, nova-compute is running as non-root.)
2016-02-29 11:58:20 -06:00
Leseb e06a05014c Merge pull request #569 from stpierre/skip-generate-fsid
Add option to skip generating fsid
2016-02-29 16:11:46 +01:00
Sébastien Han 1051958a61 ceph-common: only change task when false
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 15:57:40 +01:00
Sébastien Han 4e14b47174 ceph-common: use saner defaults for ceph dir
re-use the logic introduced in #512 for the ceph directory and the
`ceph.conf` file.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 11:10:56 +01:00
Chris St. Pierre 8e0d53e5a4 Add option to skip generating fsid
If using another method to generate a consistent fsid, then we can
skip creation of an (unused) cluster UUID file. If cephx is disabled
as well, we can skip creation of the fetch directory entirely.
2016-02-25 10:29:12 -06:00
Leseb e9f3e792b0 Merge pull request #559 from stpierre/rhel-ceph-origin-distro
Make RHEL installs honor ceph_origin: distro
2016-02-24 13:48:13 +01:00
Leseb 9cd2bdb74a Merge pull request #528 from bengland2/iso_mount
make sure /etc/fstab is always valid at boot time no matter what
2016-02-24 10:42:36 +01:00
Ben England 87b078ce86 revert absent->unmounted as leseb requested 2016-02-23 16:43:45 -05:00
Chris St. Pierre 53af359c65 Improve firewall checks
The firewall checks can fail for any number of reasons -- e.g., the
ceph cluster hostnames are unresolvable from the ansible host, or the
ports are filtered by some intermediate hop, etc. Make two changes to
make those checks better:

* Set pipefail when running the checks, so if nmap itself fails the
  command will be marked as 'failed'. Specifically, this fixes the
  case where the hostnames cannot be resolved.
* Add a new variable, check_firewall, which can be used to disable
  checks entirely. Specifically, this fixes the case where some
  intermediate firewall filters the ports, so nmap returns "filtered".
2016-02-23 11:38:25 -06:00
Chris St. Pierre 731c39a179 Make RHEL installs honor ceph_origin: distro
Installs on RHEL with ceph_origin set to distro previously would fail
because no packages would get installed, but all of the checks passed
fine. This adds support for ceph_origin: distro, simply installing the
packages using yum/dnf and assuming that the sysadmin has provided a
repository containing them.

This also supports the use case where Satellite or a similar local
mirror is in use, and the admin does not or cannot use the additional
repositories the role would otherwise add.
2016-02-23 11:30:26 -06:00
Andrew Schoen bcf34d539f make mandatory variable checks only apply when needed
In our use case we might only be configuring mons and not osds in the
same call, so we don't want to check variables needed for osds when they
are not needed to configure a mon.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-02-16 10:43:36 -06:00
Andrew Schoen beb966421e add the package-install tags to some tasks in check_mandatory_vars
We'll want these checks to always run when we're installing packages

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-02-16 10:43:36 -06:00
Leseb f86da22ce6 Merge pull request #543 from ceph/min_free_kbytes
ceph-common: calculate vm.min_free_kbytes
2016-02-16 16:27:23 +01:00
Sébastien Han 68a9d45a49 ceph-common: use stdout for the register var
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-16 16:26:56 +01:00
Sébastien Han 7ea9d95815 ceph-common: do not calculate vm.min_free_kbytes
we preserve the default kernel value.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-16 15:40:49 +01:00
Sébastien Han 4ede7211a0 ceph-common: calculate vm.min_free_kbytes
based on the os memory we calculate the value for vm.min_free_kbytes

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-15 15:03:10 +01:00
Niklas Haas 20e6f932dd
ceph-common: use explicit action syntax for config_template
This fails with "ERROR! no action detected in task" otherwise.
2016-02-14 20:58:04 +01:00
Sébastien Han 2d1cec643d use the ansible_version variable
use the builtin variable to check the ansible version

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 17:34:44 +01:00
Ben England b0ee3616a5 make sure /etc/fstab is always valid at boot time no matter what 2016-02-09 15:02:55 -05:00
Matt Thompson 14cf9f434e Change modes to string values
Currently deploying a MON fails with "bad symbolic permission for mode"
errors due to the file/directory modes not being interpreted as octal
values.  This commit updates roles/ceph-common/tasks/main.yml to set
the file/directory modes to strings so they can be interpreted
correctly.

Closes issue #525
2016-02-09 09:51:31 +00: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
Andrew Schoen df7c8da0e9 Adds a package-install tag to all installation tasks
We have a requirement to install the packages first without
configuration. These tags should allow us to target the tasks need to do
that.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-02-03 11:27:16 -06:00
Leseb b37443dd97 Merge pull request #508 from mattt416/upgrade_flag
Control when ceph packages get updated
2016-02-02 15:16:03 +01:00
Sébastien Han 5ef844988e ceph-common: use a generic way to create uuid
as reported in #510 some systems don't have uuidgen installed so we
better use a more global way to generate it. It sounds like python
should be available in case uuidgen is not.
Otherwise we will have to find another way :)

closes #510

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-02 11:24:58 +01:00
Matt Thompson a227a50ab2 Control when ceph packages get updated
Currently, all the ceph package installation resources use
"state=latest", which means subsequent runs of the ceph playbooks
could result in ceph being upgraded if there are package updates
available in the selected repo.

This commit adds a new variable to ceph-common called
'upgrade_ceph_packages' which defaults to False.  This variable is used
in the package installation resources for ceph packages to determine if
the resource should use "state=present" or "state=latest".  If the
variable gets set to True, "state=latest" will be used.

Additionally, we update rolling_update.yml to override
upgrade_ceph_packages to true to permit package upgrades in this
context specifically.

Closes issue #506
2016-02-02 09:56:40 +00:00
Sébastien Han 2665c43f34 fix type on ice template
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-29 01:15:32 +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 21cd46bf8a remove unecessary variables
these variables will be created on the fly, there is no need to force
them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-27 23:58:51 +01:00
Sébastien Han 64b32020e9 Necessary change to work on ansible v2
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-25 11:21:30 +01:00
Byron McCollum a9dceb6ca3 Configurable Ceph Conf Directory Permissions
This change allows for configurable Ceph Conf Directory permissions. This
is required for integrators of Ceph, like OpenStack Cinder, which needs to
read from /etc/ceph for operation.
2016-01-17 17:57:09 -06:00
Ben England b5cdacb136 help ansible find repo template from installs subdirectory 2016-01-15 12:52:31 -05:00
Logan V d23b27e6d7 allow customization of debian ceph stable repo url 2016-01-11 12:13:09 -06:00
Sébastien Han 789834f847 Do not make nmap mandatory
We can not force people to have nmap installed so instead we raise a
warning is not present.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-10 17:22:17 +01:00
Sébastien Han 0a576bebf9 Fix firewall check
Use command module instead of shell since we do not do anything fancy
here. Remove the duplicate register.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-10 16:52:37 +01:00
Sébastien Han 9209f50868 Check for blocked ports
As raised in #466 it is important in order to avoid unnecessary
troubleshooting to check that ceph ports are allowed on the platform.
The check runs a nmap command from the host running Ansible
to all the ceph nodes with their respective ports.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-08 18:57:13 +01:00
Ben England 3ba824ffd8 use proper syntax for expanding variables 2016-01-08 08:54:00 -05:00
Leseb 1664316d4d Merge pull request #460 from crcceph/master
fixed for infernalis on EL7
2015-12-17 10:22:51 +01:00
crcceph d89ddb1cee moved set_fact higher in file
moved set_fact for is_ceph_infernalis near top of file so that it can be used in other tests
2015-12-16 11:01:39 -08:00
crcceph 923cd6fc2c move set_fact above test
moved the set_fact above where it is being tested
2015-12-16 09:01:36 -08:00
Sébastien Han 4407967de0 Using config_template
Thanks to @cloudnull great patch at
https://github.com/ansible/ansible/pull/12555
we now have the ability to add more configuration options instead of
having to push a PR to add a new option to the template. So you can
dynamically add and remove flags.

To use it, edit `ceph_conf_overrides` in `group_vars/all` like so:

```
ceph_conf_overrides
 global:
     foo: 12345
     bar: 6789
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-16 17:19:50 +01:00
crcceph 4dd993ebae changed permissions under ceph user
when running under the user ceph the rbd client directory should be owned by ceph
2015-12-15 23:19:07 -08: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
Eike Frost d49e8bd904 Add systemd-specific start/restart tasks/handlers for el7/infernalis 2015-11-20 22:34:29 +01:00
Sébastien Han 83b2a51fe1 Fail for unsupported ansible version
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-20 15:30:18 +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
Emilien Mantel bd7d776e3b Fix and improve checks when ceph_origin == 'distro' 2015-09-21 18:04:19 +02:00
Michael Sambol 66259dc1c9 Refactor ceph-common, adjust styling 2015-09-03 21:09:33 -05:00
Sébastien Han 5849579fa7 Do not check for devices when device autodetect
Closes: #399

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-09-02 14:19:19 +02:00
Abhishek Varshney d87fbdfffd fixing sysctl command to take whitespace-separated multi values for a key 2015-09-02 12:50:03 +05:30
Leseb 00bca9a535 Merge pull request #394 from ti-mo/master
Enable optional-rpms on official RHEL for yum-plugin-priorities
2015-09-01 17:03:08 +02:00
Timo Beckers e0ebd05565 Enable optional-rpms on official RHEL for yum-plugin-priorities 2015-09-01 16:59:52 +02:00
Sébastien Han 0cbc81622f Get Ceph from distro repository (redhat-based)
Follow up on #392

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-08-31 15:25:42 +02:00
Leseb d1c8c46bf1 Merge pull request #392 from HanXHX/apt-origin
Get Ceph from distro repository (debian-based)
2015-08-31 14:24:12 +02:00
Emilien Mantel b99355839a Remove capital letters 2015-08-31 14:23:20 +02:00
Matt Thompson afc934d22a Make fetch directory configurable
Currently, the fetch directory is created in your working directory
(where ansible is run from).  We prefer to not keep any state in this
directory and would prefer to have the fetch directory configurable so
we can store it outside of our code checkout.

This commit creates a new variable in each role called
`fetch_directory` (defaulting to the previous value of 'fetch/'), and
then updates each reference to 'fetch' to use the new variable instead.

Closes issue #383
2015-08-27 16:49:50 +01:00
Emilien Mantel b187393a93 Get Ceph from distro repository (debian-based) 2015-08-27 11:26:54 +02:00
git-harry f60179e33f Prevent failure from race creating fetch directory
When multiple monitor hosts attempt to create the fetch directory there
is the potential for the task to fail with:

  "OSError: [Errno 17] File exists: 'fetch'"

This appear to be an issue with the file module trying to create the
same directory at the same time when the tasks has been delegated to a
single host.

This commit enables run_once on the affected task which should address
the issue.
2015-08-26 10:49:22 +01:00
Sébastien Han b3c7c36299 Make package dependencies configurable
Closes: #386 and #384

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-08-26 11:21:24 +02:00
Andy McCrae 942f914b84 Check to ensure device checks only happen on osds
Add bool for osd_group_name in group_names for osd checks.
2015-08-17 12:45:20 +01:00
Sébastien Han 476c5df38f Use latest packages
Fix back the rolling update playbook.
However every single time the playbook will run it will check for new
packages and install the latest ones. I don't think this is always the
desired behaviour. We need to find a way to conciliate both...

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-08-17 11:28:20 +02:00
Andy McCrae 25a45332f3 Fix devices check for raw_multi_journal
Fix the logic for the mandatory devices check so that it applies to
raw_multi_journal and journal_collocation scenarios separately.

This fails otherwise because whichever var is "first" in the or is most
likely undefined.
2015-08-14 15:43:10 +01:00
Michael Sambol c187e1ff83 Revert "Use stat module instead of shell" 2015-08-07 00:07:51 -05:00
Michael Sambol 4531b67a4f Use stat module instead of shell 2015-08-05 23:06:09 -05:00
Sébastien Han 7ed67f37d8 Remove rgw installation from the ceph-rgw role
The installation of rgw is now handled by the ceph-common role.
Fixes: #307

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-08-03 22:17:43 +02:00
Michael Sambol 32c149d4f5 Verify only one osd scenario 2015-07-31 22:02:05 -05:00
Michael Sambol e6f22b948c Failed_when instead of ignore_errors
Changed ignore_errors to failed_when so the output doesn't show in
red.
2015-07-29 13:35:46 -05:00
Andrew F. Ly 76d2cd381d Create a local fetch directory if it doesn't exist 2015-07-24 22:10:39 -05:00
leseb f1e6b0216d Re-arrange roles
Trying to add more clarity in the role's task structure.

Signed-off-by: leseb <seb@redhat.com>
2015-07-24 14:50:32 +02:00
leseb 5fc4d846a6 Do not track fetch directory
Signed-off-by: leseb <seb@redhat.com>
2015-07-17 18:14:12 +02:00
leseb c27450ff40 Generate initial monitor key dynamically
Cool stuff :). We don't need to specify an initial monitor key anymore.
A key will automatically be generated.

The default key can always be overriden with the `monitor_secret`
variable.

Signed-off-by: leseb <seb@redhat.com>
2015-07-17 11:58:50 +02:00
leseb d432af18fe Do not use latest package
While re-running the playbook we do not want to check for new packages.
We shouldn't perform upgrades, we leave this to the operators.

Signed-off-by: leseb <seb@redhat.com>
2015-07-07 10:39:05 +02:00
leseb 52ddb461b6 Ignore errors
If we don't ignore errors here, the node will get skipped for the rest
of the playbook...

Signed-off-by: leseb <seb@redhat.com>
2015-07-06 18:22:01 +02:00
leseb ed3a7136da Fix a terrible mistake in the ceph.conf template
Feel so bad about this one...
Now it's fixed, the rgw section will be activated once the rgws hosts
are part of the inventory.

Signed-off-by: leseb <seb@redhat.com>
2015-07-06 17:39:37 +02:00
leseb 070b790af0 Speed up repository check
Even if the subcription command is indempotent it takes around 15/16sec
to get it done. Where with the simple yum check we lower down this to
3sec.

Signed-off-by: leseb <seb@redhat.com>
2015-07-06 17:29:25 +02:00
leseb 6cda705c43 Do not change when adding the repo
Since the command is indempotent we don't need to check if the repo is
enabled as it will likely take twice the time.

Signed-off-by: leseb <seb@redhat.com>
2015-07-06 17:03:31 +02:00
leseb 7fdc2b1d36 Use more variable check
Fail early if a variable is not defined.

Signed-off-by: leseb <seb@redhat.com>
2015-07-03 21:38:30 +02:00
leseb b0891016a9 Fix the method used
We need to collect the iso from the ansible server.

Signed-off-by: leseb <seb@redhat.com>
2015-07-03 18:43:04 +02:00
Leseb 17dd29a556 Merge pull request #312 from ceph/disable-cdn-option
Safer check
2015-07-03 16:57:51 +02:00
leseb d331af4e16 Safer check
Without this, the subcription manager will run since the default value
for cdn is true...

Signed-off-by: leseb <seb@redhat.com>
2015-07-03 16:56:34 +02:00