From: Alexandru Avadanii Date: Mon, 5 Feb 2018 23:02:24 +0000 (+0100) Subject: lib.sh: modprobe br_netfilter, don't bail on err X-Git-Tag: opnfv-6.0.0~106 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=ec234a839dbd5eb8c615e1f6a3e34db64ef1c988;hp=6acecf3b104a072c60d071364344b9ff04994168;p=fuel.git 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 --- diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index cc65f9ed7..02c23f365 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -466,10 +466,13 @@ 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 } function get_nova_compute_pillar_data {