Skip to content

Commit

Permalink
systemd: add ceph-fuse service file
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
batrick committed Oct 21, 2016
1 parent ad2dde1 commit 1174f9c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ceph.spec.in
Expand Up @@ -1137,6 +1137,8 @@ fi
%{_bindir}/ceph-fuse
%{_mandir}/man8/ceph-fuse.8*
%{_sbindir}/mount.fuse.ceph
%{_unitdir}/ceph-fuse@.service
%{_unitdir}/ceph-fuse.target

%files -n rbd-fuse
%defattr(-,root,root,-)
Expand Down
8 changes: 8 additions & 0 deletions debian/rules
Expand Up @@ -65,6 +65,8 @@ override_dh_installinit:
install -m0644 src/upstart/rbdmap.conf debian/ceph-common/etc/init
install -d -m0755 debian/ceph-mds/etc/init
install -m0644 src/upstart/ceph-mds*.conf debian/ceph-mds/etc/init
install -d -m0755 debian/ceph-fuse/etc/init
install -m0644 src/upstart/ceph-fuse*.conf debian/ceph-fuse/etc/init
install -d -m0755 debian/ceph-mgr/etc/init
install -m0644 src/upstart/ceph-mgr*.conf debian/ceph-mgr/etc/init
install -d -m0755 debian/radosgw/etc/init
Expand Down Expand Up @@ -99,6 +101,11 @@ override_dh_installinit:
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mds/lib/systemd/system/ceph-mds@.service
install -m0644 systemd/ceph-mds.target debian/ceph-mds/lib/systemd/system

install -d -m0755 debian/ceph-fuse/lib/systemd/system
install -m0644 systemd/ceph-fuse@.service debian/ceph-fuse/lib/systemd/system
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-fuse/lib/systemd/system/ceph-fuse@.service
install -m0644 systemd/ceph-fuse.target debian/ceph-fuse/lib/systemd/system

install -d -m0755 debian/ceph-mgr/lib/systemd/system
install -m0644 systemd/ceph-mgr@.service debian/ceph-mgr/lib/systemd/system
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mgr/lib/systemd/system/ceph-mgr@.service
Expand All @@ -122,6 +129,7 @@ override_dh_systemd_start:

override_dh_strip:
dh_strip -pceph-mds --dbg-package=ceph-mds-dbg
dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
dh_strip -pceph-mgr --dbg-package=ceph-mgr-dbg
dh_strip -pceph-mon --dbg-package=ceph-mon-dbg
dh_strip -pceph-osd --dbg-package=ceph-osd-dbg
Expand Down
2 changes: 2 additions & 0 deletions systemd/CMakeLists.txt
@@ -1,11 +1,13 @@
install(FILES
ceph.target
ceph-fuse.target
ceph-osd.target
ceph-mgr.target
ceph-mon.target
ceph-mds.target
ceph-radosgw.target
ceph-rbd-mirror.target
ceph-fuse@.service
ceph-mds@.service
ceph-mgr@.service
ceph-mon@.service
Expand Down
5 changes: 5 additions & 0 deletions systemd/ceph-fuse.target
@@ -0,0 +1,5 @@
[Unit]
Description=ceph target allowing to start/stop all ceph-fuse@.service instances at once
PartOf=ceph.target
[Install]
WantedBy=remote-fs.target ceph.target
22 changes: 22 additions & 0 deletions systemd/ceph-fuse@.service
@@ -0,0 +1,22 @@
[Unit]
Description=Ceph FUSE client
After=network-online.target local-fs.target time-sync.target
Wants=network-online.target local-fs.target time-sync.target
Conflicts=umount.target
PartOf=ceph-fuse.target

[Service]
EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/bin/ceph-fuse -f --cluster ${CLUSTER} %I
PrivateDevices=yes
ProtectHome=true
ProtectSystem=full
PrivateTmp=true
TasksMax=infinity
Restart=on-failure
StartLimitInterval=30min
StartLimitBurst=3

[Install]
WantedBy=ceph-fuse.target

0 comments on commit 1174f9c

Please sign in to comment.