From 53b1a6799c2ce08acc8382e4aa996d1bde700316 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Tue, 19 Apr 2016 14:51:01 +0200 Subject: [PATCH] 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 Signed-off-by: Boris Ranto --- ceph.spec.in | 2 ++ systemd/50-ceph.preset | 5 +++++ systemd/Makefile.am | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 systemd/50-ceph.preset diff --git a/ceph.spec.in b/ceph.spec.in index 18bd7a695d6..c1735cf4484 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -760,6 +760,7 @@ install -m 0644 -D etc/sysconfig/ceph $RPM_BUILD_ROOT%{_localstatedir}/adm/fillu %if 0%{?_with_systemd} install -m 0644 -D systemd/ceph.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/ceph-common.conf 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 @@ -831,6 +832,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 index 00000000000..ee86f153bce --- /dev/null +++ b/systemd/50-ceph.preset @@ -0,0 +1,5 @@ +enable ceph.target +enable ceph-msd.target +enable ceph-mon.target +enable ceph-osd.target +enable ceph-radosgw.target diff --git a/systemd/Makefile.am b/systemd/Makefile.am index a6aecc9a26a..9483fe226e0 100644 --- a/systemd/Makefile.am +++ b/systemd/Makefile.am @@ -21,4 +21,5 @@ unit_DATA = $(unitfiles) EXTRA_DIST = \ $(unitfiles) \ ceph \ - ceph.tmpfiles.d + ceph.tmpfiles.d \ + 50-ceph.preset -- 2.47.3