Commit Graph

574 Commits (bbe6f752e828b94fcfa25ad590ceddd420f8de77)

Author SHA1 Message Date
Sébastien Han 833d16c068 Merge pull request #1379 from D3N14L/fix_1299
Use ansible uri module instead of shell module with curl
2017-03-21 09:43:10 +01:00
Daniel Marks 2ed94d914c Use ansible uri module instead of shell module with curl
This fixes issue #1299. According to @ktdreyer s comment in the ticket,
he fixed the web server config so also older (non-SNI) python clients
can use the uri module here.
2017-03-16 23:16:30 +01:00
Christian Zunker 349b9ab3e7 Make ceph-common aware off 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.

Signed-off-by: Christian Zunker <christian.zunker@codecentric.de>
2017-03-16 09:50:08 +01:00
Ken Dreyer bf57efaf3c ceph-common: install nfs-ganesha FSALs on Debian
Prior to this change, ceph-ansible would install the main NFS Ganesha
server daemon on Ubuntu, but it would skip the Ceph FSALs.

Running "apt-get install nfs-ganesha" will only install the main NFS Ganesha
server. It does *not* pull in the RGW FSAL
(/usr/lib/x86_64-linux-gnu/ganesha/libfsalrgw.so)

Running "apt-get install nfs-ganesha-fsal" will install the RGW FSAL as
well as the main NFS Ganesha server package.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2017-03-14 08:37:45 -06:00
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
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
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 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
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
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
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 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
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 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
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 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
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
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
Logan V 8edc2663d9 RGW: Add support for usage log configuration
Adds support for configuring the RadosGW usage log described at
http://docs.ceph.com/docs/jewel/man/8/radosgw/#usage-logging.
2017-01-19 11:15:18 -06:00
Andrew Schoen e2a18af5b3 Merge pull request #1227 from Logan2211/resync-group-vars-sample
Remove libcephfs1 from group_vars sample
2017-01-19 09:57:54 -06:00
Andrew Schoen 25277587fa ceph-common: include ceph_docker_registry when fetching the image
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-16 09:51:20 -06:00
Logan V c78a3707f1 Remove libcephfs1 from group_vars sample
The libcephfs1 package was removed from ceph-common in
cb1c06901e, however it was not synced
to group_vars/all.yml.sample using the `generate_group_vars_sample.sh`
script. This fixes up the comment formatting in the ceph-common
defaults and brings the group_vars sample back into sync.
2017-01-16 09:15:57 -06:00
Ken Dreyer 63e5b5c406 ceph-common: always include release.yml
Prior to this change, a playbook run with '--tags' or '--skip-tags'
would fail, because the ceph-common role would not include the
release.yml task, and this file defines critical things like
ceph_release.

Thanks Andrew Schoen <aschoen@redhat.com> for help with the fix.
2017-01-05 14:40:39 -07:00
Sébastien Han cb1c06901e Merge pull request #1171 from cbodley/wip-libcephfs2
bump package version to libcephfs2
2017-01-03 10:48:56 +01:00
Sébastien Han 676d8812f9 Merge pull request #1212 from ceph/cluster-name-info
common: document "cluster" variable usage
2017-01-03 10:18:41 +01:00
Sébastien Han b76d0aceca common: document "cluster" variable usage
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1408848

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-02 09:20:43 +01:00
Shengjing Zhu 93a8b69a57 fix check nmapexist on debian
command is a shell-buitin, so `command -v nmap` must use shell module

Signed-off-by: Shengjing Zhu <zsj950618@gmail.com>
2016-12-28 16:21:23 +08:00
Sébastien Han d44927de03 common: rename rh_storage to rhcs to match product name
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-20 13:49:11 +01:00
Sébastien Han 775d61ed09 common: enable tool repo for mds install of rhcs
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1405985

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-20 13:42:24 +01:00
Sébastien Han fd4fb8d5b2 Merge pull request #1199 from Logan2211/fix-mon-fsid-block
Workaround for broken 'block' syntax
2016-12-19 11:30:58 +01:00
Andrew Schoen 99d66e09d9 Merge pull request #1153 from ceph/cluster-name-test
test: add cluster name support test scenario
2016-12-16 13:10:52 -06:00
Logan V ffc89ee95f Workaround for broken 'block' syntax
The block syntax in ansible is broken on 2.1 so we work around the
issue introduced in 471be5e by using a task file include.
2016-12-16 09:24:48 -06:00
Sébastien Han dcd94f6c52 Merge pull request #1179 from Logan2211/rgw-keystone-v3
RGW/Keystone integration improvements
2016-12-16 13:52:52 +01:00
Sébastien Han 6c71cf5b10 common: do not become root on local task
There is no need to become root on local_action. This will event trigger
an error on some systems as it will try to run a sudo command. If the
current user does not have passwordless sudo, Ansible will fail. Anyway
using the current user is perfectly fine and no elevation privilege is
needed.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-16 11:42:07 +01:00
Logan V cccdb2ab13 Add support for Keystone v3 API
The Keystone v2 APIs are deprecated and scheduled to be removed in
Q release of Openstack. This adds support for configuring RGW to
use the current Keystone v3 API.
2016-12-15 17:17:41 -06:00
Logan V aa0bfaa89a Add a switch to disable nss PKI database initialization
The PKI keys are used to decrypt the Keystone revocation list when
PKI tokens are used. When UUID or Fernet token providers are used in
Keystone, PKI certs may not exist, so we now accommodate this scenario
by allowing the operator to disable the PKI tasks.
2016-12-15 17:17:41 -06:00
Logan V 12f8b5c38e Add support for Keystone user authentication with RGW
Jewel added support for user/pass authentication with Keystone,
allowing deployers to disable Keystone admin token as required
for production deployments.

This implements configuration for the new RGW Keystone user/pass
authentication feature added in Jewel.

See docs here: http://docs.ceph.com/docs/master/radosgw/keystone/
2016-12-15 17:17:37 -06:00
Sébastien Han f0687995e1 common: add the name of the ceph conf file in the play
Just for clarity and because we can we now show the name of the
ceph configuration file that is generated.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-15 15:26:01 +01:00
Guillaume Abrioux 471be5e629 common: do not regenerate initial mon keyring if cluster exists
This commit solves the situation where you lost your fetch directory and
you are running ansible against an existing cluster. Since no fetch
directory is present the file containing the initial mon keyring
doesn't exist so we are generating a new one.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2016-12-15 14:39:56 +01:00
Sébastien Han 3776c23b9a common: remove uncessary conditions and spell red hat entirely
We do not need to run another condition for 'ceph_rhcs' since the
include we came from already has it, so we are already inside this
condition.
We also spell red hat entirely instead of rh and we remove capital
letters.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-14 19:03:04 +01:00