CLOUDSTACK-7143: split connection tracking config into its own file

This commit is contained in:
Leo Simons 2014-07-21 11:27:16 +02:00 committed by Rohit Yadav
parent ed53167547
commit 3574dcf543
3 changed files with 20 additions and 19 deletions

View File

@ -0,0 +1,19 @@
# 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
}
# Preload these module otherwise the sysctl settings will not be set, and pasive ftp will not work.
fix_modules() {
cat >> /etc/modules << EOF
nf_conntrack_ipv4
nf_conntrack
nf_conntrack_ftp
nf_nat_ftp
EOF
}
fix_conntrackd
fix_modules

View File

@ -64,6 +64,7 @@ config = {
'configure_login.sh',
'postinstall.sh',
'configure_acpid.sh',
'configure_conntrack.sh',
'cleanup.sh',
'configure_networking.sh',
'zerodisk.sh'

View File

@ -126,34 +126,15 @@ fix_hostname() {
sed -i '/127.0.1.1/d' /etc/hosts
}
# 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
}
# Preload these module otherwise the sysctl settings will not be set, and pasive ftp will not work.
fix_modules() {
cat >> /etc/modules << EOF
nf_conntrack_ipv4
nf_conntrack
nf_conntrack_ftp
nf_nat_ftp
EOF
}
do_fixes() {
fix_nameserver
fix_hostname
fix_conntrackd
fix_vhdutil
fix_modules
}
configure_apache2() {