Commit Graph

2578 Commits (88df105d0b13f2a245666409cafd752d0176ecc3)
 

Author SHA1 Message Date
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
Sébastien Han 6a3d0e3711 Merge pull request #1252 from font/docker_extra_env_vars
Docker extra env vars
2017-01-27 14:19:00 +01:00
Andrew Schoen 2a87c13f17 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>
2017-01-27 06:12:10 -06:00
Andrew Schoen d3cb8dba4e 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>
2017-01-27 05:23:17 -06:00
Ivan Font 0298354137 Update to use consistent docker extra env vars
This playbook was still referencing the old version of the
ceph_*_docker_extra_env but only for Ceph MONs and Ceph NFS. This
playbook was not kept up-to-date when updating the
ceph_*_docker_extra_env variables to add the '-e' option to docker.
That's because the addition of '-e' breaks this playbook as it requires
a comma separated list of variables for the 'env:' docker module
parameter. Therefore this change just makes the playbook consistently
broken by referencing the same variable throughout.
2017-01-26 15:57:34 -08:00
Ivan Font 0f79376949 Remove reference to old OSD docker extra env vars
This variable is already defined as a global default in the OSD role and
was not being kept in sync as we now require the '-e' parameter prefixed
to each variable. This was also missing the CLUSTER environment variable
that is defined in the global default version of
ceph_osd_docker_extra_env.
2017-01-26 15:53:39 -08:00
Ivan Font 0c59d7cdcd Update all docker sample extra environment vars
Bring docker sample extra environment variables in sync with the global
defaults for each role. Previous definitions were no longer used.
2017-01-26 15:50:49 -08:00
Andrew Schoen b2a6f095f1 purge-cluster: fix syntax when deleting dmcrypt devices
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-26 11:28:30 -06:00
Andrew Schoen e05df64fd0 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>
2017-01-26 10:41:29 -06:00
Andrew Schoen 20705aa35a 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>
2017-01-26 09:39:42 -06:00
Andrew Schoen 625ee0952e Merge pull request #1214 from ceph/rbd-pool-size
mon: make sure osd_pool_default_size is honoured
2017-01-25 17:10:29 -06:00
Andrew Schoen 059eaf6963 Merge pull request #1235 from ceph/purge
Purge
2017-01-25 16:22:28 -06:00
Sébastien Han e35070f6ce 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>
2017-01-25 22:53:17 +01:00
Sébastien Han 73ca1a7a00 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
2017-01-25 22:32:46 +01:00
Sébastien Han 1cf5c36ee4 Merge pull request #1247 from ceph/BZ-1416010
Adds ip_version configuration option
2017-01-24 18:22:42 +01:00
Andrew Schoen 03cb803bd1 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
2017-01-24 09:48:55 -06:00
Sébastien Han 055aefa117 Merge pull request #1246 from tynorth-cisco/unique-pools
add unique filter to openstack pool names
2017-01-24 12:08:51 +01:00
tynorth-cisco 6400989cf2 add unique filter to openstack pool names
could have scenario where different openstack components would
use the same pool, but the logic would create the same pool
more than once

add unique filter to account for this
2017-01-23 11:58:28 -08:00
Andrew Schoen c4161df38b Merge pull request #1146 from ceph/client-pool
mon: pool creation and pgs
2017-01-23 10:17:21 -06:00
Andrew Schoen a774ea025d tests/xenial_cluster: adds a client node
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-23 09:22:06 -06:00
Sébastien Han 48a8cd1a43 test: add tests for the client role
Here we test the client role.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-20 12:22:18 +01:00
Sébastien Han 1c998b41ad Merge pull request #1226 from Logan2211/enhance-rgw-config
Enhance RGW config options
2017-01-20 10:58:14 +01:00
Logan V cd50cd8f18 RGW: Add resolve cname configuration parameter
Adds a switch to enable bucket resolution using DNS CNAME provided
by the client's HTTP headers.
2017-01-19 11:15:18 -06:00
Logan V 4941de838c RGW: Add static website hosting configuration 2017-01-19 11:15:18 -06:00
Logan V 6f3a98919c RGW: Allow configurable rgw frontends setting
Allow for more operator flexibility in the `rgw frontends` setting
while maintaining backwards compatibility with the old vars. This
allows an operator to, for example, use the civetweb settings for
implementing SSL ports.

For available civetweb configuration parameters, see:
https://github.com/civetweb/civetweb/blob/master/docs/UserManual.md
2017-01-19 11:15:18 -06:00