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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃尡 optimize ip allocation #696
Conversation
Hi @schrej. Thanks for your PR. I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
A bit unsure about the motivation here. Whats the harm if the reconciliation loop is requeing ? If you are concerned about too many reques, perhaps introducing something like this would make it much cleaner ? |
That's how it's working right now. If any of the IPAddresses is missing, it will requeue after 30s. Therefore a M3M takes at least two reconciliation cycles with 30s delay after initial creation. The goal is to handle an entire machine with a single reconciliation after it was first created, at least if the IP gets allocated quickly enough (e.g. within 200ms). I've initially suggested it in Slack, and just went for an implementation as it's not that complicated. The ideal solution would be registering watches on IPClaims so we can react as soon as something changes, but with the CAPI contract that would be quite difficult to do. |
All claims are created first. If a new claim was added, wait briefly and fetch the claim again before fetching the address.
8a5138c
to
df9b9a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good cleanup to me. But I think the 200ms wait that is mentioned in the description is now gone?
/test-centos-e2e-main |
Yeah. We discussed this during the community call and it was decided that we don't wait after creation. Iirc the main reason was that we don't want to block the reconciliation queue unnecessarily. I'll update the description. This is also missing a test for claim creation. I had one before, but the complexity increased a lot since preallocations were introduced in the meantime, which requires to mock m3dt, m3m, ma and bmh in addition to m3d. |
/test-ubuntu-integration-main |
/test-centos-e2e-parallel-main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @schrej
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: furkatgofurov7 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test golangci-lint |
What this PR does / why we need it:
It splits the allocation of IP addresses from IP pools into two steps: creating the claim, and attempting to fetch the address.
This way we can give the IPAM providers a little bit of time to fulfil the claim.