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

Fixing route-operator not processing tunnelendpoints.net.liqo.io resources on restart #266

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

alacuku
Copy link
Member

@alacuku alacuku commented Sep 16, 2020

Description

This PR fixes the route-operator not processing tunnelendpoints.net.liqo.io resources when restarted.
When the operator proccessed a tunnelendpoints.net.liqo.io instance it added a label to the resource to say that it has been processed. Each time the reconcile function of the operator is called upon an update event of the resource it checks if the label is present if yes it would do nothing. This label prevents also the operator to reconcile the state of a resource according to the resyncPeriod. The resyncPeriod is really important to check that the routes and iptables rules have not been modified by an external actor.
This check was introduced to sync the various operators that handled a tunnelendpoints.net.liqo.io resource.
Fixes #264

How Has This Been Tested?

Restarting the route-operator pod and verifying that:

  1. liqo-routes are not present while the route-operator is not running
  2. liqo-routes are installed after the restart

@alacuku alacuku force-pushed the kcl/routeOperator-fix-notProcessingTEPOnRestart branch from 507ae20 to ea2811f Compare September 16, 2020 12:56
@alacuku alacuku linked an issue Sep 16, 2020 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Sep 16, 2020

Pull Request Test Coverage Report for Build 257686174

  • 6 of 11 (54.55%) changed or added relevant lines in 1 file are covered.
  • 9 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 50.709%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/liqonet/route-operator.go 6 11 54.55%
Files with Coverage Reduction New Missed Lines %
internal/liqonet/route-operator.go 1 74.4%
internal/peering-request-operator/peering-request-controller.go 3 69.39%
internal/peering-request-operator/foreign-cluster.go 5 78.43%
Totals Coverage Status
Change from base Build 257595195: 0.02%
Covered Lines: 6726
Relevant Lines: 13264

💛 - Coveralls

@palexster palexster self-requested a review September 16, 2020 14:04
@palexster
Copy link
Member

/lgtm
My 2 cents: Can you please explain what you did in this PR and what was the problem?

@mlavacca
Copy link
Member

/rebase

@adamjensenbot
Copy link
Collaborator

Rebase status: success!

@adamjensenbot adamjensenbot force-pushed the kcl/routeOperator-fix-notProcessingTEPOnRestart branch from ea2811f to 5abb93d Compare September 16, 2020 14:32
@palexster palexster merged commit 46ac991 into master Sep 16, 2020
@palexster palexster deleted the kcl/routeOperator-fix-notProcessingTEPOnRestart branch September 16, 2020 14:54
@alacuku alacuku mentioned this pull request Sep 23, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upon node reboot, liqo routes are not re-created
5 participants