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

[hostcfgd] Fix the state machine during eth0 default route check failure #196

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

Conversation

vivekrnv
Copy link
Contributor

  • The last del command in the following flow will fail because of a bug in MgmtIfaceCfg. During vrf add, it tries to update the default route and if the route is not present, the command will write an error log

  • MgmtIfaceCfg is not saving the saving the state in the internal variable. This will cause problem next time and update comes.

    config vrf add mgmt
    config vrf del mgmt
    config vrf add mgmt
    config vrf del mgmt
    
  • Added a UT and verified the fix

    Dec 18 03:57:43 sonic hostcfgd[98362]: MgmtIfaceCfg: mgmt vrf state update
    Dec 18 03:57:43 sonic hostcfgd[98362]: Set mgmt vrf state true
    Dec 18 03:57:50 sonic hostcfgd[98362]: MgmtIfaceCfg: Could not delete eth0 route
    Dec 18 03:58:05 sonic hostcfgd[98362]: MgmtIfaceCfg: mgmt vrf state update
    Dec 18 03:58:05 sonic hostcfgd[98362]: Set mgmt vrf state false
    

@vivekrnv vivekrnv requested a review from fastiuk December 19, 2024 07:15
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.

2 participants