From 154ed38fcb0db6a13a32014a2bf84a2180e9a424 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 26 Sep 2019 17:21:26 -0500 Subject: [PATCH] ceph-daemon: slurp some options over from the standard systemd unit Signed-off-by: Sage Weil --- src/ceph-daemon | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ceph-daemon b/src/ceph-daemon index 29ed19188b4..80562633c26 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -176,22 +176,32 @@ def install_base_units(): def get_unit_file(): u = """[Unit] Description=Ceph daemon for {fsid} -After=network.target + +# According to: +# http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget +# these can be removed once ceph-mon will dynamically change network +# configuration. +After=network-online.target local-fs.target time-sync.target +Wants=network-online.target local-fs.target time-sync.target PartOf=ceph-{fsid}.target Before=ceph-{fsid}.target [Service] +LimitNOFILE=1048576 +LimitNPROC=1048576 EnvironmentFile=-/etc/environment ExecStartPre=-/usr/bin/podman rm ceph-{fsid}-%i ExecStartPre=-mkdir -p /var/run/ceph ExecStart={data_dir}/{fsid}/%i/cmd ExecStop=-/usr/bin/podman stop ceph-{fsid}-%i ExecStopPost=-/bin/rm -f /var/run/ceph/{fsid}-%i.asok -Restart=always +Restart=on-failure RestartSec=10s TimeoutStartSec=120 TimeoutStopSec=15 +StartLimitInterval=30min +StartLimitBurst=5 [Install] WantedBy=ceph-{fsid}.target -- 2.39.5