[gearbox] provide common gbsyncd.service.j2 to start for platform specific gbsyncd docker (#9332)

Why I did it
Fix #9059. It provides common gbsyncd.service.j2 to start for platform specific gbsyncd docker, which must be named 'gbsyncd'.

How I did it
All of platform specific gbsyncd dockers use a common name 'gbsyncd'
Use a unique systemd service template gbsyncd.service.j2 for gbsyncd docker
This commit is contained in:
Junhua Zhai 2021-11-24 02:44:29 +08:00 committed by GitHub
parent 7fc347010f
commit 240596ec7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 7 deletions

View File

@ -1 +0,0 @@
gbsyncd.service.j2

View File

@ -1 +0,0 @@
gbsyncd.service.j2

View File

@ -7,17 +7,17 @@ PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`}
DEVPATH="/usr/share/sonic/device"
CONFIGFILE="${DEVPATH}/${PLATFORM}/gbsyncd.ini"
# Skip checking the service for vs
[ "$sonic_asic_platform" = vs ] && exit 0
if [ ! -f "$CONFIGFILE" ]; then
if [ gbsyncd = "$SERVICE" ]; then
exit 0
fi
exit 1
fi
while IFS="=" read -r key value; do
case "$key" in
platform)
if [ "$value" = "$SERVICE" ]; then
if [[ "$value" = "$SERVICE"* ]]; then
exit 0
fi
;;

View File

@ -9,7 +9,6 @@ ifneq ($($(LIBSAI_CREDO)_URL),)
include $(PLATFORM_PATH)/../template/docker-gbsyncd-base.mk
$(DOCKER_GBSYNCD_BASE)_VERSION = 1.0.0
$(DOCKER_GBSYNCD_BASE)_PACKAGE_NAME = gbsyncd
$(DOCKER_GBSYNCD_BASE)_CONTAINER_NAME = gbsyncd-$(DOCKER_GBSYNCD_PLATFORM_CODE)
$(DOCKER_GBSYNCD_BASE)_PATH = $(PLATFORM_PATH)/../components/docker-gbsyncd-$(DOCKER_GBSYNCD_PLATFORM_CODE)
SONIC_ONLINE_DEBS += $(LIBSAI_CREDO) $(LIBSAI_CREDO_OWL)
$(DOCKER_GBSYNCD_BASE)_DEPENDS += $(SYNCD) $(LIBSAI_CREDO) $(LIBSAI_CREDO_OWL)