-
Notifications
You must be signed in to change notification settings - Fork 260
Proposal: Subnet Scarcity #1635
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
Conversation
851e6e1 to
b21e83f
Compare
| '400': | ||
| description: bad input parameter |
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.
@rsagasthya can you fill in the missing response types and codes of this API as it has been written?
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.
The response codes are 400 for invalid networkId or subnetName, 500 in cases of error in retrieving the cache from controller. Success is 200.
| When a Pod is created, the CNI will call with a request to assign an IP. If CNS is out of IPs and cannot honor that request, the CNI will return an error to the CRI, which will follow up by tearing down that Pod sandbox and starting over. Because of this stateless retrying, CNS can only reliable understand that it needs _at least one more_ IP, because it is impossible to tell if subsequent requests are retries for the same Pod, or many different Pods. If _many_ Pods have been scheduled, CNS will still only request a single additional batch of IPs, and assign those IPs one at a time until it runs out, then request a single additional batch of IPs... | ||
|
|
||
| A more predictive method of IP Pool scaling will be added to CNS: CNS will watch Pods for its Node, and will request/release IPs immediately based on the number of Pods scheduled. The Batching behavior will be unchanged, and CNS will continue to request IPs in Batches $B$ based on the local IP usage. | ||
|
|
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.
Add in handling of the race condition that Ramiro brought up on Rahul's PR
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.
noted, I have covered this in my local working draft and will include it in the next PR addition
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
b21e83f to
d05709d
Compare
* stub docs/design for design proposals Signed-off-by: Evan Baker <rbtr@users.noreply.github.com> * feature proposal: subnet scarcity phase 1 Signed-off-by: Evan Baker <rbtr@users.noreply.github.com> * feature proposal: subnet scarcity phase 2 Signed-off-by: GitHub <noreply@github.com> * feature proposal: subnet scarcity phase 3 Signed-off-by: GitHub <noreply@github.com> Signed-off-by: Evan Baker <rbtr@users.noreply.github.com> Signed-off-by: GitHub <noreply@github.com>
Reason for Change:
This starts the design train for the Subnet Scarcity feature, a solution to the issue raised in #1605.
Namely: in SWIFT, due to the batch-wise scaling of the IP Pool, CNS reserves an overhead of IPs from the Subnet on every Node. This can lead to artificial Subnet IP Exhaustion where there are insufficient unreserved IPs left in the Subnet for Nodes to join the cluster or for Pods to schedule, even when the real total Pod IP usage is less than the total Subnet IP Capacity.
Issue Fixed:
Requirements:
Notes: