From 2c810d73e24411e767296b62e59d2acbb77b7df5 Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Thu, 22 May 2014 09:20:33 -0600 Subject: [PATCH] CLOUDSTACK-6751 - Disable stats logging for conntrackd upon systemvm creation Submitted-by: Joris van Lieshout --- .../definitions/systemvm64template/postinstall.sh | 8 ++++++++ .../appliance/definitions/systemvmtemplate/postinstall.sh | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tools/appliance/definitions/systemvm64template/postinstall.sh b/tools/appliance/definitions/systemvm64template/postinstall.sh index cc8ead9d947..2e0ff132e58 100644 --- a/tools/appliance/definitions/systemvm64template/postinstall.sh +++ b/tools/appliance/definitions/systemvm64template/postinstall.sh @@ -183,6 +183,13 @@ EOF locale-gen en_US.UTF-8 } +# This is actually a bug in the conntrackd package. The comment in the conf file says stats logging is off by default but the parameter is set to on. +# After a couple weeks logrotate will rotate the conntrackd-stats.log file ans start conntracking even if we don't want it to (on non-redundant routers for instance). +fix_conntrackd() { + sed -i '/Stats {/,/}/ s/LogFile on/LogFile off/' /etc/conntrackd/conntrackd.conf + rm -f /var/log/conntrackd-stats.log +} + fix_vhdutil() { wget --no-check-certificate http://download.cloud.com.s3.amazonaws.com/tools/vhd-util -O /bin/vhd-util chmod a+x /bin/vhd-util @@ -194,6 +201,7 @@ do_fixes() { fix_acpid fix_hostname fix_locale + fix_conntrackd fix_vhdutil } diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh index 23e66dd2888..4b3990ca563 100644 --- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh +++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh @@ -173,6 +173,13 @@ EOF locale-gen en_US.UTF-8 } +# This is actually a bug in the conntrackd package. The comment in the conf file says stats logging is off by default but the parameter is set to on. +# After a couple weeks logrotate will rotate the conntrackd-stats.log file ans start conntracking even if we don't want it to (on non-redundant routers for instance). +fix_conntrackd() { + sed -i '/Stats {/,/}/ s/LogFile on/LogFile off/' /etc/conntrackd/conntrackd.conf + rm -f /var/log/conntrackd-stats.log +} + fix_vhdutil() { wget --no-check-certificate http://download.cloud.com.s3.amazonaws.com/tools/vhd-util -O /bin/vhd-util chmod a+x /bin/vhd-util @@ -184,6 +191,7 @@ do_fixes() { fix_acpid fix_hostname fix_locale + fix_conntrackd fix_vhdutil }