aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-06 00:02:24 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-06 16:42:52 +0100
commit380b7375c8be9f05277c6f991ba70801985ca8fa (patch)
tree6eeb6fc99951fb3aafde9084f1ece5d031648877 /mcp/scripts
parent39913ae394fe9d5e2520a3469fe55a76c6fac82a (diff)
lib.sh: modprobe br_netfilter, don't bail on err
Some sysadmins or distro defaults might blacklist br_netfilter, or it might not be loaded at deploy start, account for these corner cases too. JIRA: FUEL-334 Change-Id: I3ca6cb3848df8d2af1625ff4e3816efe8b320886 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit ec234a839dbd5eb8c615e1f6a3e34db64ef1c988)
Diffstat (limited to 'mcp/scripts')
-rw-r--r--mcp/scripts/lib.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 365330db3..6bbcb44d7 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -460,8 +460,11 @@ function wait_for {
function do_sysctl_cfg {
local _conf='/etc/sysctl.d/99-opnfv-fuel-bridge.conf'
# https://wiki.libvirt.org/page/Net.bridge.bridge-nf-call_and_sysctl.conf
- echo 'net.bridge.bridge-nf-call-arptables = 0' |& sudo tee "${_conf}"
- echo 'net.bridge.bridge-nf-call-iptables = 0' |& sudo tee -a "${_conf}"
- echo 'net.bridge.bridge-nf-call-ip6tables = 0' |& sudo tee -a "${_conf}"
- sudo sysctl -q -p "${_conf}"
+ if modprobe br_netfilter bridge; then
+ echo 'net.bridge.bridge-nf-call-arptables = 0' |& sudo tee "${_conf}"
+ echo 'net.bridge.bridge-nf-call-iptables = 0' |& sudo tee -a "${_conf}"
+ echo 'net.bridge.bridge-nf-call-ip6tables = 0' |& sudo tee -a "${_conf}"
+ # Some distros / sysadmins explicitly blacklist br_netfilter
+ sudo sysctl -q -p "${_conf}" || true
+ fi
}