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

[Supervisor][fabric] Fix the error message for non-present fabric card during config reload on SUP #19778

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mlok-nokia
Copy link
Contributor

@mlok-nokia mlok-nokia commented Aug 2, 2024

Why I did it

After a config reload or a config load_minigraph we see the following error messages in the syslog for non existing fabric cards:

ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd0 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd0/json: Not Found ("No such container: syncd0")
ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd1 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd1/json: Not Found ("No such container: syncd1")

On Sup, for non-existing Fabric slot, its related swss and syncd containers have not been created yet although its related services have been started.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Added checking to the docker_image_ctrl.j2 stop() method. This change adds code to check if related container exists, then call container stop. Otherwise, just log a message to indicate that "No such container". Fixes #19765

How to verify it

  1. execute "config reload" on SUP which contains empty Fabric slot.
  2. The following related error message should not be seen in syslog
ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd0 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd0/json: Not Found ("No such container: syncd0")
ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd1 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd1/json: Not Found ("No such container: syncd1")
  1. Instead, the following message should be shown for the related empty Fabric slot
2024 Sep 19 17:45:18.339106 ixre-cpm-chassis15 INFO swss.sh[2024819]: container stop swss0 -- No such container: swss0
2024 Sep 19 17:45:20.633519 ixre-cpm-chassis15 INFO syncd.sh[2025664]: container stop syncd0 -- No such container: syncd0

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

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

Tested branch (Please provide the tested image version)

  • master
  • 2022405

Description for the changelog

Link to config_db schema for YANG module changes

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

@mlok-nokia
Copy link
Contributor Author

@abdosi I have changed the code to be more generic to check if docker doesn't exist, log a message. Please review it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

No such container error message for non existing fabric cards with config reload/load_minigrph
2 participants