From 62084375fa8370ca3884327b4a4ad28e0281747e Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Thu, 17 Mar 2016 18:54:47 +0100 Subject: [PATCH] systemd: Use the same restart limits as upstart Currently, the systemd daemons are not restarted on failure. This patch adds this functionality and sets the defaults to those defined in upstart. This resolves to 3 fails per 30 minutes for osd, mon and mds and 5 fails per 30 seconds for radosgw. Signed-off-by: Boris Ranto --- systemd/ceph-mds@.service | 3 +++ systemd/ceph-mon@.service | 3 +++ systemd/ceph-osd@.service | 3 +++ systemd/ceph-radosgw@.service | 3 +++ 4 files changed, 12 insertions(+) diff --git a/systemd/ceph-mds@.service b/systemd/ceph-mds@.service index f13cef4428e76..ae1c29d68ebc3 100644 --- a/systemd/ceph-mds@.service +++ b/systemd/ceph-mds@.service @@ -16,6 +16,9 @@ ProtectHome=true ProtectSystem=full PrivateTmp=true TasksMax=infinity +Restart=on-failure +StartLimitInterval=30min +StartLimitBurst=3 [Install] WantedBy=ceph-mds.target diff --git a/systemd/ceph-mon@.service b/systemd/ceph-mon@.service index b9501d630dcfb..d62c4fd01936b 100644 --- a/systemd/ceph-mon@.service +++ b/systemd/ceph-mon@.service @@ -22,6 +22,9 @@ ProtectHome=true ProtectSystem=full PrivateTmp=true TasksMax=infinity +Restart=on-failure +StartLimitInterval=30min +StartLimitBurst=3 [Install] WantedBy=ceph-mon.target diff --git a/systemd/ceph-osd@.service b/systemd/ceph-osd@.service index 1778db704e878..df1893eb19552 100644 --- a/systemd/ceph-osd@.service +++ b/systemd/ceph-osd@.service @@ -16,6 +16,9 @@ ProtectHome=true ProtectSystem=full PrivateTmp=true TasksMax=infinity +Restart=on-failure +StartLimitInterval=30min +StartLimitBurst=3 [Install] WantedBy=ceph-osd.target diff --git a/systemd/ceph-radosgw@.service b/systemd/ceph-radosgw@.service index cfa5788477047..e19ba1648c14a 100644 --- a/systemd/ceph-radosgw@.service +++ b/systemd/ceph-radosgw@.service @@ -15,6 +15,9 @@ ProtectHome=true ProtectSystem=full PrivateTmp=true TasksMax=infinity +Restart=on-failure +StartLimitInterval=30s +StartLimitBurst=5 [Install] WantedBy=ceph-radosgw.target -- 2.39.5