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

[orchagent] Use mac address from config_db instead of from eth0 #4166

Merged
merged 2 commits into from
Feb 21, 2020

Conversation

prsunny
Copy link
Contributor

@prsunny prsunny commented Feb 18, 2020

- What I did
Due to hardware issues, sometimes eth0 mac is found to be different from config_db mac. In this case, the switch mac in hardware was programmed as a different mac w.r.t interface mac addresses in kernel. This results in packet drops in hardware due to mac mismatch

- How I did it
Modified start script

- How to verify it
Change config_db mac and test

- Description for the changelog

redis-cli -n 4 hset "DEVICE_METADATA|localhost" mac "00:00:aa:bb:cc:dd"
ps -aux | grep orch
root      1419  /usr/bin/orchagent -d /var/log/swss -b 8192 -m 00:00:aa:bb:cc:dd

redis-cli -n 4 hset "DEVICE_METADATA|localhost" mac "None"
ps -aux | grep orch
root       793  /usr/bin/orchagent -d /var/log/swss -b 8192 -m 4c:76:25:f0:89:40

redis-cli -n 4 del "DEVICE_METADATA|localhost" 
root@str-z9100-acs-2:/# /usr/bin/orchagent.sh 
jinja2.exceptions.UndefinedError: 'DEVICE_METADATA' is undefined

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

@prsunny prsunny requested review from lguohan, jleveque and yxieca and removed request for lguohan February 18, 2020 23:14
yxieca
yxieca previously approved these changes Feb 18, 2020
Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

Suggest replacing backticks with the more modern $(...) syntax

@prsunny
Copy link
Contributor Author

prsunny commented Feb 19, 2020

retest vs please

@prsunny
Copy link
Contributor Author

prsunny commented Feb 19, 2020

retest vsimage please

1 similar comment
@prsunny
Copy link
Contributor Author

prsunny commented Feb 19, 2020

retest vsimage please

@jleveque
Copy link
Contributor

retest vsimage please

@jleveque jleveque changed the title Use mac address from config_db instead of eth0 [orchagent] Use mac address from config_db instead of from eth0 Feb 20, 2020
@prsunny
Copy link
Contributor Author

prsunny commented Feb 20, 2020

retest vsimage please

@jleveque
Copy link
Contributor

Retest vsimage please

@prsunny prsunny merged commit fbc24b4 into sonic-net:master Feb 21, 2020
@prsunny prsunny deleted the orch_mac branch February 21, 2020 03:16
abdosi pushed a commit that referenced this pull request Feb 24, 2020
* Use mac address from config_db instead of eth0
yxieca pushed a commit that referenced this pull request Feb 25, 2020
* Use mac address from config_db instead of eth0
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request Feb 26, 2020
pphuchar pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Mar 9, 2020
tiantianlv pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Apr 24, 2020
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.

4 participants