Skip to content

[fast-reboot] Fix arp entries will be cleared after swssconfig restores. #5842

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

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

Conversation

dennis0113
Copy link

- Why I did it
Fix the issue that arp entries restored by swssconfig will be cleared by neighsyncd.
- How I did it
Let swssconfig be executed after than neighsyncd
- How to verify it
After executing fast-reboot command, the arp entries in arp.json can be restored to redis.
- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

- Description for the changelog

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

@ghost
Copy link

ghost commented Nov 6, 2020

CLA assistant check
All CLA requirements met.

stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
dependent_startup_wait_for=neighsyncd:running
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure that neighsyncd:running state does mean that neighsyncd already called AppRestartAssist::registerAppTable().
Potentially there is still a risk for this race condition to happen.
Probably AppRestartAssist::registerAppTable should be fixed - instead of clearing pending data let the orch consume it?
The AppRestartAssist is related to warm logic so such change may affect the warm reboot/restart.
@yxieca @prsunny @tahmed-dev @lguohan

Copy link
Contributor

Choose a reason for hiding this comment

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

This issue is caused by the race condition between the init table and start writing table on two threads. I propose to put the init operation into swssconfig. It does not need to care what the detailed implementation of the underlying 'running' state.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agreed with @stepanblyschak. Could we add a check for warm-reboot at the beginning of AppRestartAssist if it's only needed for warm-reboot?

@bingwang-ms
Copy link
Contributor

I attempted to fix it in sonic-swss sonic-net/sonic-swss#1498. Could you help to have a look at?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants