]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
8 years agoceph-mon: Check if ceph filesystem exists 1329/head
Guillaume Abrioux [Thu, 23 Feb 2017 15:06:04 +0000 (16:06 +0100)]
ceph-mon: Check if ceph filesystem exists

Check if ceph filesystem already exists before creating it.
If the ceph filesystem doesn't exist, execute the task only on one node.

Fix: #1314
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
8 years agoMerge pull request #1287 from ceph/no-priviledge-mode
Andrew Schoen [Wed, 22 Feb 2017 21:24:18 +0000 (15:24 -0600)]
Merge pull request #1287 from ceph/no-priviledge-mode

No priviledge mode

8 years agotests: when using pytest mark decorators ensure all fixtures are defined 1287/head
Andrew Schoen [Wed, 22 Feb 2017 19:43:59 +0000 (13:43 -0600)]
tests: when using pytest mark decorators ensure all fixtures are defined

Decorating a test method directly with a pytest mark seems to break if
the test function does not explicitly define all pytest fixtures it
expects to recieve.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agoci: decorate the tests to not run on docker scenario
Sébastien Han [Wed, 22 Feb 2017 14:21:23 +0000 (09:21 -0500)]
ci: decorate the tests to not run on docker scenario

Certain scenario won't work on containerized deployment. So we decorate
them so they can be skipped.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoci: fix issue on ansible2.2-docker_dedicated_journal
Sébastien Han [Tue, 21 Feb 2017 21:14:39 +0000 (16:14 -0500)]
ci: fix issue on ansible2.2-docker_dedicated_journal

journal_collocation was enabled so the test suite was testing this
scenario and obviously failed since there is no second partition to
verify.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoci: do not use atomic host for ansible2.2-docker_dedicated_journal
Sébastien Han [Tue, 21 Feb 2017 20:39:42 +0000 (15:39 -0500)]
ci: do not use atomic host for ansible2.2-docker_dedicated_journal

Switch to CentOS since Atomic host does not have the right Docker
version.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoci: set a different directory for ceph osd docker run script
Sébastien Han [Tue, 21 Feb 2017 19:04:58 +0000 (14:04 -0500)]
ci: set a different directory for ceph osd docker run script

/usr/share is not writable on Atomic Host so we use /var/tmp instead.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoci: do not generate random hostname for ansible2.2-docker_dedicated_journal
Sébastien Han [Tue, 21 Feb 2017 18:39:47 +0000 (13:39 -0500)]
ci: do not generate random hostname for ansible2.2-docker_dedicated_journal

This fixes the error: Call to virDomainCreateWithFlags failed: internal
error: Monitor path
/var/lib/libvirt/qemu/domain-docker-cluster-dedicated-journal_osd0_1487692576_dbfc21d851071d3e2cd2/monitor.sock
too big for destination

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agomon: docker, ability to enable centos extra repo
Sébastien Han [Tue, 21 Feb 2017 15:33:40 +0000 (10:33 -0500)]
mon: docker, ability to enable centos extra repo

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agodocker: osd, clarify variable usage for scenarii
Sébastien Han [Sat, 18 Feb 2017 13:48:18 +0000 (14:48 +0100)]
docker: osd, clarify variable usage for scenarii

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agopurge-docker: re-implement zap devices
Sébastien Han [Sat, 18 Feb 2017 01:54:47 +0000 (02:54 +0100)]
purge-docker: re-implement zap devices

We now run the container and waits until it dies. Prior to this we were
stopping it before completion so not all the devices where zapped.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agodocker: make ceph docker osd script path
Sébastien Han [Thu, 16 Feb 2017 21:13:26 +0000 (22:13 +0100)]
docker: make ceph docker osd script path

Since distro will not allow /usr/share to be writable (e.g: atomic) so
we let the operator decide where to put that script.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoci: add docker-cluster-dmcrypt-journal-collocation scenario
Sébastien Han [Thu, 16 Feb 2017 20:25:29 +0000 (21:25 +0100)]
ci: add docker-cluster-dmcrypt-journal-collocation scenario

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agotests: enable the docker_dedicated_journal scenario
Andrew Schoen [Fri, 10 Feb 2017 16:37:52 +0000 (10:37 -0600)]
tests: enable the docker_dedicated_journal scenario

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agotests: add scenario for dedicated-journal on docker
Sébastien Han [Tue, 7 Feb 2017 21:08:47 +0000 (22:08 +0100)]
tests: add scenario for dedicated-journal on docker

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agodocker: osd, do not use priviledged container anymore
Sébastien Han [Tue, 7 Feb 2017 21:00:53 +0000 (22:00 +0100)]
docker: osd, do not use priviledged container anymore

Oh yeah! This patch adds more fine grained control on how we run the
activation osd container. We now use --device to give a read, write and
mknodaccess to a specific device to be consumed by Ceph. We also use
SYS_ADMIN cap to allow mount operations, ceph-disk needs to temporary
mount the osd data directory during the activation sequence.

This patch also enables the support of dedicated journal devices when
deploying ceph-docker with ceph-ansible.

Depends on https://github.com/ceph/ceph-docker/pull/478

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agopurge-docker: also purge journal devices
Sébastien Han [Tue, 7 Feb 2017 20:55:36 +0000 (21:55 +0100)]
purge-docker: also purge journal devices

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agodocker: osd, do not skip on failure
Sébastien Han [Tue, 7 Feb 2017 12:45:31 +0000 (13:45 +0100)]
docker: osd, do not skip on failure

If the systemd unit file can not be generated we should fail, same for
systemd enable and reload.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #1315 from ceph/rolling-update-tests
Sébastien Han [Tue, 21 Feb 2017 20:53:57 +0000 (15:53 -0500)]
Merge pull request #1315 from ceph/rolling-update-tests

adds a testing scenario for rolling updates

8 years agoupdate group_vars sample for rolling_update variable 1315/head
Andrew Schoen [Tue, 21 Feb 2017 18:36:54 +0000 (12:36 -0600)]
update group_vars sample for rolling_update variable

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agoceph-common: remove infernalis comment on radosgw_civetweb_port
Andrew Schoen [Tue, 21 Feb 2017 18:35:00 +0000 (12:35 -0600)]
ceph-common: remove infernalis comment on radosgw_civetweb_port

As of Infernalis, the Ceph daemons run as an unprivileged "ceph" UID,
and this is by design.

Commit f19b765 altered the default
civetweb port from 80 to 8080 with a comment in the commit log about
"until this gets solved"

Remove the comment about permissions on Infernalis, because this is
always going to be the case on the Ceph versions we support, and it
is just confusing.

If users want to expose civetweb to s3 clients using privileged TCP
ports, they can redirect traffic with iptables, or use a reverse proxy
application like HAproxy.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agotests: adds a new ansible2.2-update_dmcrypt scenario
Andrew Schoen [Fri, 17 Feb 2017 20:33:30 +0000 (14:33 -0600)]
tests: adds a new ansible2.2-update_dmcrypt scenario

This performs a rolling update on a cluster using dmcrypt dedicated
journals.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agorolling-update: do not use upstart to stop mons when using systemd
Andrew Schoen [Fri, 17 Feb 2017 20:31:25 +0000 (14:31 -0600)]
rolling-update: do not use upstart to stop mons when using systemd

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agoceph-common: do not get current fsid when performing a rolling_update
Andrew Schoen [Fri, 17 Feb 2017 20:29:45 +0000 (14:29 -0600)]
ceph-common: do not get current fsid when performing a rolling_update

This avoids a situation where during a rolling_update we try to talk to
a mon to get the fsid and if that mon is down the playbook hangs
indefinitely.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agoceph-common: use yum_repository when adding the ceph_stable repo
Andrew Schoen [Fri, 17 Feb 2017 20:27:15 +0000 (14:27 -0600)]
ceph-common: use yum_repository when adding the ceph_stable repo

This gives us more flexibility than installing the ceph-release package
as we can easily use different mirrors. Also, I noticed an issue when
upgrading from jewel -> kraken as the ceph-release package for those
releases both have the same version number and yum doesn't know to
update anything.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agoMerge pull request #1324 from ktdreyer/rm-civetweb-port-comment
Sébastien Han [Tue, 21 Feb 2017 18:28:16 +0000 (13:28 -0500)]
Merge pull request #1324 from ktdreyer/rm-civetweb-port-comment

group_vars: rm Infernalis comment

8 years agogroup_vars: rm Infernalis comment 1324/head
Ken Dreyer [Tue, 21 Feb 2017 16:49:40 +0000 (09:49 -0700)]
group_vars: rm Infernalis comment

As of Infernalis, the Ceph daemons run as an unprivileged "ceph" UID,
and this is by design.

Commit f19b765f7995dab4aca46e1885320dc440485ead altered the default
civetweb port from 80 to 8080 with a comment in the commit log about
"until this gets solved"

Remove the comment about permissions on Infernalis, because this is
always going to be the case on the Ceph versions we support, and it
is just confusing.

If users want to expose civetweb to s3 clients using privileged TCP
ports, they can redirect traffic with iptables, or use a reverse proxy
application like HAproxy.

8 years agoMerge pull request #1325 from ceph/ipv6-rgw-doc
Sébastien Han [Tue, 21 Feb 2017 17:02:06 +0000 (12:02 -0500)]
Merge pull request #1325 from ceph/ipv6-rgw-doc

Ipv6 rgw doc

8 years agodocker-common: sync group_vars file 1325/head
Sébastien Han [Tue, 21 Feb 2017 17:01:08 +0000 (12:01 -0500)]
docker-common: sync group_vars file

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agocommon: add doc for rgw on ipv6
Sébastien Han [Tue, 21 Feb 2017 17:00:37 +0000 (12:00 -0500)]
common: add doc for rgw on ipv6

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

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #1322 from ceph/fix-transparent-page
Sébastien Han [Tue, 21 Feb 2017 14:34:30 +0000 (09:34 -0500)]
Merge pull request #1322 from ceph/fix-transparent-page

common: fix "disable transparent hugepage"

8 years agocommon: fix "disable transparent hugepage" 1322/head
Sébastien Han [Mon, 20 Feb 2017 22:07:53 +0000 (17:07 -0500)]
common: fix "disable transparent hugepage"

To configure kernel the task is using "command" module which is not
respect operator ">". So this task just print to "stdout": "never >
/sys/kernel/mm/transparent_hugepage/enabled"

fix: #1319

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #1316 from zhsj/fix-osd-id
Sébastien Han [Mon, 20 Feb 2017 21:57:14 +0000 (16:57 -0500)]
Merge pull request #1316 from zhsj/fix-osd-id

fix grep match pattern for osd ids

8 years agofix grep match pattern for osd ids 1316/head
Shengjing Zhu [Mon, 20 Feb 2017 08:35:56 +0000 (16:35 +0800)]
fix grep match pattern for osd ids

Some playbooks use [0-9]*, others use \d+$
The latter is more correct since cluster name may contain numbers.

Signed-off-by: Shengjing Zhu <zsj950618@gmail.com>
8 years agoMerge pull request #1313 from ceph/docker-systemd-units
Sébastien Han [Thu, 16 Feb 2017 19:02:13 +0000 (20:02 +0100)]
Merge pull request #1313 from ceph/docker-systemd-units

docker: homogenise systemd file location

8 years agodocker: homogenise systemd file location 1313/head
Sébastien Han [Thu, 16 Feb 2017 17:31:32 +0000 (18:31 +0100)]
docker: homogenise systemd file location

So unit files were stored in /var/lib/ceph some where in
/etc/systemd/system. Now they are all under /etc/systemd/system.

closes: #1296

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #1311 from ceph/BZ-1414647
Andrew Schoen [Wed, 15 Feb 2017 17:57:09 +0000 (11:57 -0600)]
Merge pull request #1311 from ceph/BZ-1414647

purge-cluster: also purge dmcrypt dedicated journals

8 years agopurge-cluster: also purge dmcrypt dedicated journals 1311/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>
8 years agoMerge pull request #1307 from ceph/rgw-configure
Sébastien Han [Wed, 15 Feb 2017 09:52:38 +0000 (10:52 +0100)]
Merge pull request #1307 from ceph/rgw-configure

rgw-standalone.yml will also now collect keys

8 years agorgw-standalone: also fetch keys from mons 1307/head
Andrew Schoen [Tue, 14 Feb 2017 22:11:30 +0000 (16:11 -0600)]
rgw-standalone: also fetch keys from mons

This is to allow for ceph-installer usage of this playbook and
to ensure that you have the correct keys locally when bootstrapping.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agoMerge pull request #1306 from ceph/BZ-1422134
Andrew Schoen [Tue, 14 Feb 2017 18:29:54 +0000 (12:29 -0600)]
Merge pull request #1306 from ceph/BZ-1422134

purge-cluster: remove calamari-server package

8 years agopurge-cluster: remove calamari-server package 1306/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

8 years agoMerge pull request #1304 from guits/fix_1300
Sébastien Han [Sat, 11 Feb 2017 12:14:07 +0000 (13:14 +0100)]
Merge pull request #1304 from guits/fix_1300

Skip facts_mon_fsid.yml if cephx is disabled

8 years agoMerge pull request #1301 from guits/fix_1294
Andrew Schoen [Fri, 10 Feb 2017 16:20:14 +0000 (10:20 -0600)]
Merge pull request #1301 from guits/fix_1294

Check if ceph_conf_overrides.global is defined before calling it

8 years agoMerge pull request #1302 from ceph/docker-pull
Andrew Schoen [Fri, 10 Feb 2017 16:18:37 +0000 (10:18 -0600)]
Merge pull request #1302 from ceph/docker-pull

docker: use a better method to pull images

8 years agoSkip facts_mon_fsid.yml if cephx is disabled 1304/head
Guillaume Abrioux [Fri, 10 Feb 2017 09:04:54 +0000 (10:04 +0100)]
Skip facts_mon_fsid.yml if cephx is disabled

If cephx is disabled it is not necessary to include `facts_mon_fsid.yml`
in `roles/ceph-common/tasks/facts.yml`.

Fix: #1300
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
8 years agoMerge pull request #1305 from guits/quick_fix
Andrew Schoen [Fri, 10 Feb 2017 16:02:10 +0000 (10:02 -0600)]
Merge pull request #1305 from guits/quick_fix

bugfix: Add missing conditions for kraken release

8 years agobugfix: Add missing conditions for kraken release 1305/head
Guillaume Abrioux [Fri, 10 Feb 2017 13:58:15 +0000 (14:58 +0100)]
bugfix: Add missing conditions for kraken release

76ddcbc introduced an issue by removing some needed conditions on tasks
that need to be run only on release >= kraken.

8 years agoCheck if ceph_conf_overrides.global is defined before calling it 1301/head
Guillaume Abrioux [Thu, 9 Feb 2017 09:54:49 +0000 (10:54 +0100)]
Check if ceph_conf_overrides.global is defined before calling it

Expand the fix in #1291 to all the playbook in order to get a full coverage.

Fix: #1294
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
8 years agodocker: use a better method to pull images 1302/head
Sébastien Han [Thu, 9 Feb 2017 14:16:39 +0000 (15:16 +0100)]
docker: use a better method to pull images

We changed the way we declare image.
Prior to this patch we must have a "user/image:tag"
format, which is incompatible with non docker-hub registry where you
usually don't have a "user". On the docker hub a "user" is also
identified as a namespace, so for Ceph the user was "ceph".

Variables have been simplified with only:

* ceph_docker_image
* ceph_docker_image_tag

1. For docker hub images: ceph_docker_name: "ceph/daemon" will give
you the 'daemon' image of the 'ceph' user.

2. For non docker hub images: ceph_docker_name: "daemon" will simply
give you the "daemon" image.

Infrastructure playbooks have been modified as well.
The file group_vars/all.docker.yml.sample has been removed as well.
It is hard to maintain since we have to generate it manually. If
you want to configure specific variables for a specific daemon simply
edit group_vars/$DAEMON.yml

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1420207
Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #1284 from ceph/BZ-1418980
Andrew Schoen [Wed, 8 Feb 2017 14:46:03 +0000 (08:46 -0600)]
Merge pull request #1284 from ceph/BZ-1418980

purge-cluster: do not use ceph-detect-init

8 years agoMerge pull request #1289 from ceph/fix-1286
Andrew Schoen [Wed, 8 Feb 2017 12:31:30 +0000 (06:31 -0600)]
Merge pull request #1289 from ceph/fix-1286

rolling-update: detect init system properly

8 years agopurge-cluster: set a default value for fetch_directory if not defined 1284/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>
8 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>
8 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>
8 years agoMerge pull request #1291 from guits/quick_fix
Sébastien Han [Wed, 8 Feb 2017 10:46:31 +0000 (11:46 +0100)]
Merge pull request #1291 from guits/quick_fix

ceph-mon: Fix bug #1242

8 years agoceph-mon: Fix bug #1242 1291/head
Guits [Wed, 8 Feb 2017 09:45:09 +0000 (10:45 +0100)]
ceph-mon: Fix bug #1242

We shouldn't test directly the value of
`ceph_conf_overrides.global.osd_pool_default_pg_num` because this can
cause the playbook to fail if the key `global` is not present in
`ceph_conf_overrides`. Therefore we have to use the facts that have been
defined earlier.

Fix: #1242

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
8 years agoMerge pull request #1281 from ceph/purge-ceph-detect-init
Sébastien Han [Wed, 8 Feb 2017 09:34:56 +0000 (10:34 +0100)]
Merge pull request #1281 from ceph/purge-ceph-detect-init

purge: ability to purge client role

8 years agoMerge pull request #1290 from zhsj/ceph-mirror
Sébastien Han [Wed, 8 Feb 2017 08:04:50 +0000 (09:04 +0100)]
Merge pull request #1290 from zhsj/ceph-mirror

add ceph_mirror variable

8 years agorolling-update: detect init system properly 1289/head
Sébastien Han [Tue, 7 Feb 2017 21:37:29 +0000 (22:37 +0100)]
rolling-update: detect init system properly

Simply use the ansible_service_mgr fact.

Closes: #1286
Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoadd ceph_mirror variable 1290/head
Shengjing Zhu [Wed, 8 Feb 2017 03:41:48 +0000 (11:41 +0800)]
add ceph_mirror variable

Closes: #1282
Signed-off-by: Shengjing Zhu <zsj950618@gmail.com>
8 years agopurge-docker: force image deletion 1281/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>
8 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>
8 years agoMerge pull request #1285 from ceph/BZ-1419814
Sébastien Han [Tue, 7 Feb 2017 21:12:44 +0000 (22:12 +0100)]
Merge pull request #1285 from ceph/BZ-1419814

ceph-common: set ms bind ipv6 = true in ceph.conf when using ipv6

8 years agoceph-common: set ms bind ipv6 = true in ceph.conf when using ipv6 1285/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>
8 years agoMerge pull request #1276 from ceph/tests-osd-failures
Sébastien Han [Fri, 3 Feb 2017 14:38:05 +0000 (15:38 +0100)]
Merge pull request #1276 from ceph/tests-osd-failures

tests: if no osds are created do not error in conftest.py

8 years agoMerge pull request #1267 from ceph/container-systemd
Sébastien Han [Fri, 3 Feb 2017 13:02:53 +0000 (14:02 +0100)]
Merge pull request #1267 from ceph/container-systemd

Container systemd

8 years agodocker: fix monitor addition on kraken 1267/head
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>
8 years agotests: if no osds are created do not error in conftest.py 1276/head
Andrew Schoen [Thu, 2 Feb 2017 18:39:06 +0000 (12:39 -0600)]
tests: if no osds are created do not error in conftest.py

If no OSDs were created the command would fail and because we were using
check_output it would throw an exception and mark all OSD tests as ERROR.
This keeps tests from running that might tell us why the OSDS were not created.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
8 years agoMerge pull request #1264 from ceph/clarify-osd-logs
Sébastien Han [Thu, 2 Feb 2017 13:03:12 +0000 (14:03 +0100)]
Merge pull request #1264 from ceph/clarify-osd-logs

osd: clarify osd scenario prepare sequence

8 years agoMerge pull request #1274 from ceph/skip-check
Sébastien Han [Thu, 2 Feb 2017 11:19:27 +0000 (12:19 +0100)]
Merge pull request #1274 from ceph/skip-check

common: ability to disable handler osd health check

8 years agocommon: ability to disable handler osd health check 1274/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>
8 years agoMerge pull request #1269 from squizzi/fix-readme-conf-override-underscores
Sébastien Han [Thu, 2 Feb 2017 08:48:19 +0000 (09:48 +0100)]
Merge pull request #1269 from squizzi/fix-readme-conf-override-underscores

README: Do not recommend using underscores for opts in ceph_conf_overrides

8 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>
8 years agoREADME: Don't use underscores for opts in ceph_conf_overrides 1269/head
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>
8 years agoMerge pull request #1266 from ceph/issue-1265
Sébastien Han [Wed, 1 Feb 2017 16:40:17 +0000 (17:40 +0100)]
Merge pull request #1266 from ceph/issue-1265

ceph-common: remove absolute path to handler include files

8 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>
8 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>
8 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>
8 years agoceph-common: remove absolute path to handler include files 1266/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>
8 years agoosd: clarify osd scenario prepare sequence 1264/head
Sébastien Han [Wed, 1 Feb 2017 12:59:35 +0000 (13:59 +0100)]
osd: clarify osd scenario prepare sequence

we now use the name of the scenario in the prepare task.

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #995 from ceph/serial-task
Andrew Schoen [Tue, 31 Jan 2017 17:35:56 +0000 (11:35 -0600)]
Merge pull request #995 from ceph/serial-task

common: serialise host restart

8 years agoci: set replica count to 1 since we have a single osd 995/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>
8 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>
8 years agoMerge pull request #1243 from guits/refact_code
Sébastien Han [Tue, 31 Jan 2017 11:07:43 +0000 (12:07 +0100)]
Merge pull request #1243 from guits/refact_code

Remove support of releases prior to Jewel.

8 years agoRemove support of releases prior to Jewel. 1243/head
Guillaume Abrioux [Fri, 20 Jan 2017 09:14:35 +0000 (10:14 +0100)]
Remove support of releases prior to Jewel.

According to #1216, we need to simply the code by removing the
support of anything before Jewel.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
8 years agoRevert "ci: dummy commit to debug"
Sébastien Han [Tue, 31 Jan 2017 08:19:55 +0000 (09:19 +0100)]
Revert "ci: dummy commit to debug"

This reverts commit ff135a50243f35e2345a73de5fb25338dea3d74b.

8 years agoMerge pull request #1254 from ceph/osd-dir-exist
Sébastien Han [Tue, 31 Jan 2017 07:46:22 +0000 (08:46 +0100)]
Merge pull request #1254 from ceph/osd-dir-exist

Osd dir exist and purge fixes

8 years agoceph-common: update apt cache in it's own task 1254/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>
8 years agoci: dummy commit to debug
Sébastien Han [Mon, 30 Jan 2017 14:41:18 +0000 (15:41 +0100)]
ci: dummy commit to debug

Signed-off-by: Sébastien Han <seb@redhat.com>
8 years agoMerge pull request #1257 from clwells/rgw-restart-handler
Sébastien Han [Mon, 30 Jan 2017 13:38:35 +0000 (14:38 +0100)]
Merge pull request #1257 from clwells/rgw-restart-handler

Use ansible_hostname instead of ansible_host in handler

8 years agoMerge pull request #1256 from clwells/rgw-ceph-conf-zone-fix
Sébastien Han [Mon, 30 Jan 2017 13:37:53 +0000 (14:37 +0100)]
Merge pull request #1256 from clwells/rgw-ceph-conf-zone-fix

Using ini_file + ansible_hostname for rgw_zone setting

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agoUse hostname instead of host (host can be an IP) and hostname matches the default... 1257/head
Chris Wells [Sat, 28 Jan 2017 18:09:03 +0000 (13:09 -0500)]
Use hostname instead of host (host can be an IP) and hostname matches the default nomenclature in ceph.conf

8 years agoUsing ini_file with ansible_hostname to ensure each INI block gets the rgw_zone setti... 1256/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).