Commit Graph

40 Commits (b264bfece0b88eca8db95cb997c51df680d8f5fc)

Author SHA1 Message Date
Andy McCrae 4671b9e74e Allow ceph service systemd overrides to be specified
ceph services can fail to start under certain circumstances (for
example, when running in a container) because the default systemd
service configuration causes namespace issues.

To work around this we can override the system service settings by
placing an overrides file in the ceph-<service>@.service.d directory.
This can be generic so as to allow any potential changes required to
the ceph-<service> service files.

The overrides file is only setup when the
"ceph_<service>_systemd_overrides" config_template override variable is
specified.

The available service systemd override files are as follows:
ceph_mds_systemd_overrides
ceph_mgr_systemd_overrides
ceph_mon_systemd_overrides
ceph_osd_systemd_overrides
ceph_rbd_mirror_systemd_overrides
ceph_rgw_systemd_overrides
2017-08-16 17:57:06 +01:00
WingkaiHo 6ad8288c91 enable ceph-mon.target service after monitor start
ceph-create-keys unit file was removed here:

* 8bcb4646b6
* dc5fe8d415

As a consequence the systemctl preset command now fails to run since the
unit does not exist anymore. Due to the redirection in /dev/null we
don't know what's happening.

Ultimately the mon unit doesn't get enabled and the mon service won't
start after reboot.
Removing the old/non-existent unit makes the command succeed now.

ceph fix: https://github.com/ceph/ceph/pull/14226

Signed-off-by: WingkaiHo <sanguosfiang@163.com>
Co-Authored-By: Sébastien Han <seb@redhat.com>
2017-04-06 16:58:32 +02: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
tynorth-cisco 704b49ba33 use monitor name, not host ansible host in ceph.conf
in ceph-common there is a fact check for monitor name
that will set it to ansible_host or ansible_fqdn
2016-12-19 12:33:38 -08:00
Sébastien Han 93c3988bfe mon: remove collect keys
Once the monitor process starts it will also trigger `ceph-create-keys`
which will collect the admin key and bootstrap keys. We used to force
this command because we were having issues on some distros like centos
7.0 and 7.1 not triggering this. This is fixed on centos 7.2 and not an
issue on ubuntu 14.04 or 16.04 so we can remove this task. If the
monitor hangs or fails to start the playbook will fail right after at
the "wait for client.admin key exists" task after 300sec.

Closes: #1161

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-07 14:38:39 +01:00
James Saint-Rossy d36a99e41b Used list style ands for better readibility and fixed legacy debian checks 2016-09-26 09:19:15 -04:00
James Saint-Rossy d4a60a9394 Added ceph_release generation and fixed missing whitespace in ceph_release checks 2016-09-09 18:16:41 -04:00
James Saint-Rossy 666637f715 Replaced is_before is_after is_ booleans with numerical version dictionary 2016-09-09 17:34:26 -04:00
James Saint-Rossy f52be23770 Prevent local_action from requiring root 2016-09-02 19:31:59 -04:00
James Saint-Rossy 7e284920d1 Fixes for Hammer install and added numerical release checks 2016-08-24 00:23:47 -04:00
Daniel Lin 08766a243a Allow ceph-ansible to be run on a locally built/installed Ceph
-First install ceph into a directory with CMake
	cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DWITH_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX:PATH:=/usr <ceph_src_dir> && make DESTDIR=<install_dir> install/strip

-Ceph-ansible copies over the install_dir

-User can use rundep_installer.sh to install any runtime dependencies that ceph needs onto the machine from rundep
2016-08-12 10:02:15 -04:00
Sébastien Han 4219221bf4 ceph-mon: fix wrong indent
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-06-09 15:35:57 +02:00
Sam Yaple 069c93a238 Unify formatting of when conditional
This is purely a refactor. Converts when 'and' conditionals into lists
rather than multiline strings. This does not work for nested
conditionals, but those can be formated with indents.

Moves one line when statements onto the same line as the when command
itself.

A small logic bug was found in ceph-osd/tasks/check_devices.yml which
which was also fixed.

Signed-off-by: Sam Yaple <sam@yaple.net>
2016-05-09 14:08:33 +00:00
Sébastien Han c8e5e49552 ceph-mon: fix monitor startup
Somehow on CentOS 7.2 with Jewel, the service enablement by the Ansible service module
does not seem to work properly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-05-09 00:41:44 +02:00
Andrew Schoen 20d2d52ebd use the use_systemd fact when starting monitors
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-05-05 13:56:32 -05:00
Alfredo Deza 50377e19b4 ceph-mon: port start_monitor task to use new ceph version facts
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-27 13:46:57 -04:00
James Saint-Rossy fc270bb772 fixed handling of new ceph_version 2016-04-12 21:26:59 -04:00
Sébastien Han 450feaac0a ceph: implement cluster name support
we now have the ability to enable the `cluster` variable with a specific
value that will determine the name of the cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-30 18:08:38 +02:00
Sébastien Han 378aadf3e3 ceph-mon/mds: fix fqdn
closes #596

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-03 21:23:14 +01:00
Chris St. Pierre e8ca637903 Skip keyring tasks when cephx is disabled
Skip a number of ceph keyring-related tasks (or remove the keyring
portion of some tasks) when cephx is disabled. Specifically, avoid
generating the initial keyring, which only clutters up the ansible
repo if cephx is not in use.
2016-02-25 10:18:18 -06:00
Guillaume Abrioux dcec63adc8 Refact code using `set_fact`
At the moment, all the tasks using the file module are duplicated to have differents ownerships depending on the fact `is_ceph_infernalis`.
The goal of this commit is to have a new logic for this:
- First set facts depending on the `is_ceph_infernalis` fact
- Create the files or directories using the setted facts as ownerships.
2016-02-05 16:14:01 +01:00
Huamin Chen 63bd78c12a review feedback: convert to yml format
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-13 14:13:30 +00:00
Huamin Chen 519a9e91b1 make systemd enable work for osd instance
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-13 00:40:56 +00:00
Huamin Chen 99c429930e make systemd enable work for mon instance
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-12 20:12:40 +00:00
Sébastien Han e6a9727478 Support infernalis for rh storage
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-15 22:07:45 +01:00
Eric Cook 46af3496d4 Add ceph_stable_releases array to ceph-common/defaults/main.yml
rework the various `when' tests to use that array.
2015-12-09 15:52:23 -05:00
Eric Cook ab884c7cb2 fixes ceph_stable_release logic mentioned in issue #446
I changed the argument used for starting the mds server. (pre
infernalis)
```
service ceph start mds
```
errors, while
```
service ceph start mds.$hostname
```
correctly starts the service.

I changed the mds directory ownership from ceph:cephh to root:root
again, for pre-infernalis.

And finally, add the ceph_stable_releases checks for the upstart
activation task `for or after infernalis release'.
2015-12-04 17:36:24 -05:00
Eike Frost d49e8bd904 Add systemd-specific start/restart tasks/handlers for el7/infernalis 2015-11-20 22:34:29 +01:00
Sébastien Han 2fa995a889 Use new Infernalis release
Add proper fixes for the new ceph user and dir/files permissions

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-18 11:47:38 +01:00
Michael Sambol e424966cbf Refactor ceph monitor role 2015-10-18 20:08:06 -05:00
Abhishek Varshney e142c21776 removed when condition in ceph-create-keys 2015-08-17 18:59:14 +05:30
Leseb 1c683a9366 Merge pull request #336 from ceph/re-arrange-dir
Re-arrange roles
2015-07-24 16:25:42 +02:00
leseb f1e6b0216d Re-arrange roles
Trying to add more clarity in the role's task structure.

Signed-off-by: leseb <seb@redhat.com>
2015-07-24 14:50:32 +02:00
leseb 518785d113 Fix ceph version return code issue
fixes: #258

Signed-off-by: leseb <seb@redhat.com>
2015-07-24 12:36:45 +02:00
leseb 7fdc2b1d36 Use more variable check
Fail early if a variable is not defined.

Signed-off-by: leseb <seb@redhat.com>
2015-07-03 21:38:30 +02:00
leseb 4463c68ebd Fixes rgw and mon startup on red hat
closes: #297, #264, #265 and #301

Signed-off-by: leseb <seb@redhat.com>
2015-06-30 19:19:08 +02:00
leseb 4a2c7ae0c1 Cosmetic
Add more visibility for the 'when' statement.

Signed-off-by: leseb <seb@redhat.com>
2015-06-26 14:48:05 +02:00
Sébastien Han 8b39214ab8 Consmetic changes
This branch has been sitting on my local repo for a while. I guess I had
time to spend on a plane :).

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-05-15 18:27:41 +02:00
Sébastien Han d20288c3c2 Only change when the task returns false
We only want to see things that really changed after a play completes.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-04-08 18:46:54 +02:00
Sébastien Han b6b8437a7a Activate either sysvinit or upstart
Depending on the distro, init scripts will look for different files to
be available on the ceph data dir.
Fixing the upstart support here.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-03-26 18:23:58 +01:00