Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes #4551: Initial logrotate configuration (from initial-promises) does not include recent fixes #307

Merged
merged 1 commit into from

2 participants

@jooooooon
Owner

Fix for www.rudder-project.org/redmine/issues/4551

I also added a test so that this doesn't happen again.

@ncharles ncharles merged commit 76d4b13 into Normation:branches/rudder/2.6
@ncharles
Owner

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 4, 2014
  1. @jooooooon

    Fixes #4551: Initial logrotate configuration (from initial-promises) …

    jooooooon authored
    …does not include recent fixes
This page is out of date. Refresh to see the latest.
View
47 initial-promises/node-server/distributePolicy/logrotate.conf/rudder.debian
@@ -3,19 +3,19 @@
missingok
rotate 30
compress
+ notifempty
+ create 640 root adm
delaycompress
- notifempty
- create 640 root adm
sharedscripts
postrotate
- if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d apache2 reload > /dev/null
- else
- /etc/init.d/apache2 reload > /dev/null
- fi
- fi
- endscript
+ if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d apache2 reload > /dev/null
+ else
+ /etc/init.d/apache2 reload > /dev/null
+ fi
+ fi
+ endscript
}
/var/log/rudder/ldap/slapd.log {
@@ -23,9 +23,15 @@
missingok
rotate 30
compress
- delaycompress
notifempty
- create 640 root adm
+ create 640 root adm
+ postrotate
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d rsyslog reload > /dev/null
+ else
+ /etc/init.d/rsyslog reload > /dev/null
+ fi
+ endscript
}
/var/log/rudder/reports/*.log {
@@ -33,9 +39,17 @@
missingok
rotate 30
compress
- delaycompress
notifempty
- create 640 root adm
+ create 640 root adm
+ delaycompress
+ sharedscripts
+ postrotate
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d rsyslog reload > /dev/null
+ else
+ /etc/init.d/rsyslog reload > /dev/null
+ fi
+ endscript
}
/var/log/rudder/core/*.log {
@@ -43,16 +57,15 @@
missingok
rotate 30
compress
- delaycompress
notifempty
create 640 root adm
}
-var/log/rudder/compliance/non-compliant-reports.log {
+/var/log/rudder/compliance/non-compliant-reports.log {
daily
missingok
rotate 365
compress
notifempty
create 640 root adm
-}
+}
View
25 initial-promises/node-server/distributePolicy/logrotate.conf/rudder.suse
@@ -3,13 +3,13 @@
missingok
rotate 30
compress
+ notifempty
+ create 640 root root
delaycompress
- notifempty
- create 640 root root
sharedscripts
postrotate
- /etc/init.d/apache2 reload > /dev/null
- endscript
+ /etc/init.d/apache2 reload > /dev/null
+ endscript
}
/var/log/rudder/ldap/slapd.log {
@@ -17,9 +17,11 @@
missingok
rotate 30
compress
- delaycompress
notifempty
- create 640 root root
+ create 640 root root
+ postrotate
+ /etc/init.d/syslog reload > /dev/null
+ endscript
}
/var/log/rudder/reports/*.log {
@@ -27,9 +29,13 @@
missingok
rotate 30
compress
- delaycompress
notifempty
- create 640 root root
+ create 640 root root
+ delaycompress
+ sharedscripts
+ postrotate
+ /etc/init.d/syslog reload > /dev/null
+ endscript
}
/var/log/rudder/core/*.log {
@@ -37,7 +43,6 @@
missingok
rotate 30
compress
- delaycompress
notifempty
create 640 root root
}
@@ -49,4 +54,4 @@
compress
notifempty
create 640 root root
-}
+}
View
45 initial-promises/node-server/distributePolicy/logrotate.conf/rudder.ubuntu
@@ -3,19 +3,19 @@
missingok
rotate 30
compress
+ notifempty
+ create 640 root adm
delaycompress
- notifempty
- create 640 root adm
sharedscripts
postrotate
- if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d apache2 reload > /dev/null
- else
- /etc/init.d/apache2 reload > /dev/null
- fi
- fi
- endscript
+ if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d apache2 reload > /dev/null
+ else
+ /etc/init.d/apache2 reload > /dev/null
+ fi
+ fi
+ endscript
}
/var/log/rudder/ldap/slapd.log {
@@ -23,9 +23,15 @@
missingok
rotate 30
compress
- delaycompress
notifempty
- create 640 syslog adm
+ create 640 syslog adm
+ postrotate
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d rsyslog reload > /dev/null
+ else
+ /etc/init.d/rsyslog reload > /dev/null
+ fi
+ endscript
}
/var/log/rudder/reports/*.log {
@@ -33,9 +39,17 @@
missingok
rotate 30
compress
- delaycompress
notifempty
- create 640 syslog adm
+ create 640 syslog adm
+ delaycompress
+ sharedscripts
+ postrotate
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d rsyslog reload > /dev/null
+ else
+ /etc/init.d/rsyslog reload > /dev/null
+ fi
+ endscript
}
/var/log/rudder/core/*.log {
@@ -43,12 +57,11 @@
missingok
rotate 30
compress
- delaycompress
notifempty
create 640 root adm
}
-var/log/rudder/compliance/non-compliant-reports.log {
+/var/log/rudder/compliance/non-compliant-reports.log {
daily
missingok
rotate 365
View
11 scripts/check-techniques.sh
@@ -74,3 +74,14 @@ do
exit 6
fi
done
+
+# Check that logrotate configurations are synchronized from techniques to initial-promises
+ls ${REPOSITORY_PATH}/techniques/system/distributePolicy/1.0/logrotate.*.st | xargs -L1 basename | sed -r "s/^logrotate\.([^.]*)\.st$/\1/" | while read version
+do
+ if ! diff -Nauwq ${REPOSITORY_PATH}/techniques/system/distributePolicy/1.0/logrotate.${version}.st ${REPOSITORY_PATH}/initial-promises/node-server/distributePolicy/logrotate.conf/rudder.${version}
+ then
+ echo "Logrotate files ${REPOSITORY_PATH}/techniques/system/distributePolicy/1.0/logrotate.${version}.st and ${REPOSITORY_PATH}/initial-promises/node-server/distributePolicy/logrotate.conf/rudder.${version} differ"
+ exit 7
+ fi
+done
+
Something went wrong with that request. Please try again.