Skip to content

Commit

Permalink
[dhcp_relay] Base DHCP Relay Docker container on Debian Stretch (#2832)
Browse files Browse the repository at this point in the history
* Base DHCP relay Docker image on Strech base Docker

* Change URL for isc-dhcp source repository

* Upgrade isc-dhcp source branch to 4.3.5-3.1

* Update patch #1 to apply to isc-dhcp 4.3.5-3.1

* Update patch #2 to apply to isc-dhcp 4.3.5-3.1

* Update patch #3 to apply to isc-dhcp 4.3.5-3.1

* Update patch #4 to apply to isc-dhcp 4.3.5-3.1

* Remove security patches, as they are now applied as part of 4.3.5-3.1 source

* Reorder patches to apply bug fix first, then features

* Extend makefile to build debug Docker image

* Update commit that series file applies against
  • Loading branch information
jleveque authored and lguohan committed Apr 29, 2019
1 parent ad2c1b2 commit b186bb2
Show file tree
Hide file tree
Showing 15 changed files with 580 additions and 927 deletions.
2 changes: 1 addition & 1 deletion dockers/docker-dhcp-relay/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker-config-engine
FROM docker-config-engine-stretch

ARG docker_container_name
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
Expand Down
18 changes: 15 additions & 3 deletions rules/docker-dhcp-relay.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
# Docker image for DHCP relay

DOCKER_DHCP_RELAY = docker-dhcp-relay.gz
$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/docker-dhcp-relay
DOCKER_DHCP_RELAY_STEM = docker-dhcp-relay
DOCKER_DHCP_RELAY = $(DOCKER_DHCP_RELAY_STEM).gz
DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz

$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM)

$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_COMMON) $(ISC_DHCP_RELAY)
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_STRETCH)

SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
SONIC_STRETCH_DOCKERS += $(DOCKER_DHCP_RELAY)

SONIC_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_DHCP_RELAY_DBG)

$(DOCKER_DHCP_RELAY)_CONTAINER_NAME = dhcp_relay
$(DOCKER_DHCP_RELAY)_RUN_OPT += --net=host --privileged -t
Expand Down
4 changes: 3 additions & 1 deletion rules/isc-dhcp.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# isc-dhcp packages

ISC_DHCP_VERSION = 4.3.3-6
ISC_DHCP_VERSION = 4.3.5-3.1

export ISC_DHCP_VERSION

Expand All @@ -10,3 +10,5 @@ SONIC_MAKE_DEBS += $(ISC_DHCP_COMMON)

ISC_DHCP_RELAY = isc-dhcp-relay_$(ISC_DHCP_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(ISC_DHCP_COMMON),$(ISC_DHCP_RELAY)))

SONIC_STRETCH_DEBS += $(ISC_DHCP_COMMON) $(ISC_DHCP_RELAY)
2 changes: 1 addition & 1 deletion src/isc-dhcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf ./isc-dhcp

# Clone isc-dhcp repo
git clone https://salsa.debian.org/berni/isc-dhcp.git
git clone https://salsa.debian.org/dhcp-team/isc-dhcp.git
pushd ./isc-dhcp

# Reset HEAD to the commit of the proper tag
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 2bb21fcf4a9ad7535867809c50d2cf0ba1088e17 Mon Sep 17 00:00:00 2001
From 7c1cfd636be589317710a8556a7ec667debee53a Mon Sep 17 00:00:00 2001
From: Joe LeVeque <jolevequ@microsoft.com>
Date: Fri, 9 Mar 2018 01:43:35 +0000
Date: Fri, 26 Apr 2019 01:37:54 +0000
Subject: [PATCH] [Bugfix] Don't print log messages to stderr in release builds

---
Expand All @@ -24,5 +24,5 @@ index 7c91d9d..aa74fd8 100644
void (*log_cleanup) (void);

--
2.1.4
2.17.1

This file was deleted.

Loading

0 comments on commit b186bb2

Please sign in to comment.