From 6849a0351c51915232a817ea0ded723006feda9e Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Sat, 27 Jun 2020 01:17:20 -0700 Subject: [PATCH] [redis] Install vanilla redis packages for Buster and Stretch; upgrade Buster to 6.0.5 (#4732) upgrade redis server to 5:6.0.5-1~bpo10+1 --- dockers/docker-base-buster/Dockerfile.j2 | 8 ++------ dockers/docker-base-stretch/Dockerfile.j2 | 8 ++------ dockers/docker-database/Dockerfile.j2 | 3 +++ files/build_templates/sonic_debian_extension.j2 | 2 +- platform/cavium/docker-syncd-cavm-rpc.mk | 2 +- platform/cavium/docker-syncd-cavm.mk | 2 +- platform/vs/docker-sonic-vs.mk | 2 -- platform/vs/docker-sonic-vs/Dockerfile.j2 | 1 + rules/docker-base-buster.mk | 2 +- rules/docker-base-stretch.mk | 2 +- rules/docker-database.mk | 2 -- rules/docker-dhcp-relay.mk | 2 +- rules/docker-iccpd.mk | 2 +- rules/docker-nat.mk | 2 +- rules/docker-orchagent.mk | 2 +- rules/docker-router-advertiser.mk | 2 +- rules/docker-sflow.mk | 2 +- rules/docker-sonic-mgmt-framework.mk | 4 ++-- rules/docker-teamd.mk | 2 +- rules/docker-telemetry.mk | 2 +- rules/redis.mk | 4 ++++ src/sonic-py-swsssdk | 2 +- 22 files changed, 28 insertions(+), 32 deletions(-) diff --git a/dockers/docker-base-buster/Dockerfile.j2 b/dockers/docker-base-buster/Dockerfile.j2 index fcf9832295..1959bb56cb 100644 --- a/dockers/docker-base-buster/Dockerfile.j2 +++ b/dockers/docker-base-buster/Dockerfile.j2 @@ -52,12 +52,8 @@ RUN apt-get update && \ # Install dependencies of supervisor python-pkg-resources \ python-meld3 \ -# dependencies of redis-tools - libatomic1 \ - libjemalloc2 \ - liblua5.1-0 \ - lua-bitop \ - lua-cjson \ +# Install redis-tools + redis-tools=5:6.0.5-1~bpo10+1 \ # common dependencies libpython2.7 \ libdaemon0 \ diff --git a/dockers/docker-base-stretch/Dockerfile.j2 b/dockers/docker-base-stretch/Dockerfile.j2 index 30e59eccf7..f573e94b78 100644 --- a/dockers/docker-base-stretch/Dockerfile.j2 +++ b/dockers/docker-base-stretch/Dockerfile.j2 @@ -50,12 +50,8 @@ RUN apt-get update && \ # Install dependencies of supervisor python-pkg-resources \ python-meld3 \ -# dependencies of redis-tools - libatomic1 \ - libjemalloc1 \ - liblua5.1-0 \ - lua-bitop \ - lua-cjson \ +# Install redis-tools + redis-tools=5:5.0.3-3~bpo9+2 \ # common dependencies libpython2.7 \ libdaemon0 \ diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index 24416c838d..e14be96e85 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -10,6 +10,9 @@ ENV DEBIAN_FRONTEND=noninteractive # Update apt's cache of available packages RUN apt-get update +# install redis-server +RUN apt-get install -y redis-server=5:6.0.5-1~bpo10+1 + {% if docker_database_debs.strip() -%} # Copy locally-built Debian package dependencies {{ copy_files("debs/", docker_database_debs.split(' '), "/debs/") }} diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 635084fd54..14d49c64e5 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -104,7 +104,7 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install $CONFIG sudo rm -rf $FILESYSTEM_ROOT/$CONFIG_ENGINE_WHEEL_NAME # Install Python client for Redis -sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install "redis==2.10.6" +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install "redis==3.5.3" # Install redis-dump-load Python 3 package # Note: the scripts will be overwritten by corresponding Python 2 package diff --git a/platform/cavium/docker-syncd-cavm-rpc.mk b/platform/cavium/docker-syncd-cavm-rpc.mk index ebe614b3c1..a19124609b 100644 --- a/platform/cavium/docker-syncd-cavm-rpc.mk +++ b/platform/cavium/docker-syncd-cavm-rpc.mk @@ -2,7 +2,7 @@ DOCKER_SYNCD_CAVM_RPC = docker-syncd-cavm-rpc.gz $(DOCKER_SYNCD_CAVM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm-rpc -$(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS) $(PTF) +$(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(CAVM_LIBSAI) $(XP_TOOLS) $(PTF) $(DOCKER_SYNCD_CAVM_RPC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) ifeq ($(INSTALL_DEBUG_TOOLS), y) $(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \ diff --git a/platform/cavium/docker-syncd-cavm.mk b/platform/cavium/docker-syncd-cavm.mk index ad43d6f119..059d2c71eb 100644 --- a/platform/cavium/docker-syncd-cavm.mk +++ b/platform/cavium/docker-syncd-cavm.mk @@ -2,7 +2,7 @@ DOCKER_SYNCD_CAVM = docker-syncd-cavm.gz $(DOCKER_SYNCD_CAVM)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm -$(DOCKER_SYNCD_CAVM)_DEPENDS += $(SYNCD) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS) +$(DOCKER_SYNCD_CAVM)_DEPENDS += $(SYNCD) $(CAVM_LIBSAI) $(XP_TOOLS) $(DOCKER_SYNCD_CAVM)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) ifeq ($(INSTALL_DEBUG_TOOLS), y) $(DOCKER_SYNCD_CAVM)_DEPENDS += $(SYNCD_DBG) \ diff --git a/platform/vs/docker-sonic-vs.mk b/platform/vs/docker-sonic-vs.mk index b539543dfd..ab86e4716a 100644 --- a/platform/vs/docker-sonic-vs.mk +++ b/platform/vs/docker-sonic-vs.mk @@ -4,8 +4,6 @@ DOCKER_SONIC_VS = docker-sonic-vs.gz $(DOCKER_SONIC_VS)_PATH = $(PLATFORM_PATH)/docker-sonic-vs $(DOCKER_SONIC_VS)_DEPENDS += $(SWSS) \ $(SYNCD_VS) \ - $(REDIS_TOOLS) \ - $(REDIS_SERVER) \ $(PYTHON_SWSSCOMMON) \ $(LIBTEAMDCTL) \ $(LIBTEAM_UTILS) \ diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index b670ee26b6..89abf3cd63 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -13,6 +13,7 @@ RUN echo "deb http://packages.microsoft.com/repos/sonic-dev/ jessie main" >> /et RUN apt-get update RUN apt-get install -y net-tools \ + redis-server=5:5.0.3-3~bpo9+2 \ arping \ ndisc6 \ ethtool \ diff --git a/rules/docker-base-buster.mk b/rules/docker-base-buster.mk index e1f02d19f3..61ba96eda5 100644 --- a/rules/docker-base-buster.mk +++ b/rules/docker-base-buster.mk @@ -3,7 +3,7 @@ DOCKER_BASE_BUSTER = docker-base-buster.gz $(DOCKER_BASE_BUSTER)_PATH = $(DOCKERS_PATH)/docker-base-buster -$(DOCKER_BASE_BUSTER)_DEPENDS += $(SUPERVISOR) $(REDIS_TOOLS) +$(DOCKER_BASE_BUSTER)_DEPENDS += $(SUPERVISOR) $(DOCKER_BASE_BUSTER)_DEPENDS += $(SOCAT) GDB = gdb diff --git a/rules/docker-base-stretch.mk b/rules/docker-base-stretch.mk index a54f4ec092..55b7fd9f86 100644 --- a/rules/docker-base-stretch.mk +++ b/rules/docker-base-stretch.mk @@ -2,7 +2,7 @@ DOCKER_BASE_STRETCH = docker-base-stretch.gz $(DOCKER_BASE_STRETCH)_PATH = $(DOCKERS_PATH)/docker-base-stretch -$(DOCKER_BASE_STRETCH)_DEPENDS += $(SUPERVISOR) $(REDIS_TOOLS) +$(DOCKER_BASE_STRETCH)_DEPENDS += $(SUPERVISOR) $(DOCKER_BASE_STRETCH)_DEPENDS += $(SOCAT) GDB = gdb diff --git a/rules/docker-database.mk b/rules/docker-database.mk index 9fb15855c2..8062c3b147 100644 --- a/rules/docker-database.mk +++ b/rules/docker-database.mk @@ -6,9 +6,7 @@ DOCKER_DATABASE_DBG = $(DOCKER_DATABASE_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_DATABASE)_PATH = $(DOCKERS_PATH)/$(DOCKER_DATABASE_STEM) -$(DOCKER_DATABASE)_DEPENDS += $(REDIS_TOOLS) $(REDIS_SERVER) $(DOCKER_DATABASE)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) -$(DOCKER_DATABASE)_DBG_DEPENDS += $(REDIS_TOOLS_DBG) $(DOCKER_DATABASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 50d3d23acf..860928bf81 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -6,7 +6,7 @@ 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_RELAY) $(REDIS_TOOLS) $(SONIC_DHCPMON) +$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) $(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) diff --git a/rules/docker-iccpd.mk b/rules/docker-iccpd.mk index 106da8e589..fefa5504df 100644 --- a/rules/docker-iccpd.mk +++ b/rules/docker-iccpd.mk @@ -4,7 +4,7 @@ DOCKER_ICCPD_STEM = docker-iccpd DOCKER_ICCPD = $(DOCKER_ICCPD_STEM).gz DOCKER_ICCPD_DBG = $(DOCKER_ICCPD_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_ICCPD)_PATH = $(DOCKERS_PATH)/$(DOCKER_ICCPD_STEM) -$(DOCKER_ICCPD)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(ICCPD) +$(DOCKER_ICCPD)_DEPENDS += $(SWSS) $(ICCPD) $(DOCKER_ICCPD)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS) $(DOCKER_ICCPD)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) $(ICCPD_DBG) $(DOCKER_ICCPD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES) diff --git a/rules/docker-nat.mk b/rules/docker-nat.mk index eb6bd16ccd..b421bfd886 100644 --- a/rules/docker-nat.mk +++ b/rules/docker-nat.mk @@ -6,7 +6,7 @@ DOCKER_NAT_DBG = $(DOCKER_NAT_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_NAT)_PATH = $(DOCKERS_PATH)/$(DOCKER_NAT_STEM) -$(DOCKER_NAT)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(IPTABLESIP4TC) $(IPTABLESIP6TC) $(IPTABLESIPTC) $(IPXTABLES12) $(IPTABLES) +$(DOCKER_NAT)_DEPENDS += $(SWSS) $(IPTABLESIP4TC) $(IPTABLESIP6TC) $(IPTABLESIPTC) $(IPXTABLES12) $(IPTABLES) $(DOCKER_NAT)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS) $(DOCKER_NAT)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) $(DOCKER_NAT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES) diff --git a/rules/docker-orchagent.mk b/rules/docker-orchagent.mk index bab1a3a299..4d63502ebb 100644 --- a/rules/docker-orchagent.mk +++ b/rules/docker-orchagent.mk @@ -4,7 +4,7 @@ DOCKER_ORCHAGENT_STEM = docker-orchagent DOCKER_ORCHAGENT = $(DOCKER_ORCHAGENT_STEM).gz DOCKER_ORCHAGENT_DBG = $(DOCKER_ORCHAGENT_STEM)-$(DBG_IMAGE_MARK).gz -$(DOCKER_ORCHAGENT)_DEPENDS += $(SWSS) $(REDIS_TOOLS) +$(DOCKER_ORCHAGENT)_DEPENDS += $(SWSS) $(DOCKER_ORCHAGENT)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS) $(DOCKER_ORCHAGENT)_DBG_DEPENDS += $(SWSS_DBG) \ diff --git a/rules/docker-router-advertiser.mk b/rules/docker-router-advertiser.mk index c7efe7c1f5..11549815e2 100644 --- a/rules/docker-router-advertiser.mk +++ b/rules/docker-router-advertiser.mk @@ -6,7 +6,7 @@ DOCKER_ROUTER_ADVERTISER_DBG = $(DOCKER_ROUTER_ADVERTISER_STEM)-$(DBG_IMAGE_MARK $(DOCKER_ROUTER_ADVERTISER)_PATH = $(DOCKERS_PATH)/$(DOCKER_ROUTER_ADVERTISER_STEM) -$(DOCKER_ROUTER_ADVERTISER)_DEPENDS += $(RADVD) $(REDIS_TOOLS) +$(DOCKER_ROUTER_ADVERTISER)_DEPENDS += $(RADVD) $(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) $(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS += $(RADVD_DBG) diff --git a/rules/docker-sflow.mk b/rules/docker-sflow.mk index 67724ad7c5..04700349fb 100644 --- a/rules/docker-sflow.mk +++ b/rules/docker-sflow.mk @@ -6,7 +6,7 @@ DOCKER_SFLOW_DBG = $(DOCKER_SFLOW_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_SFLOW)_PATH = $(DOCKERS_PATH)/$(DOCKER_SFLOW_STEM) -$(DOCKER_SFLOW)_DEPENDS += $(SWSS) $(REDIS_TOOLS) $(HSFLOWD) $(SFLOWTOOL) $(PSAMPLE) +$(DOCKER_SFLOW)_DEPENDS += $(SWSS) $(HSFLOWD) $(SFLOWTOOL) $(PSAMPLE) $(DOCKER_SFLOW)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS) $(DOCKER_TEAMD)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) $(DOCKER_SFLOW)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES) diff --git a/rules/docker-sonic-mgmt-framework.mk b/rules/docker-sonic-mgmt-framework.mk index 7f113f7602..b1e23c026c 100644 --- a/rules/docker-sonic-mgmt-framework.mk +++ b/rules/docker-sonic-mgmt-framework.mk @@ -7,9 +7,9 @@ DOCKER_MGMT_FRAMEWORK_DBG = $(DOCKER_MGMT_FRAMEWORK_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_MGMT_FRAMEWORK)_PATH = $(DOCKERS_PATH)/$(DOCKER_MGMT_FRAMEWORK_STEM) $(DOCKER_MGMT_FRAMEWORK)_DEPENDS += $(SONIC_MGMT_COMMON) -$(DOCKER_MGMT_FRAMEWORK)_DEPENDS += $(REDIS_TOOLS) $(SONIC_MGMT_FRAMEWORK) +$(DOCKER_MGMT_FRAMEWORK)_DEPENDS += $(SONIC_MGMT_FRAMEWORK) $(DOCKER_MGMT_FRAMEWORK)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) -$(DOCKER_MGMT_FRAMEWORK)_DBG_DEPENDS += $(REDIS_TOOLS) $(SONIC_MGMT_FRAMEWORK_DBG) +$(DOCKER_MGMT_FRAMEWORK)_DBG_DEPENDS += $(SONIC_MGMT_FRAMEWORK_DBG) SONIC_DOCKER_IMAGES += $(DOCKER_MGMT_FRAMEWORK) $(DOCKER_MGMT_FRAMEWORK)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) diff --git a/rules/docker-teamd.mk b/rules/docker-teamd.mk index a4ac31599f..49c9dde9ba 100644 --- a/rules/docker-teamd.mk +++ b/rules/docker-teamd.mk @@ -6,7 +6,7 @@ DOCKER_TEAMD_DBG = $(DOCKER_TEAMD_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_TEAMD)_PATH = $(DOCKERS_PATH)/$(DOCKER_TEAMD_STEM) -$(DOCKER_TEAMD)_DEPENDS += $(SWSS) $(LIBTEAMDCTL) $(LIBTEAM_UTILS) $(REDIS_TOOLS) +$(DOCKER_TEAMD)_DEPENDS += $(SWSS) $(LIBTEAMDCTL) $(LIBTEAM_UTILS) $(DOCKER_TEAMD)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS) $(DOCKER_TEAMD)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) $(DOCKER_TEAMD)_DBG_DEPENDS += $(LIBTEAMDCTL_DBG) $(LIBTEAM_UTILS_DBG) diff --git a/rules/docker-telemetry.mk b/rules/docker-telemetry.mk index 761d80a07d..9544e7bf46 100644 --- a/rules/docker-telemetry.mk +++ b/rules/docker-telemetry.mk @@ -7,7 +7,7 @@ DOCKER_TELEMETRY_DBG = $(DOCKER_TELEMETRY_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_TELEMETRY)_PATH = $(DOCKERS_PATH)/$(DOCKER_TELEMETRY_STEM) $(DOCKER_TELEMETRY)_DEPENDS += $(SONIC_MGMT_COMMON) -$(DOCKER_TELEMETRY)_DEPENDS += $(REDIS_TOOLS) $(SONIC_TELEMETRY) +$(DOCKER_TELEMETRY)_DEPENDS += $(SONIC_TELEMETRY) $(DOCKER_TELEMETRY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) $(DOCKER_TELEMETRY)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) diff --git a/rules/redis.mk b/rules/redis.mk index 83b3d81ba6..f4732d1ecb 100644 --- a/rules/redis.mk +++ b/rules/redis.mk @@ -6,7 +6,11 @@ REDIS_TOOLS = redis-tools_$(REDIS_VERSION)_$(CONFIGURED_ARCH).deb $(REDIS_TOOLS)_SRC_PATH = $(SRC_PATH)/redis $(REDIS_TOOLS)_DEPENDS += $(LIBHIREDIS_DEV) $(REDIS_TOOLS)_RDEPENDS += $(LIBHIREDIS) +# TODO: docker-sonic-p4 depends on redis-tools in Jessie. +# Remove this file and src/redis after that resolved. +ifneq ($(BLDENV),buster) SONIC_MAKE_DEBS += $(REDIS_TOOLS) +endif REDIS_TOOLS_DBG = redis-tools-dbgsym_$(REDIS_VERSION)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(REDIS_TOOLS),$(REDIS_TOOLS_DBG))) diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk index 132f8d5f1b..a83366e827 160000 --- a/src/sonic-py-swsssdk +++ b/src/sonic-py-swsssdk @@ -1 +1 @@ -Subproject commit 132f8d5f1b00fb8a1b3cdbd7a5c69bb89cfff0e3 +Subproject commit a83366e827cc08dbd3d22de92773c7ef79215199