Commit Graph

757 Commits (655bdb189c85bfdcf5f2e57629bab99a86e6fc3d)

Author SHA1 Message Date
Ken Dreyer 3752cc6f38 common: upgrade/install ceph-test RPM first
Prior to this change, if a user had ceph-test-12.2.1 installed, and
upgraded to ceph v12.2.3 or newer, the RPM upgrade process would
fail.

The problem is that the ceph-test RPM did not depend on an exact version
of ceph-common until v12.2.3.

In Ceph v12.2.3, ceph-{osdomap,kvstore,monstore}-tool binaries moved
from ceph-test into ceph-base. When ceph-test is not yet up-to-date, Yum
encounters package conflicts between the older ceph-test and newer
ceph-base.

When all users have upgraded beyond Ceph < 12.2.3, this is no longer
relevant.
2018-04-09 18:09:52 +02:00
Zack Cerza 0123d790cd Use the CentOS repo for Red Hat dev packages
No use even trying to use something that doesn't exist.

Signed-off-by: Zack Cerza <zack@redhat.com>
2018-04-09 10:05:57 +02:00
Sébastien Han 0f8a4251ba move system tuning to osd role
The changes from these tasks only apply to osd nodes so there is no
reason to have them in ceph-common.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-03-15 14:06:26 +01:00
Sébastien Han 96c049be5b common: run updatedb task on debian systems only
The command doesn't exist on Red Hat systems so it's better to skip it
instead of ignoring the error.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-03-06 15:24:31 +00:00
Sébastien Han cb0f598965 common: run updatedb task on debian systems only
The command doesn't exist on Red Hat systems so it's better to skip it
instead of ignoring the error.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-03-02 20:59:10 +00:00
Andy McCrae 2779d2a850 Adjust /etc/updatedb.conf to not parse /var/lib/ceph
Using updatedb -e doesnt make a permanent change, but will updatedb
without the passed path.

To make this change more permanent we should update the
/etc/updatedb.conf file to include /var/lib/ceph.
2018-02-20 11:32:56 +01:00
Guillaume Abrioux dd0c98c5a2 common: do not use `shell` module when it is not needed
There is no need here to use `shell` instead of `command`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-01-31 10:45:34 +01:00
Guillaume Abrioux deaf273b25 syntax: change local_action syntax
Use a nicer syntax for `local_action` tasks.
We used to have oneliner like this:
```
local_action: wait_for port=22 host={{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} state=started delay=10 timeout=500 }}
```

The usual syntax:
```
    local_action:
      module: wait_for
      port: 22
      host: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
      state: started
      delay: 10
      timeout: 500
```
is nicer and kind of way to keep consistency regarding the whole
playbook.

This also fix a potential issue about missing quotation :

```
Traceback (most recent call last):
  File "/tmp/ansible_wQtWsi/ansible_module_command.py", line 213, in <module>
    main()
  File "/tmp/ansible_wQtWsi/ansible_module_command.py", line 185, in main
    rc, out, err = module.run_command(args, executable=executable, use_unsafe_shell=shell, encoding=None, data=stdin)
  File "/tmp/ansible_wQtWsi/ansible_modlib.zip/ansible/module_utils/basic.py", line 2710, in run_command
  File "/usr/lib64/python2.7/shlex.py", line 279, in split
    return list(lex)                                                                                                                                                                                                                                                                                                            File "/usr/lib64/python2.7/shlex.py", line 269, in next
    token = self.get_token()
  File "/usr/lib64/python2.7/shlex.py", line 96, in get_token
    raw = self.read_token()
  File "/usr/lib64/python2.7/shlex.py", line 172, in read_token
    raise ValueError, "No closing quotation"
ValueError: No closing quotation
```

writing `local_action: shell echo {{ fsid }} | tee {{ fetch_directory }}/ceph_cluster_uuid.conf`
can cause trouble because it's complaining with missing quotes, this fix solves this issue.

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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-01-31 10:45:34 +01:00
Eduard Egorov a8a2c13f6a firewall: add mds, nfs, restapi and iscsi ports, remove 'configure_firewall' variable used for conditional execution. Include the task only on rpm-based systems.
Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
2017-12-12 23:44:55 +01:00
Eduard Egorov 6a5e0da30d firewall: configure firewalld if it's already installed on the host (#2192).
Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
2017-12-12 23:44:55 +01:00
Sébastien Han bb7b29a9fc common: install ceph-common on all the machines
Since some daemons now install their own packages the task checking the
ceph version fails on Debian systems. So the 'ceph-common' package must
be installed on all the machines.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-11-22 17:11:50 +01: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
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
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
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
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
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 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
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
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 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
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
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
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 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 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 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 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
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 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
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
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
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
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 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 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 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 d46d453b83 Merge pull request #1780 from ceph/wip-rgw-nfs
Wip RGW NFS
2017-09-08 19:26:02 +02: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
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
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 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
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 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
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 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
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 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
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
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 70c2b934ca distribute rbd bootstrap key if available
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-08-22 18:55:29 -04: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
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
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
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
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
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 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 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 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
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 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
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
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 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
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
Guillaume Abrioux 675087d01c Doc: Add a note to clarify how to setup network
Explain how to setup networking in ceph-ansible by adding a note in
README.md.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-04 10:57:27 +02:00
Guillaume Abrioux 88df105d0b Common: Add ipv6 support
e8187f6 does not fix the ipv6 as expected since `ansible_default_*` are
filled with the IP address carried by the network interface used by the
default gateway route. By the way, it assumes that the MON_IP address will
be this IP address which is not always the case.

We need to keep using the previous fact but add some intelligence in the
template to determine how to retrieve the ipv4|ipv6 address since the path
to the fact in `hostvars` is not the same according to ipv4 vs ipv6 case.

Fix: 1569

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-07-04 10:57:26 +02:00
Guillaume Abrioux 73141118d0 Make the new check PGs working with /bin/sh
The new test in the checks PGs are no longer working on distributions
where /bin/sh isn't linked to /bin/bash.

Fix: #1619
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-06-22 17:59:38 +02:00
Sébastien Han 62192df644 Merge pull request #1595 from czunker/restart_all_osds
Restart all OSDs and do not stop after the first one.
2017-06-16 11:15:47 +02:00
Christian Zunker bf8347e149 Restart all OSDs and do not stop after the first one.
The current handler only restarts one OSD on each OSD server. After
the first one the handler stops, not matter what results the checks had.

Co-Authored-By: Gaudenz Steinlin (@gaudenz)
2017-06-14 09:38:07 +00:00
Peter Jenkins 804b0eef24 Bluestore: Omit "osd mkfs type" etc from ceph.conf
Remove "osd mkfs type" and the other pre-Bluestore parameters from the
generated ceph.conf so that disk activation on OSDs will work. The
current default xfs config results in a failed deployment and
incorrect partition metadata.
2017-06-14 10:44:13 +03:00
Guillaume Abrioux 304de4833f Common: Rewrite check_pgs
Rewrite the check_pgs by using json parsing instead of complex regexp to
parse the `ceph -s` output.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-06-12 10:59:16 +02:00
Sébastien Han fdc7866072 Merge pull request #1469 from ceph/refact_code
Docker: Refact code
2017-06-02 12:40:25 +02:00