Commit Graph

12 Commits

Author SHA1 Message Date
Nathan Cutler
53b1a6799c systemd: enable all the ceph .target services by default
Some distros, like Fedora and openSUSE, have a policy that all services are
disabled by default.

This patch changes that default for the ceph.target and
ceph-{mds,mon,osd,radosgw}.target services.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Boris Ranto <branto@redhat.com>
2016-04-27 14:20:29 +02:00
Jason Dillaman
8a0e47281f systemd: new ceph-rbd-mirror scripts
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-18 17:51:23 -04:00
Sage Weil
9da41fee1a systemd/ceph-radosgw-prestart.sh: remove
This is unpackaged and unused.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-02-04 17:48:16 -05:00
Sage Weil
a12efa204e Merge pull request #6276 from david-z/wip-systemd-finegrain-ceph-service
systemd: start/stop/restart ceph services by daemon type

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Sage Weil  <sage@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-11-28 08:25:40 -05:00
Boris Ranto
9224ac2ad2 rbdmap: systemd support
Fixes: #13374
Signed-off-by: Boris Ranto <branto@redhat.com>
2015-11-06 10:26:22 +01:00
Zhi Zhang
cfa2d0a08a fine-grained control systemd to start/stop/restart ceph services at once
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
2015-10-26 15:13:19 +08:00
Sage Weil
8e13d89f0f systemd: eliminate ceph-rgw tmpfiles.d file
This is for storing the rgw socket files for fastcgi, which we do not
want to enable by default.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-14 14:00:26 -04:00
Sage Weil
f1b80e99b0 systemd: consolidate into a single ceph-disk@.service
This simple service will 'ceph-disk trigger DEV --sync'.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-01 11:22:25 -04:00
David Disseldorp
85a894697e systemd: activate disks via systemd service instead of udev
The udev(7) man page states:
  RUN
  ...
  This can only be used for very short-running foreground tasks. Running
  an event process for a long period of time may block all further
  events for this or a dependent device.

  Starting daemons or other long-running processes is not appropriate
  for udev; the forked processes, detached or not, will be
  unconditionally killed after the event handling has finished.

ceph-disk activate is far from a short-running task:
- check whether path is a block dev, for dirs call through to
  activate_dir()
- call blkid to obtain the filesystem type for the block dev
- pull mount options from hard-coded ceph.conf file
- mount the OSD dev at a temporary path
- check the ceph magic for mounted filesystem
- read cluster uuid and locate corresponding /etc/ceph/{cluster}.conf
  path
- read or generate (if missing) the OSD uuid
- create a file indicating init system usage (systemd)
- mount the device at a second (final) location
- umount (lazy) the temporary mount path
- enable the systemd ceph-osd@{osd_id} service
- start the systemd ceph-osd@{osd_id} service

This logic is therefore best left in a systemd service for execution. As
it is less limited in terms of execution time, and also allows for
improved event handling in future (fsck, dmcrypt mapping etc.).

This change sees 95-ceph-osd.rules.systemd trigger ceph-disk activate or
ceph-disk activate-journal via new ceph-disk-activate-journal@.service,
ceph-disk-activate@.service and ceph-disk-dmcrypt-activate@.service
systemd service files.

ceph-disk-dmcrypt-activate@.service makes use of the newly added
--dmcrypt parameter for ceph-disk activate.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2015-08-01 09:58:34 -04:00
Sage Weil
6842a20915 systemd: add ceph-create-keys@ service
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:33 -04:00
Sage Weil
43d6b12149 system: include all unit files
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:33 -04:00
Owen Synge
1ba4694d7e Autotools to install systemd unit files.
To simplify the spec file we should install as much using autotools
and as little as possible in the spec file.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:33 -04:00