Skips enabling kernel bridge firewall in container

Calling enable_kernel_bridge_firewall inside a
container, devstack will crash because it tries to
load a kernel module by calling 'sudo modprobe' on
net.bridge.

Change-Id: Id4718c065d5a8c507d49f38e19c2796a64221aa4
Closes-Bug: #1662194
This commit is contained in:
Denis Buliga
2017-02-06 16:56:46 +02:00
parent bab8516a85
commit 0bf75a471e
5 changed files with 22 additions and 4 deletions

View File

@@ -664,6 +664,16 @@ function set_mtu {
}
# running_in_container - Returns true otherwise false
function running_in_container {
if grep -q lxc /proc/1/cgroup; then
return 0
fi
return 1
}
# enable_kernel_bridge_firewall - Enable kernel support for bridge firewalling
function enable_kernel_bridge_firewall {
# Load bridge module. This module provides access to firewall for bridged