]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd: enable all the ceph .target services by default
authorNathan Cutler <ncutler@suse.com>
Tue, 19 Apr 2016 12:51:01 +0000 (14:51 +0200)
committerNathan Cutler <ncutler@suse.com>
Thu, 28 Apr 2016 08:20:14 +0000 (10:20 +0200)
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>
(cherry picked from commit 53b1a6799c2ce08acc8382e4aa996d1bde700316)

ceph.spec.in
systemd/50-ceph.preset [new file with mode: 0644]
systemd/Makefile.am

index 26928f7b7e875b9b91c7ea40e45bbdb059368360..409959672ee93dd1e5df54acfedb55dc4ad3bff4 100644 (file)
@@ -773,6 +773,7 @@ install -m 0644 -D etc/sysconfig/ceph $RPM_BUILD_ROOT%{_localstatedir}/adm/fillu
   install -m 0644 -D systemd/ceph-rbd-mirror.target $RPM_BUILD_ROOT%{_unitdir}/ceph-rbd-mirror.target
   install -m 0644 -D systemd/ceph-disk@.service $RPM_BUILD_ROOT%{_unitdir}/ceph-disk@.service
   install -m 0755 -D systemd/ceph $RPM_BUILD_ROOT%{_sbindir}/rcceph
+  install -m 0644 -D systemd/50-ceph.preset $RPM_BUILD_ROOT%{_libexecdir}/systemd/system-preset/50-ceph.preset
 %else
   install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap
   install -D src/init-ceph $RPM_BUILD_ROOT%{_initrddir}/ceph
@@ -845,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/cephfs
 %if 0%{?_with_systemd}
 %{_unitdir}/ceph-create-keys@.service
+%{_libexecdir}/systemd/system-preset/50-ceph.preset
 %else
 %{_initrddir}/ceph
 %endif
diff --git a/systemd/50-ceph.preset b/systemd/50-ceph.preset
new file mode 100644 (file)
index 0000000..ee86f15
--- /dev/null
@@ -0,0 +1,5 @@
+enable ceph.target
+enable ceph-msd.target
+enable ceph-mon.target
+enable ceph-osd.target
+enable ceph-radosgw.target
index a6aecc9a26ad4f2881c6347bfed0979083ccaac3..9483fe226e05b51d5705ec9fae0240098811caad 100644 (file)
@@ -21,4 +21,5 @@ unit_DATA = $(unitfiles)
 EXTRA_DIST = \
        $(unitfiles) \
        ceph \
-       ceph.tmpfiles.d
+       ceph.tmpfiles.d \
+       50-ceph.preset