-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Bind default namespace database container to midplane ip #23837
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
base: master
Are you sure you want to change the base?
Bind default namespace database container to midplane ip #23837
Conversation
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@qiluo-msft @arlakshm @judyjoseph please review. This is a continuation of: #20803 for single ASIC linecards |
|
can we update PR subject as this is more of infrastructure change |
|
@manish1-arista Did we make sure it is not impacting exiting T2 VoQ stats aggregation? Also, please update subject as per Abhishek comment. |
Updated |
Yes, we have verified this. The changes do not cause any regressions to the existing T2 VoQ stats aggregation. |
| {%- if docker_container_name == "database" %} | ||
| midplane_ip="" | ||
| CHASSISDB_CONF="/usr/share/sonic/device/$PLATFORM/chassisdb.conf" | ||
| if [[ -f $CHASSISDB_CONF ]]; then |
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.
add check for $DATABASE_TYPE != "dpudb"
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.
Added
| if [[ $DEV && $midplane_ip ]]; then | ||
| # Binding the midplane ip to the redisdb | ||
| if [[ -n "$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.
here we are looking at "/var/run/redis$DEV/sonic-db/database_config.json", $DEV for host is empty? Can you confirm
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.
Yes
|
@manish1-arista, please add to PR description(How did you verify) before and after test results of this change in communication between LC host database <--> chassis db in sup |
|
/azp run |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
On a linecard, the database container is bound to localhost (127.0.0.1) by default. This prevents other components in the chassis, such as the supervisor card, from accessing the linecard's database over the midplane network. This change exposes the database instance to the midplane, allowing for remote access from the supervisor. Signed-off-by: manish <[email protected]>
fcde75e to
d23b8db
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This feature has been tracked at: sonic-net/SONiC#2020
Why I did it
On a linecard, the default namespace database container is only bound to localhost (127.0.0.1).
This prevents other components in the chassis, such as the supervisor card,
from accessing the linecard's default namespace database over the midplane network to aggregate the VOQ counters for Single ASIC Linecards.
Work item tracking
How I did it
Set the protected-mode no and bind the linecard's eth1-midplane IP address to the default namespace database container, allowing for remote access from the supervisor to collect the VOQ counters.
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Master
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)