4

I'm running devstack from within a container I set up using ubuntu 16.04 (both the host and the container). I see this problem in the container:

stack@devstack-2:~/devstack$ ll /proc/sys/net/bridge/
ls: cannot access '/proc/sys/net/bridge/': No such file or directory

Whereas on the host it is ok:

stack@dl-360-116:~$ ll /proc/sys/net/bridge/
total 0
dr-xr-xr-x 1 root root 0 Aug 24 01:42 ./
dr-xr-xr-x 1 root root 0 Aug 23 20:47 ../
-rw-r--r-- 1 root root 0 Aug 24 01:42 bridge-nf-call-arptables
-rw-r--r-- 1 root root 0 Aug 24 01:42 bridge-nf-call-ip6tables
-rw-r--r-- 1 root root 0 Aug 24 01:42 bridge-nf-call-iptables
-rw-r--r-- 1 root root 0 Aug 24 01:42 bridge-nf-filter-pppoe-tagged
-rw-r--r-- 1 root root 0 Aug 24 01:42 bridge-nf-filter-vlan-tagged
-rw-r--r-- 1 root root 0 Aug 24 01:42 bridge-nf-pass-vlan-input-dev

Anybody knows how to configure lxd/lxc to add this path in the container?

1 Answer 1

1

You need to create or use an existing profile that enables the br_netfilter module

$ lxc profile create mod_br_netfilter
$ lxc profile set mod_br_netfilter linux.kernel_modules br_netfilter
$ lxc profile show mod_br_netfilter
  name: mod_br_netfilter  
  config:
    linux.kernel_modules: br_netfilter
  description: ""
  devices: {}
$ lxc launch ubuntu:latest YOURcontainer -p default -p mod_br_netfilter
############ To apply to an existing Instance #####################
$ lxc profile apply YOURcontainer default, mod_br_netfilter
$ lxc restart YOURcontainer

Alternatively you can edit any profile you already use to support this kernel module

$ lxc profile edit default

edit the config section to add the configuration key linux.kernel_modules: br_netfilter

2
  • 1
    I've got br_netfilter in the config, but it still doesn't show. What can be the problem?
    – Velkan
    Apr 10, 2017 at 8:03
  • Add profile to existing container: lxc profile add YOURcontainer mod_br_netfilter
    – Dantio
    May 15, 2021 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .