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

Fix portmgr write partial port config to app DB issue. #3304

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Sep 29, 2024

Fix portmgr write partial port config to app DB issue.

Why I did it

Test case test_add_remove_neg_admin_status unstable.

Work item tracking

How I did it

Improve portmgr code to write all port config with one API call.

How to verify it

Pass all UT.
Manually verify issue fixed.

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

Fix portmgr write partial port config to app DB issue.

Link to config_db schema for YANG module changes

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

@liuh-80 liuh-80 requested a review from qiluo-msft September 29, 2024 08:00
@liuh-80 liuh-80 marked this pull request as ready for review September 29, 2024 08:00
@liuh-80 liuh-80 requested a review from prsunny as a code owner September 29, 2024 08:00
// Port configuration is handled by the orchagent. If the configuration is written to the APP DB using
// multiple Redis write commands, the orchagent may receive a partial configuration and create a port
// with incorrect settings.
field_values.emplace_back("mtu", mtu);
Copy link
Collaborator

Choose a reason for hiding this comment

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

there are defaults in orchagent for these attributes. are you saying those defaults are different from this ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @prsunny , the problem here is the invalid admin status missing in database, which cause the port been created:
2024-09-20.02:50:54.253615|PORT_TABLE:Ethernet1000|SET|lanes:1000,1001,1002,1003|speed:100000|mtu:9100

@qiluo-msft qiluo-msft requested a review from lguohan October 4, 2024 17:41
@prsunny prsunny merged commit 8b99543 into sonic-net:master Oct 4, 2024
17 checks passed
@yejianquan
Copy link

@bingwang-ms for viz

mssonicbld pushed a commit to mssonicbld/sonic-swss that referenced this pull request Oct 14, 2024
Fix portmgr write partial port config to app DB issue.

Why I did it
Test case test_add_remove_neg_admin_status unstable.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #3327

mssonicbld pushed a commit that referenced this pull request Oct 14, 2024
Fix portmgr write partial port config to app DB issue.

Why I did it
Test case test_add_remove_neg_admin_status unstable.
divyachandralekha pushed a commit to divyachandralekha/sonic-swss that referenced this pull request Dec 12, 2024
Fix portmgr write partial port config to app DB issue.

Why I did it
Test case test_add_remove_neg_admin_status unstable.
divyachandralekha pushed a commit to divyachandralekha/sonic-swss that referenced this pull request Dec 12, 2024
Fix portmgr write partial port config to app DB issue.

Why I did it
Test case test_add_remove_neg_admin_status unstable.
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.

7 participants