1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-08 21:17:43 +03:00

F #5328: Update logrotate behavior to avoid long restarts (#2275)

This commit is contained in:
onenhansen 2022-09-12 10:57:07 -06:00 committed by GitHub
parent aafd5f3014
commit 6b1127f180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 8 additions and 14 deletions

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -3,6 +3,7 @@
dateext
dateformat -%Y%m%d-%s
compress
maxsize 100M
weekly
rotate 52
missingok

View File

@ -38,7 +38,6 @@ do_start()
{
mkdir -p /var/run/one /var/lock/one
chown oneadmin /var/run/one /var/lock/one
logrotate -f /etc/logrotate.d/opennebula /etc/logrotate.d/opennebula-scheduler
su oneadmin -s /bin/sh -c 'one start'
ONE_START=$?
@ -66,7 +65,6 @@ do_stop()
do_start_sched()
{
logrotate -f /etc/logrotate.d/opennebula-scheduler
su oneadmin -s /bin/sh -c 'one start-sched'
}

View File

@ -36,7 +36,6 @@ do_start()
{
mkdir -p /var/run/one /var/lock/one /var/log/one
chown oneadmin /var/run/one /var/lock/one /var/log/one
logrotate -f /etc/logrotate.d/opennebula-flow
su oneadmin -s /bin/sh -c "$DAEMON start"
}

View File

@ -36,7 +36,6 @@ do_start()
{
mkdir -p /var/run/one /var/lock/one /var/log/one
chown oneadmin /var/run/one /var/lock/one /var/log/one
logrotate -f /etc/logrotate.d/opennebula-gate
su oneadmin -s /bin/sh -c "$DAEMON start"
}

View File

@ -35,7 +35,6 @@ do_start()
{
mkdir -p /var/lock/one /var/log/one
chown oneadmin /var/lock/one /var/log/one
logrotate -f /etc/logrotate.d/opennebula-novnc
su oneadmin -s /bin/sh -c "$DAEMON start"
}

View File

@ -37,7 +37,6 @@ do_start()
service opennebula-novnc start
mkdir -p /var/run/one /var/lock/one /var/log/one
chown oneadmin /var/run/one /var/lock/one /var/log/one
logrotate -f /etc/logrotate.d/opennebula-sunstone
su oneadmin -s /bin/sh -c "$DAEMON start-sunstone"
}

View File

@ -10,7 +10,6 @@ AssertFileNotEmpty=/var/lib/one/.one/sunstone_auth
Type=simple
Group=oneadmin
User=oneadmin
ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-fireedge -s /var/lib/one/.logrotate.status
ExecStart=/bin/sh -c 'exec node /usr/lib/one/fireedge/dist/index.js >>/var/log/one/fireedge.log 2>>/var/log/one/fireedge.error'
StartLimitInterval=60
StartLimitBurst=3

View File

@ -8,7 +8,6 @@ AssertFileNotEmpty=/var/lib/one/.one/oneflow_auth
Type=simple
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

View File

@ -8,7 +8,6 @@ AssertFileNotEmpty=/var/lib/one/.one/onegate_auth
Type=simple
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

View File

@ -8,7 +8,6 @@ Type=simple
Group=oneadmin
User=oneadmin
EnvironmentFile=-/var/run/one/ssh-agent.env
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

View File

@ -6,7 +6,6 @@ After=syslog.target network.target
Type=forking
Group=oneadmin
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

View File

@ -8,7 +8,6 @@ AssertFileNotEmpty=/var/lib/one/.one/one_auth
Type=simple
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=60
StartLimitBurst=3

View File

@ -10,7 +10,6 @@ Type=simple
Group=oneadmin
User=oneadmin
AmbientCapabilities=CAP_NET_BIND_SERVICE
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
ReadWriteDirectories=/var/lib/one /var/log/one/
ReadOnlyDirectories=-/var/lib/one/remotes

View File

@ -14,7 +14,6 @@ Group=oneadmin
User=oneadmin
Environment="PATH=/usr/lib/one/sh/override:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
EnvironmentFile=-/var/run/one/ssh-agent.env
ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula -s /var/lib/one/.logrotate.status
ExecStartPre=/usr/share/one/pre_cleanup
ExecStart=/usr/bin/oned -f
ExecStopPost=/usr/share/one/follower_cleanup