Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:17628] [docker_image_ctl.j2]: swss docker initialization improvements #17681

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

mssonicbld
Copy link
Collaborator

This commit attempts to address the following:
LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bookworm sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh Make sure swss container is indeed up and running before running any commands on it. In case where swss container is not fully up when swss.sh attempts to create swss:/ready file using "docker exec swss$DEV touch", the command can fail silently and can cause swssconfig to wait forever leading to missing IP decap configuration among other things. Add a wait so that docker commands are run only after swss container status is "Running"

  • Add a log when swss:/ready file is created or if the file creation fails so that it becomes easier to debug such scenarios in the future

Why I did it

Work item tracking
  • Microsoft ADO: 25832304

How I did it

Add a wait so that docker commands are run only after swss container status is "Running"

How to verify it

Run /usr/local/bin/swss.sh on a DUT with changes and verify that swss:/ready file is created every time and a
corresponding message is logged in syslog.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

…-net#17628)

* [docker_image_ctl.j2]: swss docker initialization improvements

This commit attempts to address the following:
 * Make sure swss container is indeed up and running before running any commands
   on it. In case where swss container is not fully up when swss.sh attempts to
   create swss:/ready file using "docker exec swss$DEV touch", the command can
   fail silently and can cause swssconfig to wait forever leading to missing IP
   decap configuration among other things. Add a wait so that docker commands
   are run only after swss container status is "Running"
*  Add a log when swss:/ready file is created or if the file creation fails so
   that it becomes easier to debug such scenarios in the future
* [docker_image_ctl.j2]: Use swss$DEV to accommodate multi ASIC platforms as well

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
@mssonicbld
Copy link
Collaborator Author

Original PR: #17628

@mssonicbld mssonicbld merged commit 04d83c0 into sonic-net:202205 Jan 4, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants