]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
8 years agoceph-common: remove ganesha old ppa stable-2.1
Sébastien Han [Tue, 2 Jan 2018 15:20:46 +0000 (16:20 +0100)]
ceph-common: remove ganesha old ppa

The ppa does not exist anymore and makes any installation with
stable-2.1 fail.

Closes: https://github.com/ceph/ceph-ansible/issues/2286
Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #1436 from mcv21/backport_osd_fragments_fix
Sébastien Han [Thu, 18 May 2017 14:16:23 +0000 (16:16 +0200)]
Merge pull request #1436 from mcv21/backport_osd_fragments_fix

Backport osd fragments fix

8 years agoOnly include cluster.conf and osd.conf when building ceph.conf 1436/head
Matthew Vernon [Tue, 11 Apr 2017 13:33:21 +0000 (14:33 +0100)]
Only include cluster.conf and osd.conf when building ceph.conf

This is the same fix as bc846b7da6d9af16d9611fef7f00df6557f19def
applied to the other part of the code-base that builds ceph.conf (I'd
missed that 349b9ab3e72f188c50b5f84f3ce5ee2fddcfbf80 had duplicated
this code).

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
8 years agoOnly assemble {{ cluster }}.conf and osd.conf
Matthew Vernon [Tue, 11 Apr 2017 12:27:19 +0000 (13:27 +0100)]
Only assemble {{ cluster }}.conf and osd.conf

Ansible's assemble module by default will put all files in the src
directory together into dest. We only want to put {{ cluster }}.conf
and osd.conf together, not anything that might have found its way into
/etc/ceph/ceph.d (e.g. files left by the sysadmin taking backups
before an ansible run). So specify a regexp that matches only those
two files.

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
8 years agoMake ceph-common aware of osd config fragments
Christian Zunker [Wed, 15 Mar 2017 12:32:30 +0000 (13:32 +0100)]
Make ceph-common aware of osd config fragments

This removes the implicit order requirement when using OSD fragments.
When you use OSD fragments and ceph-osd role is not the last one,
the fragments get removed from ceph.conf by ceph-common.

It is not nice to have this code at two locations, but this is
necessary to prevent problems, when ceph-osd is the last role as
ceph-common gets executed before ceph-osd.

This could be prevented when ceph-common would be explicitly called
at the end of the playbook.

This is a backport of commit 349b9ab3e72f188c50b5f84f3ce5ee2fddcfbf80
onto Stable-2.1. That commit was by Christian Zunker
<christian.zunker@codecentric.de>

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
8 years agoMerge pull request #1433 from ceph/docs-missing-static
Alfredo Deza [Tue, 11 Apr 2017 13:48:23 +0000 (09:48 -0400)]
Merge pull request #1433 from ceph/docs-missing-static

Docs missing static

8 years agodocs: force an empty _templates dir so sphinx is happy 1433/head
Alfredo Deza [Tue, 11 Apr 2017 13:08:45 +0000 (09:08 -0400)]
docs: force an empty _templates dir so sphinx is happy

Signed-off-by: Alfredo Deza <adeza@redhat.com>
8 years agodocs: force an empty _static dir so sphinx is happy
Alfredo Deza [Tue, 11 Apr 2017 13:08:08 +0000 (09:08 -0400)]
docs: force an empty _static dir so sphinx is happy

Signed-off-by: Alfredo Deza <adeza@redhat.com>
8 years agoMerge pull request #1424 from ceph/stable-docs
Andrew Schoen [Tue, 11 Apr 2017 12:48:53 +0000 (07:48 -0500)]
Merge pull request #1424 from ceph/stable-docs

backport docs for stable-2.1

8 years agodocs: add missing sections/refs in scenarios.rst 1424/head
Alfredo Deza [Fri, 7 Apr 2017 16:18:15 +0000 (12:18 -0400)]
docs: add missing sections/refs in scenarios.rst

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit e8ae5c6aaf8f4f111bc5ceb41997086a19d7547a)

8 years agodocs: include testing conventions and testinfra in layout.rst
Alfredo Deza [Fri, 7 Apr 2017 16:17:53 +0000 (12:17 -0400)]
docs: include testing conventions and testinfra in layout.rst

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit c768f342192aae017e5969b4a4776cc287008874)

8 years agodocs: fix typo in testing/index.rst
Alfredo Deza [Fri, 7 Apr 2017 16:17:31 +0000 (12:17 -0400)]
docs: fix typo in testing/index.rst

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 7eb26d1b002072c2d33d662b15c483dc7867d167)

8 years agodocs: include the tests and tox files in the glossary
Alfredo Deza [Fri, 7 Apr 2017 16:17:13 +0000 (12:17 -0400)]
docs: include the tests and tox files in the glossary

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 3cde692482288c35f6b158ce058705d4f1777f50)

8 years agodocs: create a tests doc file
Alfredo Deza [Fri, 7 Apr 2017 16:07:42 +0000 (12:07 -0400)]
docs: create a tests doc file

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit f895b4c376739aa9b2b69c0b1239137f93bb1f7f)

8 years agodocs: create a separate tox doc file
Alfredo Deza [Fri, 7 Apr 2017 16:07:26 +0000 (12:07 -0400)]
docs: create a separate tox doc file

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit cb504f6d88b0259ec8a4b6cad8bc9ed9a25c2d14)

8 years agodocs: use glossary for the :doc: directive
Alfredo Deza [Fri, 7 Apr 2017 16:06:36 +0000 (12:06 -0400)]
docs: use glossary for the :doc: directive

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 41815f6b538f97a139eb6ce14dec2b4e117874aa)

8 years agodocs: add the testing glossary in the toctree
Alfredo Deza [Fri, 7 Apr 2017 16:06:16 +0000 (12:06 -0400)]
docs: add the testing glossary in the toctree

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit ae6349fd2187361cecc807fc7b9a8aa5fe023a16)

8 years agodocs: normalize the glossary vs. contents files
Alfredo Deza [Fri, 7 Apr 2017 16:05:55 +0000 (12:05 -0400)]
docs: normalize the glossary vs. contents files

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit a5b2ede0fff71df42f44ca4747b22f2cfb007359)

8 years agodocs: create a separate docs tox.ini
Alfredo Deza [Fri, 7 Apr 2017 15:41:59 +0000 (11:41 -0400)]
docs: create a separate docs tox.ini

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 14d46cb2be8edb93f2764ca18e35e414cf4e07ec)

8 years agodocs: initial structure for tests docs
Alfredo Deza [Thu, 6 Apr 2017 17:17:35 +0000 (13:17 -0400)]
docs: initial structure for tests docs

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 1f3d78e6c268329e9b161b4b9c70c33c15c42cc4)

8 years agodocs create a separate glossary file
Alfredo Deza [Thu, 6 Apr 2017 17:14:45 +0000 (13:14 -0400)]
docs create a separate glossary file

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 0d0e427a6c88395036164be2d09bc62eb5dd816c)

8 years agodocs: the master doc is the glossary file
Alfredo Deza [Thu, 6 Apr 2017 17:10:54 +0000 (13:10 -0400)]
docs: the master doc is the glossary file

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 20210c35de517b6c012997f8896758b5c398219a)

8 years agodocs: ignore build contents from git
Alfredo Deza [Wed, 5 Apr 2017 16:27:25 +0000 (12:27 -0400)]
docs: ignore build contents from git

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 1ad331b026ae52de02033d44cbaac947c78670bd)

8 years agodocs: initial take on doc structure
Alfredo Deza [Wed, 5 Apr 2017 16:27:06 +0000 (12:27 -0400)]
docs: initial take on doc structure

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 1a181fff4cb6faae8ee168f6705b771417583ee5)

8 years agoMerge pull request #1372 from mcv21/backport-1224
Sébastien Han [Thu, 16 Mar 2017 11:20:27 +0000 (12:20 +0100)]
Merge pull request #1372 from mcv21/backport-1224

Backport fix for issue 1224 to stable-2.1 branch

8 years agoUpdate sample group_vars files 1372/head
Matthew Vernon [Thu, 16 Mar 2017 11:06:51 +0000 (11:06 +0000)]
Update sample group_vars files

The previous cherry-pick changed the defaults for the ceph-osd role; this commit is the result of thereafter running generate_group_vars_sample.sh

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
8 years agoSet empty list as default for osd_directories
Daniel Marks [Fri, 13 Jan 2017 14:27:16 +0000 (15:27 +0100)]
Set empty list as default for osd_directories

As described in issue #1224 leaving this variable undefined may
cause a problem during execution of the ceph-osd role.

9 years agoMerge pull request #1312 from ceph/backport-1311 v2.1.9
Andrew Schoen [Wed, 15 Feb 2017 19:16:33 +0000 (13:16 -0600)]
Merge pull request #1312 from ceph/backport-1311

backport: "purge-cluster: also purge dmcrypt dedicated journals #1311"

9 years agopurge-cluster: also purge dmcrypt dedicated journals 1312/head
Andrew Schoen [Wed, 15 Feb 2017 15:53:13 +0000 (09:53 -0600)]
purge-cluster: also purge dmcrypt dedicated journals

See: https://bugzilla.redhat.com/show_bug.cgi?id=1414647

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 22f52a9dc68a37e717ce13d8976c32b1aa7fe5cf)

9 years agoMerge pull request #1308 from ceph/backport-1306 v2.1.8
Sébastien Han [Wed, 15 Feb 2017 09:52:56 +0000 (10:52 +0100)]
Merge pull request #1308 from ceph/backport-1306

backport: "purge-cluster: remove calamari-server package #1306"

9 years agopurge-cluster: remove calamari-server package 1308/head
Andrew Schoen [Tue, 14 Feb 2017 15:24:02 +0000 (09:24 -0600)]
purge-cluster: remove calamari-server package

See: https://bugzilla.redhat.com/show_bug.cgi?id=1422134

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Resolves rhbz#1422134

(cherry picked from commit c5f561a4e934bd6913420cc0f37eb947677d9fb5)

9 years agoMerge pull request #1293 from ceph/backport-1284 v2.1.7
Andrew Schoen [Wed, 8 Feb 2017 15:32:00 +0000 (09:32 -0600)]
Merge pull request #1293 from ceph/backport-1284

Backport: "purge-cluster: do not use ceph-detect-init #1284"

9 years agoMerge pull request #1292 from ceph/backport-1281
Andrew Schoen [Wed, 8 Feb 2017 14:49:00 +0000 (08:49 -0600)]
Merge pull request #1292 from ceph/backport-1281

Backport: 'purge: ability to purge client role #1281'

9 years agopurge-cluster: set a default value for fetch_directory if not defined 1293/head
Andrew Schoen [Tue, 7 Feb 2017 20:42:42 +0000 (14:42 -0600)]
purge-cluster: set a default value for fetch_directory if not defined

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 865b4500dce733dd3f636f5d7675bb685c6be070)

9 years agopurge-cluster: remove all include tasks
Andrew Schoen [Tue, 7 Feb 2017 20:38:02 +0000 (14:38 -0600)]
purge-cluster: remove all include tasks

Including variables from role defaults or files in a group_vars
directory relative to the playbook is a bad practice. We don't want to
do this because including these defaults at the task level overrides
values that would be set in a group_vars directory relative to the
inventory file, which is the correct usage if you wish to override
those default values.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit adf6aee6430b981fa371724367b2d1e2b80482b7)

9 years agopurge-cluster: do not use ceph-detect-init
Andrew Schoen [Tue, 7 Feb 2017 17:57:38 +0000 (11:57 -0600)]
purge-cluster: do not use ceph-detect-init

We can not always ensure that ceph-detect-init will be
present on the system.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1418980

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 0476b24af1e5fe6ddf0123144ae48eca3c60c73f)

9 years agopurge-docker: force image deletion 1292/head
Sébastien Han [Mon, 6 Feb 2017 13:58:39 +0000 (14:58 +0100)]
purge-docker: force image deletion

even if non-runnin containers are using this image as a reference.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit c34d0a9d28e3a08cfa85fafcb9e3bff66e2a20bb)

9 years agopurge: ability to purge client role
Sébastien Han [Mon, 6 Feb 2017 13:58:10 +0000 (14:58 +0100)]
purge: ability to purge client role

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 72cd9199acb3db3c9f193dc14434bc41a5d5f8e3)

9 years agoMerge pull request #1288 from ceph/backport-1285
Andrew Schoen [Wed, 8 Feb 2017 12:28:19 +0000 (06:28 -0600)]
Merge pull request #1288 from ceph/backport-1285

backport: "ceph-common: set ms bind ipv6 = true in ceph.conf when using ipv6 #1285"

9 years agoceph-common: set ms bind ipv6 = true in ceph.conf when using ipv6 1288/head
Andrew Schoen [Tue, 7 Feb 2017 18:34:29 +0000 (12:34 -0600)]
ceph-common: set ms bind ipv6 = true in ceph.conf when using ipv6

This fixes an issue with parsing the ceph.conf file when ip_version is set to
ipv6.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1419814

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 9580fd974ad4de5065aa367be95b37fb755141ea)

9 years agoMerge pull request #1280 from ceph/stable-2.1-revert
Sébastien Han [Mon, 6 Feb 2017 09:59:32 +0000 (10:59 +0100)]
Merge pull request #1280 from ceph/stable-2.1-revert

Revert to v2.1.6 (631e6d0fbbb2ddc640a1c57dccb4d998099b5d7b)

9 years agoRevert to v2.1.6 (631e6d0fbbb2ddc640a1c57dccb4d998099b5d7b) 1280/head
Andrew Schoen [Fri, 3 Feb 2017 18:04:02 +0000 (12:04 -0600)]
Revert to v2.1.6 (631e6d0fbbb2ddc640a1c57dccb4d998099b5d7b)

9 years agoMerge pull request #1279 from ceph/backport-1274
Sébastien Han [Fri, 3 Feb 2017 16:30:22 +0000 (17:30 +0100)]
Merge pull request #1279 from ceph/backport-1274

backport 1274: common: ability to disable handler osd health check

9 years agocommon: ability to disable handler osd health check 1279/head
Sébastien Han [Thu, 2 Feb 2017 10:22:55 +0000 (11:22 +0100)]
common: ability to disable handler osd health check

Signed-off-by: Sébastien Han <seb@redhat.com>
9 years agoMerge pull request #1278 from ceph/backport-1256
Sébastien Han [Fri, 3 Feb 2017 15:28:29 +0000 (16:28 +0100)]
Merge pull request #1278 from ceph/backport-1256

Backport: Using ini_file with ansible_hostname to ensure each INI block gets th…

9 years agoUsing ini_file with ansible_hostname to ensure each INI block gets the rgw_zone setti... 1278/head
Chris Wells [Sat, 28 Jan 2017 17:30:27 +0000 (12:30 -0500)]
Using ini_file with ansible_hostname to ensure each INI block gets the rgw_zone setting in a multi-RGW setup.  Also, ansible_hostname better matches what ceph-common does for the actual hostname (ansible_host != ansible_hostname under all conditions).

9 years agodocker: use systemd to manage container
Sébastien Han [Wed, 1 Feb 2017 16:12:46 +0000 (17:12 +0100)]
docker: use systemd to manage container

Since we now only support systemd has an init system we can finally
treat containers as processes using systemd and this for all the
distros.

Signed-off-by: Sébastien Han <seb@redhat.com>
9 years agodocker: fail if systemd is not present
Sébastien Han [Wed, 1 Feb 2017 16:18:17 +0000 (17:18 +0100)]
docker: fail if systemd is not present

Since we treat containers as services using systemd, systemd is an
absolute requirement.

Signed-off-by: Sébastien Han <seb@redhat.com>
9 years agodocker: fix mkdir path for all the distros
Sébastien Han [Wed, 1 Feb 2017 16:19:07 +0000 (17:19 +0100)]
docker: fix mkdir path for all the distros

On ubntu systems mkdir is in /bin where on atomic it is /usr/bin/.
We use the shell built-in function "command" to find its right location.

Signed-off-by: Sébastien Han <seb@redhat.com>
9 years agoREADME: Don't use underscores for opts in ceph_conf_overrides
Kyle Squizzato [Wed, 1 Feb 2017 18:29:45 +0000 (13:29 -0500)]
README: Don't use underscores for opts in ceph_conf_overrides

Adding underscores in the ceph_conf_overrides variable can result in incorrect
config options appearing.  A note has been added to clarify that using
underscores here can cause this behavior and recommending not to do it.

See: https://github.com/ceph/ceph-ansible/issues/1262

Signed-off-by: Kyle Squizzato <ksquizz@gmail.com>
9 years agodocker: fix restapi key creation with cluster name
Sébastien Han [Thu, 2 Feb 2017 08:32:12 +0000 (09:32 +0100)]
docker: fix restapi key creation with cluster name

Add support for key creation when the cluster name is different than
'ceph'.

Signed-off-by: Sébastien Han <seb@redhat.com>
9 years agodocker: fix monitor addition on kraken
Sébastien Han [Thu, 2 Feb 2017 21:52:24 +0000 (22:52 +0100)]
docker: fix monitor addition on kraken

Probably not the best fix but useful for testing. We will remove this
once we find a better workaround.

Signed-off-by: Sébastien Han <seb@redhat.com>
9 years agoMerge pull request #1268 from ceph/backport-1266 v2.1.6
Andrew Schoen [Wed, 1 Feb 2017 19:37:56 +0000 (13:37 -0600)]
Merge pull request #1268 from ceph/backport-1266

backport: "ceph-common: remove absolute path to handler include files #1266"

9 years agoceph-common: remove absolute path to handler include files 1268/head
Andrew Schoen [Wed, 1 Feb 2017 15:20:45 +0000 (09:20 -0600)]
ceph-common: remove absolute path to handler include files

This breaks if the roles don't live in the same place as the playbook.

See: https://github.com/ceph/ceph-ansible/issues/1265

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 873c044c539779539d3bf397015e05d505efbe2b)

9 years agoMerge pull request #1260 from ceph/backport-995 v2.1.5
Andrew Schoen [Tue, 31 Jan 2017 19:40:32 +0000 (13:40 -0600)]
Merge pull request #1260 from ceph/backport-995

Backport: "common: serialise host restart #995"

9 years agoci: set replica count to 1 since we have a single osd 1260/head
Sébastien Han [Tue, 31 Jan 2017 14:29:35 +0000 (15:29 +0100)]
ci: set replica count to 1 since we have a single osd

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 6e9da95b3303277c8175e25314f4638ae7930aa8)

9 years agocommon: serialise host restart
Sébastien Han [Thu, 22 Sep 2016 15:03:14 +0000 (17:03 +0200)]
common: serialise host restart

This commits allows us to restart Ceph daemon machine by machine instead
of restarting all the daemons in a single shot.

Rework the structure of the handler for clarity as well.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 40a2df5bbf13685c83ddc0b784b97e8a76414006)

Conflicts:
roles/ceph-common/handlers/main.yml
roles/ceph-common/tasks/generate_ceph_conf.yml

9 years agoMerge pull request #1259 from ceph/backport-1254
Andrew Schoen [Tue, 31 Jan 2017 14:55:04 +0000 (08:55 -0600)]
Merge pull request #1259 from ceph/backport-1254

Backport: "Osd dir exist and purge fixes #1254"

9 years agoceph-common: update apt cache in it's own task 1259/head
Andrew Schoen [Mon, 30 Jan 2017 23:15:08 +0000 (17:15 -0600)]
ceph-common: update apt cache in it's own task

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 7dc9c4b5b683a0d870a0b4401f99dfa30071350b)

9 years agocommon: create ceph initial directories
Sébastien Han [Mon, 30 Jan 2017 10:05:01 +0000 (11:05 +0100)]
common: create ceph initial directories

Some users purge their environments and leave it in a non-optimal state.
e.g: packages are still installed but /etc/ceph and /var/lib/ceph don't
exist anymore. This will result in multiple failures across the play,
sometimes hard to detect. Populating these directories "just in case"
should help us solving these problems.

Closes: #1253
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 1149825f8f5498b09fc26bb52da99c82db68c8e5)

9 years agopurge: do not stop ceph.target on each daemon
Sébastien Han [Fri, 27 Jan 2017 14:40:41 +0000 (15:40 +0100)]
purge: do not stop ceph.target on each daemon

Doing this cause some all the daemons to go down at the same time. In a
scenario where we colocate a monitor and an osd, this osds will take
some time to go down which will make the 'umount' task fail.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit d5dd658cfa1a11fdb92d162c368a0e664d98d525)

9 years agopurge: do not fail on purge ceph files
Sébastien Han [Fri, 27 Jan 2017 12:45:16 +0000 (13:45 +0100)]
purge: do not fail on purge ceph files

On systems running docker there is an issue with lxfs that results in
the find command returning 1 but actually did the job.
e.g: on a system with docker runnning find /var will give us the
following error:

find:
'/var/lib/lxcfs/cgroup/devices/lxc/x1/system.slice/systemd-update-utmp.service/devices.deny':
Permission denied
find:
'/var/lib/lxcfs/cgroup/devices/lxc/x1/system.slice/dev-random.mount/devices.allow':
Permission denied
...
...

However ceph files got deleted so we ignore the error.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit cb57a359ba77bbb62d531666a547bef5b5d67c44)

9 years agopurge: fix ubuntu purge when not using systemd
Sébastien Han [Fri, 27 Jan 2017 10:33:37 +0000 (11:33 +0100)]
purge: fix ubuntu purge when not using systemd

We now rely on the cli tool ceph-detect-init which will tell us the init
system in used on the distribution. We do this instead of the previous
lookup for systemd unit files to call the right task depending on the
init system.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit e371bd591c45ad9e18fda9fcd938b736044146e2)

9 years agopurge: allow purge to run multiple times
Sébastien Han [Fri, 27 Jan 2017 10:21:04 +0000 (11:21 +0100)]
purge: allow purge to run multiple times

with_items is evaluated before the when so in a second run where the
variable is empty if will fail with "'dict object' has no attribute
'stdout_lines'". To fix this we had a default array so with_items does
not fail and the task is skipped with the when.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 0e2e270ab238f63285422fed90fc773d9e4ae0be)

9 years agoosd: make sure osd directory exists
Sébastien Han [Fri, 27 Jan 2017 10:10:21 +0000 (11:10 +0100)]
osd: make sure osd directory exists

Sometimes users for testing, tend to delete the whole /var/lib/ceph and
then run ansible again, OSD will never come up if we do not create their
directory.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 6f53774ee9800bc8755ad90ff85f66420e414581)

9 years agoMerge pull request #1255 from ceph/backport-1250
Andrew Schoen [Fri, 27 Jan 2017 17:22:45 +0000 (11:22 -0600)]
Merge pull request #1255 from ceph/backport-1250

Backport: 'CI testing updates'

9 years agotests/purge_cluster: setup a xenial cluster instead of centos7 1255/head
Andrew Schoen [Fri, 27 Jan 2017 12:12:10 +0000 (06:12 -0600)]
tests/purge_cluster: setup a xenial cluster instead of centos7

The purge_dmcrypt scenario also tests centos7, so change this one to
xenial so we can have more test coverage.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 2a87c13f17ed155a60e689909e28b4c18b927586)

9 years agopurge-cluster: fix failure when raw_multi_journal is not defined
Andrew Schoen [Thu, 26 Jan 2017 18:07:42 +0000 (12:07 -0600)]
purge-cluster: fix failure when raw_multi_journal is not defined

Because the purge-cluster.yml playbook does not have access to the roles
default vars then we can be sure that raw_multi_journal is defined. For
example, if this was purging a dmcrypt journal then raw_multi_journal
might not be defined at all in group_vars/all.yml or
group_vars/osds.yml.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit d3cb8dba4e05f2081051855949b8ec5de34b19f0)

9 years agopurge-cluster: fix syntax when deleting dmcrypt devices
Andrew Schoen [Thu, 26 Jan 2017 17:28:30 +0000 (11:28 -0600)]
purge-cluster: fix syntax when deleting dmcrypt devices

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit b2a6f095f1199a318a7ffaaf00f643811d336b02)

9 years agotests: adds purge_cluster and purge_dmcrypt scenarios
Andrew Schoen [Thu, 26 Jan 2017 16:38:10 +0000 (10:38 -0600)]
tests: adds purge_cluster and purge_dmcrypt scenarios

This also removes the purge_cluster_collocated scenario as it's not
needed now because of purge_cluster.

Moving all the purge commands into its own section allows for ease of
reuse when creating new purge scenarios.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit e05df64fd0f4e2558eaaeb029899cc3e995c7f32)

9 years agotests/journal_collocation: adds testing values to ceph_conf_overrides
Andrew Schoen [Thu, 26 Jan 2017 14:53:57 +0000 (08:53 -0600)]
tests/journal_collocation: adds testing values to ceph_conf_overrides

This gives test coverage to changes introduced in:

https://github.com/ceph/ceph-ansible/pull/1214

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 20705aa35aee8839865a2ab948a3e13a170523c8)

9 years agoMerge pull request #1251 from ceph/backport-1214
Andrew Schoen [Fri, 27 Jan 2017 01:16:53 +0000 (19:16 -0600)]
Merge pull request #1251 from ceph/backport-1214

Backport: 'mon: make sure osd_pool_default_size is honoured'

9 years agomon: make sure osd_pool_default_size is honoured 1251/head
Sébastien Han [Tue, 3 Jan 2017 12:48:59 +0000 (13:48 +0100)]
mon: make sure osd_pool_default_size is honoured

This patch makes sure we set the proper pool size on the rbd pool.
Usually during bootstrap the rbd pool size is not honoured so we need to
add this workaround.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit e35070f6ce604ee8201d3aa9845366737f7ebbc6)

9 years agoMerge pull request #1249 from ceph/backport-1235
Sébastien Han [Wed, 25 Jan 2017 22:27:00 +0000 (23:27 +0100)]
Merge pull request #1249 from ceph/backport-1235

Backport of purge cluster updates

9 years agopurge: remove dm-crypt devices 1249/head
Sébastien Han [Thu, 19 Jan 2017 14:28:44 +0000 (15:28 +0100)]
purge: remove dm-crypt devices

When running encrypted OSDs, an encrypted device mapper is used (because
created by the crypsetup tool). So before attempting to remove all the
partitions on a device we must delete all the encrypted device mappers,
then we can delete all the partitions.

Signed-off-by: Sébastien Han <seb@redhat.com>
 Please enter the commit message for your changes. Lines starting

(cherry picked from commit 73ca1a7a00ae2b8147fb80b7177f54d738439128)

Resolves: backport#1235

9 years agopurge: remove zap_block_devs variable
Sébastien Han [Wed, 18 Jan 2017 09:55:01 +0000 (10:55 +0100)]
purge: remove zap_block_devs variable

The name of this variable was a bit confusing since its activation will
zap all the block devices no matter which osd scenario we are using.
Removing this variable and applying a condition on the OSD scenario is
now feasible and easier since we import group_vars variable files for
OSDs.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit adeb3decf38bddb2972e597f22a27bf9638fb41e)

Resolves: backport#1235

9 years agopurge: cosmetic cleanup
Sébastien Han [Wed, 18 Jan 2017 09:53:21 +0000 (10:53 +0100)]
purge: cosmetic cleanup

Just applying our writing syntax convention in the playbook.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit b7fcbe5ca218639e0930a13a7001918606aa64e2)

Resolves: backport#1235

9 years agoMerge pull request #1248 from ceph/backport-1247 v2.1.4
Sébastien Han [Tue, 24 Jan 2017 17:30:48 +0000 (18:30 +0100)]
Merge pull request #1248 from ceph/backport-1247

Backport: Adds ip_version configuration option

9 years agoAdds ip_version configuration option 1248/head
Andrew Schoen [Tue, 24 Jan 2017 15:06:10 +0000 (09:06 -0600)]
Adds ip_version configuration option

This allows the user to set ip_version to either ipv4 or ipv6. This
resolves a bug where monitor_address is set to an ipv6 address, but the
template fails to render because it's hardcoded to look for an 'ipv4'
key in the ansible facts.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1416010

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Resolves: bz#1416010
(cherry picked from commit 03cb803bd1bd6da888e0483db40d444cd4ee86e3)

9 years agoMerge pull request #1245 from ceph/backport-1146
Andrew Schoen [Mon, 23 Jan 2017 16:59:05 +0000 (10:59 -0600)]
Merge pull request #1245 from ceph/backport-1146

backport of PR #1146

9 years agotests/xenial_cluster: adds a client node 1245/head
Andrew Schoen [Mon, 23 Jan 2017 15:22:06 +0000 (09:22 -0600)]
tests/xenial_cluster: adds a client node

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit a774ea025d5c9854efbab1be28e0a832b882140a)

9 years agotest: add tests for the client role
Sébastien Han [Wed, 18 Jan 2017 16:50:29 +0000 (17:50 +0100)]
test: add tests for the client role

Here we test the client role.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 48a8cd1a43aa7f2bd60126eb54fb19702f54d671)

9 years agomon: fix mds pool creation
Sébastien Han [Thu, 19 Jan 2017 13:35:00 +0000 (14:35 +0100)]
mon: fix mds pool creation

It is not enough to check for the mds to exists, it actually always does
because we declare the variable. So we need to make sure that there is a
mds host.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 90648e7518fdf858a0af6c8b0cae7160bb6ddf2c)

9 years agomon: pool creation and pgs
Sébastien Han [Mon, 5 Dec 2016 13:21:54 +0000 (14:21 +0100)]
mon: pool creation and pgs

Since we introduced config_overrides we removed a lot of options from
the default template. In some cases, like mds pool, openstack pools etc
we need to know the amount of PGs required. The idea here is to skip the
task if ceph_conf_overrides.global.osd_pool_default_pg_num is not define
in your `group_vars/all.yml`.

Closes: #1145
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ddac3a1fb5e319d6f778256504c2787746454c79)

9 years agoMerge pull request #1237 from ceph/ceph-docker-common-backport
Alfredo Deza [Wed, 18 Jan 2017 15:51:29 +0000 (10:51 -0500)]
Merge pull request #1237 from ceph/ceph-docker-common-backport

ceph-docker-common backport

9 years agoceph-osd: use ceph_docker_registry when preparing OSDs 1237/head
Andrew Schoen [Mon, 16 Jan 2017 17:39:13 +0000 (11:39 -0600)]
ceph-osd: use ceph_docker_registry when preparing OSDs

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 0c55a35963713927e8614d5546a9e6ae3a2414f1)

9 years agoadd ceph_docker_registry to all.docker.yml.sample
Andrew Schoen [Mon, 16 Jan 2017 17:33:20 +0000 (11:33 -0600)]
add ceph_docker_registry to all.docker.yml.sample

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit e0d73b52454de521d84f2b1e5afc5978b089aac9)

9 years agouse ceph_docker_registry when starting containers
Andrew Schoen [Mon, 16 Jan 2017 17:17:41 +0000 (11:17 -0600)]
use ceph_docker_registry when starting containers

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 655b8449aea06aeead3e574a561c0c1c1522e9c1)

9 years agoceph-docker-common: add symlink to ceph.ceph-docker-common
Andrew Schoen [Mon, 16 Jan 2017 16:17:36 +0000 (10:17 -0600)]
ceph-docker-common: add symlink to ceph.ceph-docker-common

This allows for the role to be used with ansible-galaxy and to fix the
include in all the meta/main.yml files in the roles.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 3713824b796c9f33ac69056c06f55f56097b3773)

9 years agouse ceph_docker_registry in all the roles instead of docker.io
Andrew Schoen [Mon, 16 Jan 2017 15:52:20 +0000 (09:52 -0600)]
use ceph_docker_registry in all the roles instead of docker.io

This allows for ceph-ansible to use other docker registries.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 9449dbf083a0810eaeb8c172a9f1bfb3d46574da)

9 years agoceph-common: include ceph_docker_registry when fetching the image
Andrew Schoen [Mon, 16 Jan 2017 15:51:20 +0000 (09:51 -0600)]
ceph-common: include ceph_docker_registry when fetching the image

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 25277587fa5a8e6d47be0406257d3542203e3cfc)

9 years agouse ceph-docker-common in roles that support docker deployments
Andrew Schoen [Mon, 16 Jan 2017 15:30:53 +0000 (09:30 -0600)]
use ceph-docker-common in roles that support docker deployments

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit c07b7ddbaaf4effa9c8246a8759644898fb1a37c)

9 years agoceph-docker-common: a new role to share things common to docker
Andrew Schoen [Mon, 16 Jan 2017 15:28:40 +0000 (09:28 -0600)]
ceph-docker-common: a new role to share things common to docker

We can use this to share common variables and tasks needed for every
containerized deployment.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit f770780ddafb9c2004e21e781acc546a73440873)

9 years agoMerge pull request #1233 from ceph/bump-ansible v2.1.3
Andrew Schoen [Tue, 17 Jan 2017 18:17:31 +0000 (12:17 -0600)]
Merge pull request #1233 from ceph/bump-ansible

Bump ansible to 2.2.1

9 years agotests: bump ansible testing version to 2.2.1 for the 2.2 environment 1233/head
Alfredo Deza [Wed, 14 Dec 2016 15:57:40 +0000 (10:57 -0500)]
tests: bump ansible testing version to 2.2.1 for the 2.2 environment

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 1a4886a561cb3288f015e97d8adef5309ef55947)

9 years agoMerge pull request #1231 from ceph/purge-cluster-fixes v2.1.2
Andrew Schoen [Tue, 17 Jan 2017 17:33:37 +0000 (11:33 -0600)]
Merge pull request #1231 from ceph/purge-cluster-fixes

Purge cluster fixes

9 years agotests: copy purge-cluster.yml to root of ceph-ansible 1231/head
Andrew Schoen [Tue, 10 Jan 2017 22:56:07 +0000 (16:56 -0600)]
tests: copy purge-cluster.yml to root of ceph-ansible

There is an Ansible bug which makes the playbook fail when we are
running a playbook from the non-git root directory. The real problem is
that the ansible.cfg is not honoured and we are including variable from
roles/<role>/defaults/main.yml

The fix is too copy the purge cluster playbook on the git root directory
and execute it.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 48ac9579b69972d6aab352662fb7edb61db62ae4)

9 years agopurge-cluster: do not include ceph-osd and ceph-common defaults for osds
Andrew Schoen [Tue, 10 Jan 2017 22:57:58 +0000 (16:57 -0600)]
purge-cluster: do not include ceph-osd and ceph-common defaults for osds

When purging OSDs we do not need to include these defaults as nothing in
the following tasks uses them. Also, it has the side effect of
overwriting any variables defined in group_vars files that are relative
to the inventory you are using with the default values. That behavior
was causing the CI tests to fail.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit dd8389cdf7651f3bb9a02dc00c65bc48a5582bfd)

9 years agotests: adds a purge_cluster_collocated scenario
Andrew Schoen [Thu, 22 Dec 2016 20:13:08 +0000 (14:13 -0600)]
tests: adds a purge_cluster_collocated scenario

This scenario brings up a 1 mon 1 osd cluster using journal collocation,
purges the cluster and then verifies it can redeploy the cluster.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 0ce18daa493032d78d1d6073187c89e3ca2b07ee)

9 years agopurge-cluster: get journal partitions after zapping osd disks
Andrew Schoen [Thu, 22 Dec 2016 19:47:22 +0000 (13:47 -0600)]
purge-cluster: get journal partitions after zapping osd disks

In my testing zapping the osd disks deleted the journal
partitions, making the 'zap ceph journal partitions' task fail because
the partitions it found previously do not exist anymore.

This moves the task that finds the journal partitions after 'zap osd disks'
to catch any partitions ceph-disk might have missed.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 321cea8ba96cbca19b58aa9bbb76a584c268e2b1)