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
3 changes: 1 addition & 2 deletions files/image_config/monit/container_checker
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ check program container_checker with path "/usr/bin/container_checker"
import docker
import sys

import swsssdk
from sonic_py_common import multi_asic, device_info
from swsscommon import swsscommon

Expand All @@ -34,7 +33,7 @@ def get_expected_running_containers():
@return: A set which contains the expected running containers and a set that has
containers marked as "always_enabled".
"""
config_db = swsssdk.ConfigDBConnector()
config_db = swsscommon.ConfigDBConnector()
config_db.connect()
feature_table = config_db.get_table("FEATURE")

Expand Down
4 changes: 2 additions & 2 deletions files/scripts/supervisor-proc-exit-listener
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import syslog
import time
from collections import defaultdict

import swsssdk
from swsscommon import swsscommon

from supervisor import childutils

Expand Down Expand Up @@ -87,7 +87,7 @@ def get_autorestart_state(container_name):
@summary: Read the status of auto-restart feature from Config_DB.
@return: Return the status of auto-restart feature.
"""
config_db = swsssdk.ConfigDBConnector()
config_db = swsscommon.ConfigDBConnector()
config_db.connect()
features_table = config_db.get_table(FEATURE_TABLE_NAME)
if not features_table:
Expand Down
2 changes: 1 addition & 1 deletion rules/asyncsnmp-py3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ ASYNCSNMP_PY3 = asyncsnmp-2.1.0-py3-none-any.whl
$(ASYNCSNMP_PY3)_SRC_PATH = $(SRC_PATH)/sonic-snmpagent
$(ASYNCSNMP_PY3)_PYTHON_VERSION = 3
# Depends on sonic-platform-common so it is possible to import sonic_psu
$(ASYNCSNMP_PY3)_DEPENDS += $(SWSSSDK_PY3) $(SONIC_PLATFORM_COMMON_PY3)
$(ASYNCSNMP_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3)
$(ASYNCSNMP_PY3)_DEBS_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
SONIC_PYTHON_WHEELS += $(ASYNCSNMP_PY3)
2 changes: 1 addition & 1 deletion rules/dbsyncd-py3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
DBSYNCD_PY3 = sonic_d-2.0.0-py3-none-any.whl
$(DBSYNCD_PY3)_SRC_PATH = $(SRC_PATH)/sonic-dbsyncd
$(DBSYNCD_PY3)_PYTHON_VERSION = 3
$(DBSYNCD_PY3)_DEPENDS += $(SWSSSDK_PY3)
$(DBSYNCD_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3)
$(DBSYNCD_PY3)_DEBS_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
SONIC_PYTHON_WHEELS += $(DBSYNCD_PY3)
1 change: 0 additions & 1 deletion rules/docker-config-engine-bullseye.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ $(DOCKER_CONFIG_ENGINE_BULLSEYE)_DEPENDS += $(LIBSWSSCOMMON) \
$(LIBYANG_PY3) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE_BULLSEYE)_PYTHON_WHEELS += $(SWSSSDK_PY3)
$(DOCKER_CONFIG_ENGINE_BULLSEYE)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
$(SONIC_YANG_MGMT_PY3) \
$(SONIC_YANG_MODELS_PY3)
Expand Down
1 change: 0 additions & 1 deletion rules/docker-config-engine-buster.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ $(DOCKER_CONFIG_ENGINE_BUSTER)_DEPENDS += $(LIBSWSSCOMMON) \
$(LIBYANG_PY3) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE_BUSTER)_PYTHON_WHEELS += $(SWSSSDK_PY3)
$(DOCKER_CONFIG_ENGINE_BUSTER)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
$(SONIC_YANG_MGMT_PY3) \
$(SONIC_YANG_MODELS_PY3)
Expand Down
1 change: 0 additions & 1 deletion rules/docker-config-engine-stretch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ $(DOCKER_CONFIG_ENGINE_STRETCH)_PATH = $(DOCKERS_PATH)/docker-config-engine-stre
$(DOCKER_CONFIG_ENGINE_STRETCH)_DEPENDS += $(LIBSWSSCOMMON) \
$(PYTHON_SWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SWSSSDK_PY2)
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY2)
$(DOCKER_CONFIG_ENGINE_STRETCH)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY2)
$(DOCKER_CONFIG_ENGINE_STRETCH)_LOAD_DOCKERS += $(DOCKER_BASE_STRETCH)
Expand Down
1 change: 0 additions & 1 deletion rules/docker-config-engine.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ DOCKER_CONFIG_ENGINE = docker-config-engine.gz
$(DOCKER_CONFIG_ENGINE)_PATH = $(DOCKERS_PATH)/docker-config-engine
$(DOCKER_CONFIG_ENGINE)_DEPENDS += $(LIBSWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SWSSSDK_PY2)
Copy link
Contributor Author

@liuh-80 liuh-80 Aug 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Database container depends on redis and redis-dump-load
And after remove SWSSSDK_PY2, the indirect depency also been removed, so some test case failed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this removal also deprecate the redis-dump-load functionality?
What if users still want to use redis-dump-load?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our container does not have redis-dump. We have include this change: #12185

Is there other changes that we are missing?

Copy link
Contributor

@mint570 mint570 Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it is missing the entry script:

ls /usr/local/bin/redis-dump

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we are using sonic-db-dump instead of redis-dump now.
Are they basically the same thing?
Are we removing redis-dump?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand now. sonic-db-dump-load is built on top of redis-dump-load. So it needs redis-dump-load as dependency. Currently, for sonic_py_common python3 package, it does not list redis-dump-load as dependency. And hence sonic-db-dump-load doesn't work. This needs to be fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mint570 , here is the fix PR: #14347

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mint570, may I know how you found this issue, some command failed or errro in syslog? I will create a sonic-mgmt test case to prevent this happen again, so need understand the break scenario.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just called sonic-db-dump in the container, it failed with the redisdl import.
(Initially I was looking for redis-dump, but there is no such tool in the container.)

$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY2)
$(DOCKER_CONFIG_ENGINE)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY2)
$(DOCKER_CONFIG_ENGINE)_LOAD_DOCKERS += $(DOCKER_BASE)
Expand Down
1 change: 0 additions & 1 deletion rules/docker-platform-monitor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL)


$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_API_PY3)
Expand Down
3 changes: 2 additions & 1 deletion rules/docker-snmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ $(DOCKER_SNMP)_DEPENDS += $(SNMP) $(SNMPD)

$(DOCKER_SNMP)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS)
$(DOCKER_SNMP)_DBG_DEPENDS += $(SNMP_DBG) $(SNMPD_DBG) $(LIBSNMP_DBG)
$(DOCKER_SNMP)_DBG_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)

$(DOCKER_SNMP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES)

$(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SWSSSDK_PY3) $(ASYNCSNMP_PY3)
$(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(ASYNCSNMP_PY3)
$(DOCKER_SNMP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE)

$(DOCKER_SNMP)_VERSION = 1.0.0
Expand Down
3 changes: 1 addition & 2 deletions rules/sonic-host-services.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
SONIC_HOST_SERVICES_PY3 = sonic_host_services-1.0-py3-none-any.whl
$(SONIC_HOST_SERVICES_PY3)_SRC_PATH = $(SRC_PATH)/sonic-host-services
$(SONIC_HOST_SERVICES_PY3)_PYTHON_VERSION = 3
$(SONIC_HOST_SERVICES_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3) \
$(SWSSSDK_PY3)
$(SONIC_HOST_SERVICES_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3)
$(SONIC_HOST_SERVICES_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) \
$(PYTHON3_SWSSCOMMON)
SONIC_PYTHON_WHEELS += $(SONIC_HOST_SERVICES_PY3)
1 change: 0 additions & 1 deletion rules/sonic-utilities.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ $(SONIC_UTILITIES_PY3)_PYTHON_VERSION = 3
$(SONIC_UTILITIES_PY3)_NAME = $(SONIC_UTILITIES_PY3_NAME)
$(SONIC_UTILITIES_PY3)_VERSION = $(SONIC_UTILITIES_PY3_VERSION)
$(SONIC_UTILITIES_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY3) \
$(SWSSSDK_PY3) \
$(SONIC_CONFIG_ENGINE_PY3) \
$(SONIC_PLATFORM_COMMON_PY3) \
$(SONIC_YANG_MGMT_PY3) \
Expand Down
3 changes: 2 additions & 1 deletion rules/sonic-ztp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ SONIC_ZTP_VERSION = 1.0.0

SONIC_ZTP = sonic-ztp_$(SONIC_ZTP_VERSION)_all.deb
$(SONIC_ZTP)_SRC_PATH = $(SRC_PATH)/sonic-ztp
$(SONIC_ZTP)_WHEEL_DEPENDS += $(SWSSSDK_PY3)
$(SONIC_ZTP)_PYTHON_VERSION = 3
$(SONIC_ZTP)_DEBS_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
SONIC_DPKG_DEBS += $(SONIC_ZTP)

export SONIC_ZTP_VERSION
Expand Down