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

Bind ASIC database instances to midplane IPs #20803

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vivekverma-arista
Copy link
Contributor

@vivekverma-arista vivekverma-arista commented Nov 14, 2024

Why I did it

Add support for aggregate VOQ counters.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Bound ASIC redis database instances on linecards to IPs in midplane subnet (in addition to lo and docker network IPs) so that they are accessible from supervisor and queuestat can access those and aggregate VOQ counters.

CLI changes: #3617

How to verify it

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)

@kenneth-arista
Copy link
Contributor

@arlakshm for awareness

@kenneth-arista
Copy link
Contributor

Tracking issue: sonic-net/SONiC#1543

@arlakshm
Copy link
Contributor

Please add more details how what problem is PR is trying to solve

@@ -300,6 +306,14 @@ function postStartAction()
REDIS_BMP_SOCK="/var/run/redis/redis_bmp.sock"
chgrp -f redis $REDIS_SOCK && chmod -f 0760 $REDIS_SOCK
chgrp -f redis $REDIS_BMP_SOCK && chmod -f 0760 $REDIS_BMP_SOCK

if [[ $DEV && $midplane_ip ]]; then
IFS=_ read ip port < <(jq -r '.INSTANCES | [.redis.hostname, .redis.port] | join("_")' /var/run/redis$DEV/sonic-db/database_config.json)
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead doing a bind here using redis-cli. Is it possible to update the hostIP to midplane-ip database_config.json for chassis?

Copy link
Contributor Author

@vivekverma-arista vivekverma-arista Nov 18, 2024

Choose a reason for hiding this comment

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

I have explored that possibility as well.

The issue is that midplane IPs take a little longer to get assigned when the switch is coming up whereas the docker network IPs are already available by the time this script starts running: https://github.com/sonic-net/sonic-buildimage/blob/master/dockers/docker-database/docker-database-init.sh#L5-L10

If we want to update database_config.json and bind redis instances to midplane IPs alone, the instantiation of redis database instances has to be delayed till the midplane IPs are assigned.

Delaying something critical as database which also happens to be SPOF for the entire system can have consequences and it's an unknown territory. We don't know all the consequences it can have.

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.

3 participants