Skip to content

Commit

Permalink
[interfaces]: Remove bridge-utils from swss docker and add it to base…
Browse files Browse the repository at this point in the history
… image (#417)

The reason is that /etc/network/interfaces file is in base image. After booting,
docker-swss is not ready and thus the empty VLAN interfaces cannot be created
when the brctl is pointing to the binary inside the swss docker.

Add the bridge-utils into the base image and add bridge_ports none to the
/etc/network/interfaces file so that after boot-up the empty VLAN interfaces
will be created to let the members to join later.

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
  • Loading branch information
Shuotian Cheng authored Mar 21, 2017
1 parent 0444ca7 commit 6a6bc88
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
file \
ifupdown \
iproute2 \
bridge-utils \
isc-dhcp-client \
sudo \
vim \
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get install -f -y ifupdown bridge-utils libdbus-1-3 libdaemon0 libjansson4
RUN apt-get install -f -y ifupdown libdbus-1-3 libdaemon0 libjansson4

## Install redis-tools dependencies
## TODO: implicitly install dependencies
Expand Down
4 changes: 0 additions & 4 deletions dockers/docker-orchagent/base_image_files/brctl

This file was deleted.

2 changes: 1 addition & 1 deletion files/image_config/interfaces/interfaces.j2
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ iface {{ interface }} inet manual
{% block vlan_interfaces %}
{% for vlan_interface in minigraph_vlan_interfaces %}
auto {{ vlan_interface['name'] }}
allow-hotplug {{ vlan_interface['name'] }}
iface {{ vlan_interface['name'] }} {{ 'inet' if vlan_interface['addr'] | ipv4 else 'inet6' }} static
bridge_ports none
address {{ vlan_interface['addr'] }}
netmask {{ vlan_interface['mask'] }}
#
Expand Down
1 change: 0 additions & 1 deletion platform/broadcom/docker-orchagent-brcm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ $(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf
$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro

$(DOCKER_ORCHAGENT_BRCM)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
$(DOCKER_ORCHAGENT_BRCM)_BASE_IMAGE_FILES += brctl:/usr/bin/brctl
1 change: 0 additions & 1 deletion platform/cavium/docker-orchagent-cavm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ $(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf
$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro

$(DOCKER_ORCHAGENT_CAVM)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
$(DOCKER_ORCHAGENT_CAVM)_BASE_IMAGE_FILES += brctl:/usr/bin/brctl
1 change: 0 additions & 1 deletion platform/centec/docker-orchagent-centec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ $(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /host/machine.conf:/host/machine.conf
$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro

$(DOCKER_ORCHAGENT_CENTEC)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
$(DOCKER_ORCHAGENT_CENTEC)_BASE_IMAGE_FILES += brctl:/usr/bin/brctl
1 change: 0 additions & 1 deletion platform/mellanox/docker-orchagent-mlnx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ $(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /host/machine.conf:/host/machine.conf
$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro

$(DOCKER_ORCHAGENT_MLNX)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
$(DOCKER_ORCHAGENT_MLNX)_BASE_IMAGE_FILES += brctl:/usr/bin/brctl

0 comments on commit 6a6bc88

Please sign in to comment.