mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-29 18:50:08 +03:00
* Revert "F #5328: Update logrotate behavior to avoid long restarts (#2275)". This reverts commit 6b1127f180bcc4416bec3b7226629b392dd18737. * B #5328: Don't wait for log compressing * B #6034: Don't overwrite logs While having already `copytruncate` in logroate we don't need to implement signaling and re-openning files. * L #-: Linting
This commit is contained in:
parent
c65622f603
commit
7e1f78ace9
@ -1,9 +1,6 @@
|
||||
/var/log/one/one_xmlrpc.log /var/log/one/oned.log /var/log/one/monitor.log /var/log/one/vcenter_monitor.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -1,9 +1,6 @@
|
||||
/var/log/one/fireedge.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -1,9 +1,6 @@
|
||||
/var/log/one/oneflow.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -1,9 +1,6 @@
|
||||
/var/log/one/onegate.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -1,9 +1,6 @@
|
||||
/var/log/one/onehem.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -1,9 +1,6 @@
|
||||
/var/log/one/novnc.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -1,9 +1,6 @@
|
||||
/var/log/one/sched.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -1,9 +1,6 @@
|
||||
/var/log/one/sunstone.log {
|
||||
delaycompress
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
compress
|
||||
maxsize 100M
|
||||
weekly
|
||||
rotate 52
|
||||
missingok
|
||||
|
@ -38,6 +38,7 @@ 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=$?
|
||||
|
||||
@ -65,6 +66,7 @@ do_stop()
|
||||
|
||||
do_start_sched()
|
||||
{
|
||||
logrotate -f /etc/logrotate.d/opennebula-scheduler
|
||||
su oneadmin -s /bin/sh -c 'one start-sched'
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ 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"
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ 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"
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ 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"
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ 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"
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@ 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
|
||||
ExecStartPre=-sh 'gzip -9 /var/log/one/fireedge.log-* &'
|
||||
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
|
||||
|
@ -8,6 +8,8 @@ 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
|
||||
ExecStartPre=-sh 'gzip -9 /var/log/one/oneflow.log-* &'
|
||||
ExecStart=/usr/bin/ruby /usr/lib/one/oneflow/oneflow-server.rb
|
||||
StartLimitInterval=60
|
||||
StartLimitBurst=3
|
||||
|
@ -8,6 +8,8 @@ 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
|
||||
ExecStartPre=-sh 'gzip -9 /var/log/one/onegate.log-* &'
|
||||
ExecStart=/usr/bin/ruby /usr/lib/one/onegate/onegate-server.rb
|
||||
StartLimitInterval=60
|
||||
StartLimitBurst=3
|
||||
|
@ -8,6 +8,8 @@ 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
|
||||
ExecStartPre=-sh 'gzip -9 /var/log/one/onehem.log-* &'
|
||||
ExecStart=/usr/bin/ruby /usr/lib/one/onehem/onehem-server.rb
|
||||
StartLimitInterval=60
|
||||
StartLimitBurst=3
|
||||
|
@ -6,6 +6,8 @@ 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
|
||||
ExecStartPre=-sh 'gzip -9 /var/log/one/novnc.log-* &'
|
||||
ExecStart=/usr/bin/novnc-server start
|
||||
PIDFile=/var/lock/one/.novnc.lock
|
||||
StartLimitInterval=60
|
||||
|
@ -8,6 +8,8 @@ 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
|
||||
ExecStartPre=-sh 'gzip -9 /var/log/one/sched.log-* &'
|
||||
ExecStart=/usr/bin/mm_sched
|
||||
StartLimitInterval=60
|
||||
StartLimitBurst=3
|
||||
|
@ -10,6 +10,8 @@ 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
|
||||
ExecStartPre=-sh 'gzip -9 /var/log/one/sunstone.log-* &'
|
||||
ExecStart=/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb
|
||||
ReadWriteDirectories=/var/lib/one /var/log/one/
|
||||
ReadOnlyDirectories=-/var/lib/one/remotes
|
||||
|
@ -14,6 +14,9 @@ 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=-sh 'gzip -9 /var/log/one/oned.log-* /var/log/one/monitor.log-* /var/log/one/vcenter_monitor.log-* &'
|
||||
ExecStartPre=/usr/share/one/pre_cleanup
|
||||
ExecStart=/usr/bin/oned -f
|
||||
ExecStopPost=/usr/share/one/follower_cleanup
|
||||
PIDFile=/var/lock/one/one
|
||||
|
@ -76,7 +76,7 @@ start()
|
||||
touch $FIREEDGE_LOCK_FILE
|
||||
|
||||
# Start the fireedge-server daemon
|
||||
node $FIREEDGE_SERVER >$FIREEDGE_LOG &
|
||||
node $FIREEDGE_SERVER >>$FIREEDGE_LOG &
|
||||
|
||||
LASTRC=$?
|
||||
LASTPID=$!
|
||||
|
@ -59,7 +59,7 @@ start()
|
||||
touch $FLOW_LOCK_FILE
|
||||
|
||||
# Start the oneflow-server daemon
|
||||
ruby $FLOW_SERVER >$FLOW_LOG 2>$FLOW_LOG_ERROR &
|
||||
ruby $FLOW_SERVER >>$FLOW_LOG 2>>$FLOW_LOG_ERROR &
|
||||
|
||||
LASTRC=$?
|
||||
LASTPID=$!
|
||||
|
@ -69,7 +69,7 @@ void Monitor::start()
|
||||
NebulaLog::init_log_system(log_system,
|
||||
clevel,
|
||||
log_file.c_str(),
|
||||
ios_base::trunc,
|
||||
ios_base::ate,
|
||||
"one_monitor");
|
||||
}
|
||||
else
|
||||
|
@ -223,7 +223,7 @@ void Nebula::start(bool bootstrap_only)
|
||||
NebulaLog::init_log_system(log_system,
|
||||
clevel,
|
||||
log_fname.c_str(),
|
||||
ios_base::trunc,
|
||||
ios_base::ate,
|
||||
"oned");
|
||||
}
|
||||
else
|
||||
|
@ -59,7 +59,7 @@ start()
|
||||
|
||||
# Start the onegate daemon
|
||||
touch $ONEGATE_LOCK_FILE
|
||||
ruby $ONEGATE_SERVER > $ONEGATE_LOG 2>$ONEGATE_LOG_ERROR &
|
||||
ruby $ONEGATE_SERVER >> $ONEGATE_LOG 2>>$ONEGATE_LOG_ERROR &
|
||||
LASTPID=$!
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -169,7 +169,7 @@ void Scheduler::start()
|
||||
NebulaLog::init_log_system(log_system,
|
||||
clevel,
|
||||
log_file.c_str(),
|
||||
ios_base::trunc,
|
||||
ios_base::ate,
|
||||
"mm_sched");
|
||||
}
|
||||
else
|
||||
|
@ -92,7 +92,7 @@ start()
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ruby $SUNSTONE_SERVER > $SUNSTONE_LOG 2>$SUNSTONE_LOG_ERROR &
|
||||
ruby $SUNSTONE_SERVER >> $SUNSTONE_LOG 2>>$SUNSTONE_LOG_ERROR &
|
||||
LASTPID=$!
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user