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

Implement Check-capacity Provisioning Class #6814

Closed
yaroslava-serdiuk opened this issue May 10, 2024 · 8 comments
Closed

Implement Check-capacity Provisioning Class #6814

yaroslava-serdiuk opened this issue May 10, 2024 · 8 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@yaroslava-serdiuk
Copy link
Contributor

yaroslava-serdiuk commented May 10, 2024

Implementation is almost done, creating an issue for visibility.

Check-capacity Provisioning Class check if the ProvisioningRequest could fit in existing capacity. If yes, CA add Provisioned=True condition and reserve the capacity for 10 mins. When reservation time passes, the BookingExpired=True condition is added, which means that CA won't reserve capacity for this ProvisioningRequest.

The original proposal: Provisioning Request CRD

@yaroslava-serdiuk
Copy link
Contributor Author

/assign

@yaroslava-serdiuk
Copy link
Contributor Author

ScaleDown support is tracked in #6517

@kerthcet
Copy link
Member

As the proposal mentioned, we'll not reserve resources for check-capacity, will we now regarding to reserve the capacity for 10 mins?

@yaroslava-serdiuk
Copy link
Contributor Author

As the proposal mentioned, we'll not reserve resources for check-capacity, will we now regarding to reserve the capacity for 10 mins?

Good point, thanks. The original proposal suggested to not reserve the capacity, but that was reevaluated during implementation.

So yes, if there is capacity for ProvReq in the cluster, CA adds Provisioned=True condition and reserve the capacity for 10 mins, so other ProvReqs won't be able to use it for 10 mins. Then BookinigExpired=True condition is added, which means that CA doesn't reserve capacity for this ProvReq.
However note, the reservation happens during CA simulation, CA doesn't block scheduler from scheduling real pods. So the real pods still could be scheduled on reserved capacity.
This reservation is aimed for ProvisioningRequest only, in order to not have situation when two ProvReqs have Provisioned=True condition, but actually only one of it could fit in the cluster.

@kerthcet
Copy link
Member

Thanks for the explanation, but what will happen if two ProvReqs ask for capacities the same time. Will they both success or one will success and another one will failure due to the reservation fact.

@kerthcet
Copy link
Member

kerthcet commented May 16, 2024

So if I want to use ProvReq, what's the best practice, check for capacity first then sent the real provisioning request? Or the scale-up ProvReq will check the capacity as well in ahead.

@yaroslava-serdiuk
Copy link
Contributor Author

CA process ProvReqs one by one. If we have two ProvReqs that asking the same capacity, but cluster could fulfil only one of them, then the first picked ProvReq will have Provisioning=True condition and the second ProvReq will have Provisioned=False condition. When 10 mins passes, the first ProvReq will have Provisioned=True and BookingExpired=True conditions and the second ProvReq will have Provisioned=True condition.

@yaroslava-serdiuk
Copy link
Contributor Author

So if I want to use ProvReq, what's the best practice, check for capacity first then sent the real provisioning request? Or the scale-up ProvReq will check the capacity as well in ahead.

Not sure what did you mean by real ProvisioningRequest. Each ProvReq belongs to a specific ProvisioningClass. ProvisioningRequest of check-capacity ProvisioningClass is aimed to check capacity in the cluster for requested resources.
ProvisioningRequest of AtomicScaleUp (or BestEffortAtomicScaleUp) ProvisioningClass is aimed to scaleUp the cluster to fulfil request: #6815

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants