[dockers] Rename 'docker-snmp-sv2' to 'docker-snmp' (#4699)
The `-sv2` suffix was used to differentiate SNMP Dockers when we transitioned from "SONiCv1" to "SONiCv2", about four years ago. The old Docker materials were removed long ago; there is no need to keep this suffix. Removing it aligns the name with all the other Dockers. Also edit Monit configuration to detect proper snmp-subagent command line in Buster, and make snmpd command line matching more robust.
This commit is contained in:
parent
2e93a92bd9
commit
5d5d5739c2
@ -19,12 +19,12 @@ RUN apt-get update && \
|
||||
make \
|
||||
ipmitool
|
||||
|
||||
{% if docker_snmp_sv2_debs.strip() -%}
|
||||
{% if docker_snmp_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_snmp_sv2_debs.split(' '), "/debs/") }}
|
||||
{{ copy_files("debs/", docker_snmp_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_snmp_sv2_debs.split(' ')) }}
|
||||
{{ install_debian_packages(docker_snmp_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
# Fix for hiredis compilation issues for ARM
|
||||
@ -46,12 +46,12 @@ RUN python3 -m pip install --no-cache-dir \
|
||||
pyyaml \
|
||||
smbus
|
||||
|
||||
{% if docker_snmp_sv2_whls.strip() -%}
|
||||
{% if docker_snmp_whls.strip() -%}
|
||||
# Copy locally-built Python wheel dependencies
|
||||
{{ copy_files("python-wheels/", docker_snmp_sv2_whls.split(' '), "/python-wheels/") }}
|
||||
{{ copy_files("python-wheels/", docker_snmp_whls.split(' '), "/python-wheels/") }}
|
||||
|
||||
# Install locally-built Python wheel dependencies
|
||||
{{ install_python3_wheels(docker_snmp_sv2_whls.split(' ')) }}
|
||||
{{ install_python3_wheels(docker_snmp_whls.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
RUN python3 -m sonic_ax_impl install
|
@ -4,8 +4,8 @@
|
||||
## snmpd
|
||||
## snmpd_subagent
|
||||
###############################################################################
|
||||
check process snmpd matching "/usr/sbin/snmpd -f"
|
||||
check process snmpd matching "/usr/sbin/snmpd\s"
|
||||
if does not exist for 5 times within 5 cycles then alert
|
||||
|
||||
check process snmp_subagent matching "python3.6 -m sonic_ax_impl"
|
||||
check process snmp_subagent matching "python3 -m sonic_ax_impl"
|
||||
if does not exist for 5 times within 5 cycles then alert
|
@ -2,8 +2,8 @@ include $(PLATFORM_PATH)/aboot-image.mk
|
||||
include $(PLATFORM_PATH)/onie-image.mk
|
||||
|
||||
SONIC_ALL += $(DOCKER_DATABASE) \
|
||||
$(DOCKER_SNMP) \
|
||||
$(DOCKER_LLDP) \
|
||||
$(DOCKER_SNMP_SV2) \
|
||||
$(DOCKER_PLATFORM_MONITOR) \
|
||||
$(DOCKER_DHCP_RELAY) \
|
||||
$(DOCKER_PTF) \
|
||||
|
@ -1,11 +0,0 @@
|
||||
|
||||
DPATH := $($(DOCKER_SNMP_SV2)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-snmp-sv2.mk rules/docker-snmp-sv2.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_SNMP_SV2)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_SNMP_SV2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_SNMP_SV2)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
$(eval $(call add_dbg_docker,$(DOCKER_SNMP_SV2),$(DOCKER_SNMP_SV2_DBG)))
|
@ -1,32 +0,0 @@
|
||||
# docker image for snmp agent
|
||||
|
||||
DOCKER_SNMP_SV2_STEM = docker-snmp-sv2
|
||||
DOCKER_SNMP_SV2 = $(DOCKER_SNMP_SV2_STEM).gz
|
||||
DOCKER_SNMP_SV2_DBG = $(DOCKER_SNMP_SV2_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_SNMP_SV2)_PATH = $(DOCKERS_PATH)/docker-snmp-sv2
|
||||
|
||||
## TODO: remove LIBPY3_DEV if we can get pip3 directly
|
||||
$(DOCKER_SNMP_SV2)_DEPENDS += $(SNMP) $(SNMPD)
|
||||
|
||||
$(DOCKER_SNMP_SV2)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_SNMP_SV2)_DBG_DEPENDS += $(SNMP_DBG) $(SNMPD_DBG) $(LIBSNMP_DBG)
|
||||
|
||||
$(DOCKER_SNMP_SV2)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_SNMP_SV2)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3) $(SWSSSDK_PY3) $(ASYNCSNMP_PY3)
|
||||
$(DOCKER_SNMP_SV2)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SNMP_SV2)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SNMP_SV2)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SNMP_SV2_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SNMP_SV2_DBG)
|
||||
|
||||
$(DOCKER_SNMP_SV2)_CONTAINER_NAME = snmp
|
||||
$(DOCKER_SNMP_SV2)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_SNMP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
# mount Arista platform python libraries to support corresponding platforms SNMP power status query
|
||||
$(DOCKER_SNMP_SV2)_RUN_OPT += -v /usr/lib/python3/dist-packages/arista:/usr/lib/python3/dist-packages/arista:ro
|
||||
$(DOCKER_SNMP_SV2)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
||||
$(DOCKER_SNMP_SV2)_BASE_IMAGE_FILES += monit_snmp:/etc/monit/conf.d
|
11
rules/docker-snmp.dep
Normal file
11
rules/docker-snmp.dep
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
DPATH := $($(DOCKER_SNMP)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-snmp.mk rules/docker-snmp.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_SNMP)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_SNMP)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_SNMP)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
$(eval $(call add_dbg_docker,$(DOCKER_SNMP),$(DOCKER_SNMP_DBG)))
|
32
rules/docker-snmp.mk
Normal file
32
rules/docker-snmp.mk
Normal file
@ -0,0 +1,32 @@
|
||||
# docker image for snmp agent
|
||||
|
||||
DOCKER_SNMP_STEM = docker-snmp
|
||||
DOCKER_SNMP = $(DOCKER_SNMP_STEM).gz
|
||||
DOCKER_SNMP_DBG = $(DOCKER_SNMP_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_SNMP)_PATH = $(DOCKERS_PATH)/docker-snmp
|
||||
|
||||
## TODO: remove LIBPY3_DEV if we can get pip3 directly
|
||||
$(DOCKER_SNMP)_DEPENDS += $(SNMP) $(SNMPD)
|
||||
|
||||
$(DOCKER_SNMP)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_SNMP)_DBG_DEPENDS += $(SNMP_DBG) $(SNMPD_DBG) $(LIBSNMP_DBG)
|
||||
|
||||
$(DOCKER_SNMP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3) $(SWSSSDK_PY3) $(ASYNCSNMP_PY3)
|
||||
$(DOCKER_SNMP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SNMP)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SNMP)
|
||||
|
||||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SNMP_DBG)
|
||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SNMP_DBG)
|
||||
|
||||
$(DOCKER_SNMP)_CONTAINER_NAME = snmp
|
||||
$(DOCKER_SNMP)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_SNMP)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
# mount Arista platform python libraries to support corresponding platforms SNMP power status query
|
||||
$(DOCKER_SNMP)_RUN_OPT += -v /usr/lib/python3/dist-packages/arista:/usr/lib/python3/dist-packages/arista:ro
|
||||
$(DOCKER_SNMP)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
||||
$(DOCKER_SNMP)_BASE_IMAGE_FILES += monit_snmp:/etc/monit/conf.d
|
Loading…
Reference in New Issue
Block a user