Skip to content

Commit 4b3db3d

Browse files
CLOUDSTACK-8616 - Add a cron job to restart ConntrackD on reboot
Signed-off-by: wilderrodrigues <[email protected]>
1 parent f78a65c commit 4b3db3d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

systemvm/patches/debian/buildsystemvm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ packages() {
376376
#xenstore utils
377377
chroot . apt-get --no-install-recommends -q -y --force-yes install xenstore-utils libxenstore3.0
378378
#keepalived - install version 1.2.13 from wheezy backports
379-
chroot . apt-get --no-install-recommends -t wheezy-backports -q -y --force-yes install keepalived
379+
chroot . apt-get --no-install-recommends -q -y --force-yes -t wheezy-backports install keepalived
380380
#conntrackd
381381
chroot . apt-get --no-install-recommends -q -y --force-yes install conntrackd ipvsadm libnetfilter-conntrack3 libnl1
382382
#ipcalc

systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,21 @@ def _redundant_on(self):
139139
heartbeat_cron.add("* * * * * root $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1)
140140
heartbeat_cron.add("* * * * * root sleep 30; $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1)
141141
heartbeat_cron.commit()
142-
142+
143143
# Configure KeepaliveD cron job - runs at every reboot
144144
keepalived_cron = CsFile("/etc/cron.d/keepalived")
145145
keepalived_cron.add("SHELL=/bin/bash", 0)
146146
keepalived_cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1)
147147
keepalived_cron.add("@reboot root service keepalived start", -1)
148148
keepalived_cron.commit()
149149

150+
# Configure ConntrackD cron job - runs at every reboot
151+
conntrackd_cron = CsFile("/etc/cron.d/conntrackd")
152+
conntrackd_cron.add("SHELL=/bin/bash", 0)
153+
conntrackd_cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1)
154+
conntrackd_cron.add("@reboot root service conntrackd start", -1)
155+
conntrackd_cron.commit()
156+
150157
proc = CsProcess(['/usr/sbin/keepalived', '--vrrp'])
151158
if not proc.find() or keepalived_conf.is_changed():
152159
CsHelper.service("keepalived", "restart")

0 commit comments

Comments
 (0)