From 1dcd904d27593e818721fe6dc143cd384eb9a6d9 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Fri, 27 Mar 2015 18:55:00 -0500 Subject: [PATCH] Loads ebtables from inside the containers We have to overlay the /lib/modules folder from the host to properly `modprobe` from within a container. We don't have to give it write permissions however, so the docker-compose volume is mounted in as 'ro' Change-Id: I95101136dad56e9331d8b92cd394495f7bd0576a --- compose/nova-api-compute-network.yml | 5 +++++ compose/nova-compute-network.yml | 1 + devenv/kollanode.yaml | 3 --- tools/start | 4 ---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compose/nova-api-compute-network.yml b/compose/nova-api-compute-network.yml index 8e0c4c08f8..fbb009baf4 100644 --- a/compose/nova-api-compute-network.yml +++ b/compose/nova-api-compute-network.yml @@ -14,6 +14,7 @@ libvirt: volumes: - /run:/run - /sys/fs/cgroup:/sys/fs/cgroup + - /lib/modules:/lib/modules:ro volumes_from: - computedata @@ -28,6 +29,7 @@ novanetwork: volumes: - /run:/run - /sys/fs/cgroup:/sys/fs/cgroup + - /lib/modules:/lib/modules:ro volumes_from: - computedata @@ -43,6 +45,8 @@ novaapi: restart: always env_file: - openstack.env + volumes: + - /lib/modules:/lib/modules:ro novacompute: image: kollaglue/centos-rdo-nova-compute @@ -55,5 +59,6 @@ novacompute: volumes: - /run:/run - /sys/fs/cgroup:/sys/fs/cgroup + - /lib/modules:/lib/modules:ro volumes_from: - computedata diff --git a/compose/nova-compute-network.yml b/compose/nova-compute-network.yml index 299573ae4b..fe2e3b9fa4 100644 --- a/compose/nova-compute-network.yml +++ b/compose/nova-compute-network.yml @@ -28,6 +28,7 @@ novanetwork: volumes: - /run:/run - /sys/fs/cgroup:/sys/fs/cgroup + - /lib/modules:/lib/modules:ro volumes_from: - computedata diff --git a/devenv/kollanode.yaml b/devenv/kollanode.yaml index db3f8a3b5a..12556d7460 100644 --- a/devenv/kollanode.yaml +++ b/devenv/kollanode.yaml @@ -182,9 +182,6 @@ resources: tar -xvf version-m3.tar.gz mv kolla-version-m3 kolla - # Load ebtables kernel module required for networking - modprobe ebtables - # Start NTP systemctl enable ntpd systemctl start ntpd diff --git a/tools/start b/tools/start index b6dcb3a9c4..ade9bf13fc 100755 --- a/tools/start +++ b/tools/start @@ -23,10 +23,6 @@ setenforce permissive # is not installed in the system. mkdir -p /etc/libvirt/qemu -# This should probably go into nova-networking or nova-compute containers. -# but you can't modprobe from a container for some reason -modprobe ebtables - MY_IP=$(ip route get $(ip route | awk '$1 == "default" {print $3}') | awk '$4 == "src" {print $5}')