Commit Graph

1087 Commits (8574c161e28c81645a0434ada4d89fd7177ce07a)

Author SHA1 Message Date
Sébastien Han c9e333f750 Merge pull request #1347 from ceph/no-vfs-cache-pressure
avoid setting vfs_cache_pressure
2017-03-08 18:02:06 +01:00
Sébastien Han b55a0702c2 Merge pull request #1335 from batrick/mon-fs-cmd-1mon
send fs commands to one mon
2017-03-07 16:45:16 +01:00
Sébastien Han 703e82f277 Merge pull request #1339 from ceph/rgw-remove-sudo
rgw: remove sudoers file
2017-03-07 16:44:28 +01:00
Ken Dreyer a77cd4be5e avoid setting vfs_cache_pressure
From Josh Durgin, "I'd recommend not setting vfs_cache_pressure in
ceph-ansible. The syncfs issue is still there, and has caused real
problems in the past, whereas there hasn't been good data showing lower
vfs_cache_pressure is very helpful - the only cases I'm aware of have
shown it makes little difference to performance."

https://bugzilla.redhat.com/show_bug.cgi?id=1395451
2017-03-03 11:20:05 -07:00
Ken Dreyer f9a317ef30 check_system: improve RHCS support message and version comparison
"red hat storage" -> "red hat ceph storage"

"RHEL 7.1" -> "RHEL 7"

and make the version number check verify the very latest version

https://bugzilla.redhat.com/show_bug.cgi?id=1354059
2017-03-03 09:57:16 -07:00
Guillaume Abrioux 66b59ea9c6 docker: Fix #1303
Install package from official repos rather than pip when using RHEL.

This commit fix https://bugzilla.redhat.com/show_bug.cgi?id=1420855

Also this commit Refact all `roles/ceph-*/tasks/docker/pre_requisite.yml`
to avoid a lot of duplicated code.

Fix: #1303
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-03-03 10:49:13 +01:00
Sébastien Han 88c6296fa2 rgw: remove sudoers file
This was needed for Hammer and older version, not needed anymore since
we have a 'ceph' user to run ceph processes.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-03-02 14:59:21 +01:00
Patrick Donnelly 56d8367339
send fs commands to one mon
Add-on to #1329.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-03-01 11:05:56 -05:00
Guillaume Abrioux e00b745a6c 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>
2017-02-24 09:11:52 +01:00
Sébastien Han 458a9ad5c3 mon: docker, ability to enable centos extra repo
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:56:09 -05:00
Sébastien Han 72b17d2480 docker: osd, clarify variable usage for scenarii
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:56:09 -05:00
Sébastien Han b91d227b99 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>
2017-02-21 15:56:09 -05:00
Sébastien Han 73cf0378c2 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>
2017-02-21 15:54:36 -05:00
Sébastien Han dd548c6034 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>
2017-02-21 15:54:36 -05:00
Andrew Schoen 6cf842eb39 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>
2017-02-21 12:35:00 -06:00
Andrew Schoen 1579642e3f 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>
2017-02-21 12:31:26 -06:00
Andrew Schoen 920bd9cf2d 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>
2017-02-21 12:31:26 -06:00
Sébastien Han effefe91d5 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>
2017-02-21 12:00:37 -05:00
Sébastien Han 7c79e09424 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>
2017-02-20 17:07:53 -05:00
Shengjing Zhu 32923fd217 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>
2017-02-20 16:35:56 +08:00
Sébastien Han cc769464d0 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>
2017-02-16 18:31:32 +01:00
Sébastien Han 978093d843 Merge pull request #1304 from guits/fix_1300
Skip facts_mon_fsid.yml if cephx is disabled
2017-02-11 13:14:07 +01:00
Andrew Schoen c5a5658e09 Merge pull request #1301 from guits/fix_1294
Check if ceph_conf_overrides.global is defined before calling it
2017-02-10 10:20:14 -06:00
Andrew Schoen 94ac749918 Merge pull request #1302 from ceph/docker-pull
docker: use a better method to pull images
2017-02-10 10:18:37 -06:00
Guillaume Abrioux 11bae8b252 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>
2017-02-10 17:04:32 +01:00
Guillaume Abrioux e63631a4ab 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.
2017-02-10 15:14:54 +01:00
Guillaume Abrioux 4295d427b9 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>
2017-02-09 20:28:58 +01:00
Sébastien Han c2f1dca823 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>
2017-02-09 17:57:18 +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
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
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 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
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 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 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
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
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
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 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 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 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 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