Commit Graph

2352 Commits (cb504f6d88b0259ec8a4b6cad8bc9ed9a25c2d14)
 

Author SHA1 Message Date
Andrew Schoen 4ff5908758 Merge pull request #1289 from ceph/fix-1286
rolling-update: detect init system properly
2017-02-08 06:31:30 -06:00
Andrew Schoen 865b4500dc purge-cluster: set a default value for fetch_directory if not defined
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-02-08 06:25:43 -06:00
Andrew Schoen adf6aee643 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>
2017-02-08 06:25:43 -06:00
Andrew Schoen 0476b24af1 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>
2017-02-08 06:24:44 -06:00
Sébastien Han 0617f92df5 Merge pull request #1291 from guits/quick_fix
ceph-mon: Fix bug #1242
2017-02-08 11:46:31 +01:00
Guits df162a61b1 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>
2017-02-08 10:46:46 +01:00
Sébastien Han a52228fa43 Merge pull request #1281 from ceph/purge-ceph-detect-init
purge: ability to purge client role
2017-02-08 10:34:56 +01:00
Sébastien Han 98fd05fa41 Merge pull request #1290 from zhsj/ceph-mirror
add ceph_mirror variable
2017-02-08 09:04:50 +01:00
Sébastien Han 8f94bfb498 rolling-update: detect init system properly
Simply use the ansible_service_mgr fact.

Closes: #1286

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-08 08:52:05 +01:00
Shengjing Zhu 7e10b0325b add ceph_mirror variable
Closes: #1282

Signed-off-by: Shengjing Zhu <zsj950618@gmail.com>
2017-02-08 13:13:31 +08:00
Sébastien Han c34d0a9d28 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>
2017-02-07 22:14:21 +01:00
Sébastien Han 72cd9199ac purge: ability to purge client role
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-07 22:14:18 +01:00
Sébastien Han 1b58afce7f Merge pull request #1285 from ceph/BZ-1419814
ceph-common: set ms bind ipv6 = true in ceph.conf when using ipv6
2017-02-07 22:12:44 +01:00
Andrew Schoen 9580fd974a 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>
2017-02-07 12:34:29 -06:00
Sébastien Han 7ad7666eab Merge pull request #1276 from ceph/tests-osd-failures
tests: if no osds are created do not error in conftest.py
2017-02-03 15:38:05 +01:00
Sébastien Han 55abf69481 Merge pull request #1267 from ceph/container-systemd
Container systemd
2017-02-03 14:02:53 +01:00
Sébastien Han 2ed93875a9 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>
2017-02-03 11:35:54 +01:00
Andrew Schoen d02f14a329 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>
2017-02-02 12:39:06 -06:00
Sébastien Han 064c57babb Merge pull request #1264 from ceph/clarify-osd-logs
osd: clarify osd scenario prepare sequence
2017-02-02 14:03:12 +01:00
Sébastien Han 788858b0cf Merge pull request #1274 from ceph/skip-check
common: ability to disable handler osd health check
2017-02-02 12:19:27 +01:00
Sébastien Han c4331d87b3 common: ability to disable handler osd health check
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-02 11:22:55 +01:00
Sébastien Han 4ce32b6d92 Merge pull request #1269 from squizzi/fix-readme-conf-override-underscores
README: Do not recommend using underscores for opts in ceph_conf_overrides
2017-02-02 09:48:19 +01:00
Sébastien Han 6d5afdfb99 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>
2017-02-02 09:32:12 +01:00
Kyle Squizzato 8b71de086d 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>
2017-02-01 13:46:28 -05:00
Sébastien Han d7cc546924 Merge pull request #1266 from ceph/issue-1265
ceph-common: remove absolute path to handler include files
2017-02-01 17:40:17 +01:00
Sébastien Han cb499a689b 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>
2017-02-01 17:19:07 +01:00
Sébastien Han f446b1c82f 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>
2017-02-01 17:18:17 +01:00
Sébastien Han 40709c8336 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>
2017-02-01 17:12:46 +01:00
Andrew Schoen 873c044c53 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>
2017-02-01 09:22:26 -06:00
Sébastien Han 5578b9bc7b 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>
2017-02-01 13:59:35 +01:00
Andrew Schoen e563c12672 Merge pull request #995 from ceph/serial-task
common: serialise host restart
2017-01-31 11:35:56 -06:00
Sébastien Han 6e9da95b33 ci: set replica count to 1 since we have a single osd
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-31 17:39:55 +01:00
Sébastien Han 40a2df5bbf 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>
2017-01-31 17:39:51 +01:00
Sébastien Han efc49e2347 Merge pull request #1243 from guits/refact_code
Remove support of releases prior to Jewel.
2017-01-31 12:07:43 +01:00
Guillaume Abrioux 76ddcbc271 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>
2017-01-31 11:00:54 +01:00
Sébastien Han 549a25c5bc Revert "ci: dummy commit to debug"
This reverts commit ff135a5024.
2017-01-31 09:19:55 +01:00
Sébastien Han f888cc4e06 Merge pull request #1254 from ceph/osd-dir-exist
Osd dir exist and purge fixes
2017-01-31 08:46:22 +01:00
Andrew Schoen 7dc9c4b5b6 ceph-common: update apt cache in it's own task
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-30 17:15:08 -06:00
Sébastien Han ff135a5024 ci: dummy commit to debug
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-30 16:12:36 +01:00
Sébastien Han 837ca9eaff Merge pull request #1257 from clwells/rgw-restart-handler
Use ansible_hostname instead of ansible_host in handler
2017-01-30 14:38:35 +01:00
Sébastien Han 9112895334 Merge pull request #1256 from clwells/rgw-ceph-conf-zone-fix
Using ini_file + ansible_hostname for rgw_zone setting
2017-01-30 14:37:53 +01:00
Sébastien Han 1149825f8f 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>
2017-01-30 14:31:56 +01:00
Sébastien Han d5dd658cfa 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>
2017-01-30 14:31:56 +01:00
Sébastien Han cb57a359ba 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>
2017-01-30 14:31:56 +01:00
Sébastien Han e371bd591c 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>
2017-01-30 14:31:56 +01:00
Sébastien Han 0e2e270ab2 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>
2017-01-30 14:31:56 +01:00
Sébastien Han 6f53774ee9 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>
2017-01-30 14:31:56 +01:00
Chris Wells 84c322550a
Use hostname instead of host (host can be an IP) and hostname matches the default nomenclature in ceph.conf 2017-01-28 13:09:03 -05:00
Chris Wells 8b2dace29b
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). 2017-01-28 12:30:27 -05:00
Sébastien Han 0d2e580768 Merge pull request #1250 from ceph/new-tests
CI testing updates
2017-01-27 14:30:45 +01:00