-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemd: add ceph-create-keys@ service
Signed-off-by: Sage Weil <[email protected]>
- Loading branch information
Showing
4 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -548,17 +548,18 @@ install -D src/rbdmap $RPM_BUILD_ROOT%{_sysconfdir}/ceph/rbdmap | |
install -m 0644 -D systemd/ceph-rgw.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}-rgw.conf | ||
install -m 0644 -D systemd/[email protected] $RPM_BUILD_ROOT%{_unitdir}/[email protected] | ||
install -m 0644 -D systemd/[email protected] $RPM_BUILD_ROOT%{_unitdir}/[email protected] | ||
install -m 0644 -D systemd/[email protected] $RPM_BUILD_ROOT%{_unitdir}/[email protected] | ||
install -m 0644 -D systemd/[email protected] $RPM_BUILD_ROOT%{_unitdir}/[email protected] | ||
install -m 0644 -D systemd/[email protected] $RPM_BUILD_ROOT%{_unitdir}/[email protected] | ||
install -m 0644 -D systemd/ceph.target $RPM_BUILD_ROOT%{_unitdir}/ceph.target | ||
%else | ||
install -D src/init-ceph $RPM_BUILD_ROOT%{_initrddir}/ceph | ||
install -D src/init-radosgw $RPM_BUILD_ROOT%{_initrddir}/ceph-radosgw | ||
install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap | ||
ln -sf ../../etc/init.d/ceph %{buildroot}/%{_sbindir}/rcceph | ||
ln -sf ../../etc/init.d/ceph-radosgw %{buildroot}/%{_sbindir}/rcceph-radosgw | ||
%endif | ||
mkdir -p $RPM_BUILD_ROOT%{_sbindir} | ||
ln -sf ../../etc/init.d/ceph %{buildroot}/%{_sbindir}/rcceph | ||
ln -sf ../../etc/init.d/ceph-radosgw %{buildroot}/%{_sbindir}/rcceph-radosgw | ||
install -m 0644 -D src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph | ||
install -m 0644 -D src/rgw/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/radosgw | ||
chmod 0644 $RPM_BUILD_ROOT%{_docdir}/ceph/sample.ceph.conf | ||
|
@@ -637,7 +638,7 @@ mkdir -p %{_localstatedir}/run/ceph/ | |
# /etc/systemd/system. May as well stop them too for completeness | ||
# (although strictly service_del_preun would do that anyway by dint | ||
# of stopping ceph.target) | ||
SERVICE_LIST=$(systemctl | grep -E '^ceph-mon@|^ceph-osd@|^ceph-mds@' | cut -d' ' -f1) | ||
SERVICE_LIST=$(systemctl | grep -E '^ceph-mon@|^ceph-create-keys@|^ceph-osd@|^ceph-mds@' | cut -d' ' -f1) | ||
if [ -n "$SERVICE_LIST" ]; then | ||
for SERVICE in $SERVICE_LIST; do | ||
/usr/bin/systemctl --no-reload disable $SERVICE > /dev/null 2>&1 || : | ||
|
@@ -692,14 +693,16 @@ mkdir -p %{_localstatedir}/run/ceph/ | |
%{_bindir}/cephfs-data-scan | ||
%{_bindir}/ceph-debugpack | ||
%{_bindir}/ceph-coverage | ||
%{_initrddir}/ceph | ||
%if 0%{?_with_systemd} | ||
%{_tmpfilesdir}/%{name}.conf | ||
%{_unitdir}/[email protected] | ||
%{_unitdir}/[email protected] | ||
%{_unitdir}/[email protected] | ||
%{_unitdir}/[email protected] | ||
%{_unitdir}/[email protected] | ||
%{_unitdir}/ceph.target | ||
%else | ||
%{_initrddir}/ceph | ||
%endif | ||
%{_sbindir}/ceph-disk | ||
%{_sbindir}/ceph-disk-activate | ||
|
@@ -802,7 +805,9 @@ mkdir -p %{_localstatedir}/run/ceph/ | |
%config %{_sysconfdir}/bash_completion.d/rados | ||
%config %{_sysconfdir}/bash_completion.d/rbd | ||
%config(noreplace) %{_sysconfdir}/ceph/rbdmap | ||
%if 0%{?_with_systemd} | ||
%{_initrddir}/rbdmap | ||
%endif | ||
%{python_sitelib}/ceph_argparse.py* | ||
%{python_sitelib}/ceph_daemon.py* | ||
%{_udevrulesdir}/50-rbd.rules | ||
|
@@ -834,7 +839,6 @@ fi | |
################################################################################# | ||
%files radosgw | ||
%defattr(-,root,root,-) | ||
%{_initrddir}/ceph-radosgw | ||
%{_bindir}/radosgw | ||
%{_bindir}/radosgw-admin | ||
%{_mandir}/man8/radosgw.8* | ||
|
@@ -846,6 +850,8 @@ fi | |
%dir %{_localstatedir}/lib/ceph/radosgw | ||
%if 0%{?_with_systemd} | ||
%{_tmpfilesdir}/%{name}-rgw.conf | ||
%else | ||
%{_initrddir}/ceph-radosgw | ||
%endif | ||
|
||
%post radosgw | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ unitfiles = \ | |
ceph.target \ | ||
[email protected] \ | ||
[email protected] \ | ||
[email protected] \ | ||
[email protected] \ | ||
[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=Ceph cluster key creator task | ||
|
||
# the last key created is the mds bootstrap key -- look for that. | ||
ConditionPathExists=!/var/lib/ceph/bootstrap-mds/ceph.keyring | ||
|
||
[Service] | ||
EnvironmentFile=-/etc/sysconfig/ceph | ||
Environment=CLUSTER=ceph | ||
ExecStart=/usr/sbin/ceph-create-keys --cluster ${CLUSTER} --id %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters