From 4b4edb64608a228ac7df2b6fa7925db57ecfd300 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Wed, 18 Sep 2019 10:05:16 +0200 Subject: [PATCH] B #3183: Service restart window (#3723) Lower restart window from 300 to 60 seconds for existing services opennebula and openenbula-scheduler, set same restart mechanism to the rest of services. --- share/pkgs/CentOS7/opennebula-econe.service | 4 ++++ share/pkgs/CentOS7/opennebula-flow.service | 4 ++++ share/pkgs/CentOS7/opennebula-gate.service | 4 ++++ share/pkgs/CentOS7/opennebula-hem.service | 4 ++++ share/pkgs/CentOS7/opennebula-novnc.service | 4 ++++ share/pkgs/CentOS7/opennebula-scheduler.service | 3 ++- share/pkgs/CentOS7/opennebula-sunstone.service | 4 ++++ share/pkgs/CentOS7/opennebula.service | 2 +- 8 files changed, 27 insertions(+), 2 deletions(-) diff --git a/share/pkgs/CentOS7/opennebula-econe.service b/share/pkgs/CentOS7/opennebula-econe.service index d99874daf7..d4bbfe9a22 100644 --- a/share/pkgs/CentOS7/opennebula-econe.service +++ b/share/pkgs/CentOS7/opennebula-econe.service @@ -10,6 +10,10 @@ Group=oneadmin User=oneadmin ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-econe -s /var/lib/one/.logrotate.status ExecStart=/usr/bin/ruby /usr/lib/one/ruby/cloud/econe/econe-server.rb +StartLimitInterval=60 +StartLimitBurst=3 +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target diff --git a/share/pkgs/CentOS7/opennebula-flow.service b/share/pkgs/CentOS7/opennebula-flow.service index f0ac04effb..7e5a55e536 100644 --- a/share/pkgs/CentOS7/opennebula-flow.service +++ b/share/pkgs/CentOS7/opennebula-flow.service @@ -10,6 +10,10 @@ Group=oneadmin User=oneadmin ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-flow -s /var/lib/one/.logrotate.status ExecStart=/usr/bin/ruby /usr/lib/one/oneflow/oneflow-server.rb +StartLimitInterval=60 +StartLimitBurst=3 +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target diff --git a/share/pkgs/CentOS7/opennebula-gate.service b/share/pkgs/CentOS7/opennebula-gate.service index 3186f582b8..3d22f88633 100644 --- a/share/pkgs/CentOS7/opennebula-gate.service +++ b/share/pkgs/CentOS7/opennebula-gate.service @@ -10,6 +10,10 @@ Group=oneadmin User=oneadmin ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-gate -s /var/lib/one/.logrotate.status ExecStart=/usr/bin/ruby /usr/lib/one/onegate/onegate-server.rb +StartLimitInterval=60 +StartLimitBurst=3 +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target diff --git a/share/pkgs/CentOS7/opennebula-hem.service b/share/pkgs/CentOS7/opennebula-hem.service index 50a6a37b5a..89814da217 100644 --- a/share/pkgs/CentOS7/opennebula-hem.service +++ b/share/pkgs/CentOS7/opennebula-hem.service @@ -9,6 +9,10 @@ Group=oneadmin User=oneadmin ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-hem -s /var/lib/one/.logrotate.status ExecStart=/usr/bin/ruby /usr/lib/one/onehem/onehem-server.rb +StartLimitInterval=60 +StartLimitBurst=3 +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target diff --git a/share/pkgs/CentOS7/opennebula-novnc.service b/share/pkgs/CentOS7/opennebula-novnc.service index 16f3a1728f..8d99a5f325 100644 --- a/share/pkgs/CentOS7/opennebula-novnc.service +++ b/share/pkgs/CentOS7/opennebula-novnc.service @@ -9,6 +9,10 @@ User=oneadmin ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-novnc -s /var/lib/one/.logrotate.status ExecStart=/usr/bin/novnc-server start PIDFile=/var/lock/one/.novnc.lock +StartLimitInterval=60 +StartLimitBurst=3 +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target diff --git a/share/pkgs/CentOS7/opennebula-scheduler.service b/share/pkgs/CentOS7/opennebula-scheduler.service index 58367a18c3..e3437a0bd0 100644 --- a/share/pkgs/CentOS7/opennebula-scheduler.service +++ b/share/pkgs/CentOS7/opennebula-scheduler.service @@ -2,6 +2,7 @@ Description=OpenNebula Cloud Scheduler Daemon After=syslog.target network.target remote-fs.target After=opennebula.service +AssertFileNotEmpty=/var/lib/one/.one/one_auth [Service] Type=simple @@ -9,7 +10,7 @@ Group=oneadmin User=oneadmin ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-scheduler -s /var/lib/one/.logrotate.status ExecStart=/usr/bin/mm_sched -StartLimitInterval=300 +StartLimitInterval=60 StartLimitBurst=3 Restart=on-failure RestartSec=5 diff --git a/share/pkgs/CentOS7/opennebula-sunstone.service b/share/pkgs/CentOS7/opennebula-sunstone.service index 40ebe2ce56..211e6ca9a5 100644 --- a/share/pkgs/CentOS7/opennebula-sunstone.service +++ b/share/pkgs/CentOS7/opennebula-sunstone.service @@ -11,6 +11,10 @@ Group=oneadmin User=oneadmin ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-sunstone -s /var/lib/one/.logrotate.status ExecStart=/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb +StartLimitInterval=60 +StartLimitBurst=3 +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target diff --git a/share/pkgs/CentOS7/opennebula.service b/share/pkgs/CentOS7/opennebula.service index abdd3e6de9..9c9c41e41b 100644 --- a/share/pkgs/CentOS7/opennebula.service +++ b/share/pkgs/CentOS7/opennebula.service @@ -12,7 +12,7 @@ ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula -s /var/lib/one ExecStart=/usr/bin/oned -f ExecStopPost=/usr/share/one/follower_cleanup PIDFile=/var/lock/one/one -StartLimitInterval=300 +StartLimitInterval=60 StartLimitBurst=3 Restart=on-failure RestartSec=5