-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Bind ASIC database instances to midplane IPs #20803
Conversation
@arlakshm for awareness |
Tracking issue: sonic-net/SONiC#1543 |
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Why I did it
Add support for aggregate VOQ counters.
Work item tracking
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)
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)