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

[POC] lease lock per IP pool #314

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

Conversation

adrianchiris
Copy link

This is a POC level code for changing lease/leaderElection usage by whereabouts from a global lease to a per pool lease.

What this PR does / why we need it:
This PR is related to #313 and is used as additional context on the potential changes proposed.

This is a POC level code for changing lease/leaderElection
usage by whereabouts from a global lease to a per pool lease.

Signed-off-by: adrianc <[email protected]>
@maiqueb
Copy link
Collaborator

maiqueb commented Mar 21, 2024

I'd say this makes sense without looking in detail !

Please be patient while we sort this out.

If you can, please rebase and ensure the tests are passing.

@xagent003 could you review ?

}

defer func() {
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think this will ever be hit? It only happens if err != nil but all previous conditions check for err != nil and continue or return.

Is there a reason for this defer func() at all? It does exactly the same as what was previously done above

@@ -557,14 +592,6 @@ func IPManagementKubernetesUpdate(ctx context.Context, mode int, ipam *Kubernete
break RETRYLOOP
}

if ipamConf.OverlappingRanges {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you clarify why this change was made - the code is common but was added back tot he Allocate and Deallocate case statements. Now the same code is duplicated in each case. Did this fix some other issue or optimization?

@xagent003
Copy link
Contributor

Hi @maiqueb I reviewed. the lease lock change looks good, but I'd like to understand the other change for moving around the overlappingranges code.

BTW we tested out this code and it does appear to improve performance.

@maiqueb
Copy link
Collaborator

maiqueb commented Mar 27, 2024

Hi @maiqueb I reviewed. the lease lock change looks good, but I'd like to understand the other change for moving around the overlappingranges code.

@adrianchiris could you split this change to another commit and explain its goal in the commit msg ?

BTW we tested out this code and it does appear to improve performance.

Thank you @xagent003 . I really appreciate your help.

@adrianchiris
Copy link
Author

@adrianchiris could you split this change to another commit and explain its goal in the commit msg ?

Hey @maiqueb, ATM i have no bandwidth to work on this unfortunately.

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.

3 participants