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

[feature request] Add reconciliation loop to check route entries and vpn connections periodically. #10

Open
DrmagicE opened this issue Mar 20, 2022 · 0 comments

Comments

@DrmagicE
Copy link
Member

Currently, If failure happens while setting route table or IPsec connection, we will requeue the event and retry later.

func (c *EngineController) handleEventErr(err error, event interface{}) {
if err == nil {
c.queue.Forget(event)
return
}
if c.queue.NumRequeues(event) < maxRetries {
klog.Infof("error syncing event %v: %v", event, err)
c.queue.AddRateLimited(event)
return
}
utilruntime.HandleError(err)
klog.Infof("dropping event %q out of the queue: %v", event, err)
c.queue.Forget(event)
}

This approach has some problems:

  1. The re-entered event may break correctness.
  2. If max retries exceeded, the event get lost forever.
  3. If rules are deleted by the user accidentally, there is no way to recover. (unless to restart the agent)

To improve this, we need a reconciliation mechanism to compare the current state of the node and the desired state (sync from the informer) periodically and make any required changes if they are mismatched.

@BSWANG BSWANG added this to TODO in 0.2 May 25, 2022
@njucjc njucjc moved this from TODO to In Progress in 0.2 Jul 12, 2022
@njucjc njucjc moved this from In Progress to TODO in 0.2 Jul 12, 2022
@BSWANG BSWANG removed this from TODO in 0.2 Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
0.3
Awaiting triage
backlog
Awaiting triage
Status: 🆕 New
Development

No branches or pull requests

1 participant