From 749cbb1dd70518e131f7988df5f54ee4626d6b44 Mon Sep 17 00:00:00 2001 From: Ivan Kudryavtsev Date: Sun, 12 Nov 2017 11:51:44 +0700 Subject: [PATCH 1/2] Improved debian installation script to find either rb_netfilter module exists in the system and should be loaded. --- debian/cloudstack-agent.postinst | 9 +++++++++ packaging/systemd/cloudstack-agent.service | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/cloudstack-agent.postinst b/debian/cloudstack-agent.postinst index 9cb178d4f129..a9b8b687fab1 100755 --- a/debian/cloudstack-agent.postinst +++ b/debian/cloudstack-agent.postinst @@ -35,6 +35,15 @@ case "$1" in done fi + BR_NETFILTER_MODULE=br_netfilter + MODULES_FILE=/etc/modules + if /sbin/modinfo $BR_NETFILTER_MODULE >/dev/null 2>&1; then + /sbin/modprobe $BR_NETFILTER_MODULE + if ! grep $BR_NETFILTER_MODULE $MODULES_FILE >/dev/null 2>&1; then + echo "$BR_NETFILTER_MODULE" >> $MODULES_FILE + fi + fi + # Running cloudstack-agent-upgrade to update bridge name for upgrade from CloudStack 4.0.x (and before) to CloudStack 4.1 (and later) /usr/bin/cloudstack-agent-upgrade if [ ! -d "/etc/libvirt/hooks" ] ; then diff --git a/packaging/systemd/cloudstack-agent.service b/packaging/systemd/cloudstack-agent.service index 9cde22d7eb0d..337e3b65937f 100644 --- a/packaging/systemd/cloudstack-agent.service +++ b/packaging/systemd/cloudstack-agent.service @@ -18,8 +18,8 @@ [Unit] Description=CloudStack Agent Documentation=http://www.cloudstack.org/ -Requires=libvirtd.service -After=libvirtd.service +Requires=libvirt-bin.service +After=libvirt-bin.service [Service] Type=simple From 6deb32c4d47cd2af1e8531aa3d6472b6b8ab8b2a Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 27 Nov 2017 13:10:06 +0530 Subject: [PATCH 2/2] Don't patch systemd script Debian `rules` patches the systemd scripts when building deb files --- packaging/systemd/cloudstack-agent.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/systemd/cloudstack-agent.service b/packaging/systemd/cloudstack-agent.service index 337e3b65937f..9cde22d7eb0d 100644 --- a/packaging/systemd/cloudstack-agent.service +++ b/packaging/systemd/cloudstack-agent.service @@ -18,8 +18,8 @@ [Unit] Description=CloudStack Agent Documentation=http://www.cloudstack.org/ -Requires=libvirt-bin.service -After=libvirt-bin.service +Requires=libvirtd.service +After=libvirtd.service [Service] Type=simple