Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
2 changes: 1 addition & 1 deletion platform/generic/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
11 changes: 0 additions & 11 deletions rules/docker-snmp-sv2.dep

This file was deleted.

32 changes: 0 additions & 32 deletions rules/docker-snmp-sv2.mk

This file was deleted.

11 changes: 11 additions & 0 deletions rules/docker-snmp.dep
Original file line number Diff line number Diff line change
@@ -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 changes: 32 additions & 0 deletions rules/docker-snmp.mk
Original file line number Diff line number Diff line change
@@ -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