-
Notifications
You must be signed in to change notification settings - Fork 7
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
dra-evolution: counter per request, select device per index for container #22
Comments
Summary of options we discussed in Slack:
Personally I still lean to option 1 - it's less work and I am quite conscious of the ticking clock. Though 3 or 4 is nice too, since I think people would use that to ensure they get the whole node. |
I'd say as many as possible. Quota would be considered, so that and what's still available would be the limiting factor. One use case that people sometimes asked for was "optional allocation": give me a device if there is one, but proceed without it if not. That's for pods which can take advantage of an accelerator if they can get it, but have fallbacks if not. I'm fine with not covering that yet, but we should keep it in mind. I like the explicit "all" and I think a fixed amount also would be very useful because then users don't need to replicate identical requests. So let's brainstorm the API... requests:
- requestName: gpus
amount: # one-of!
all: true # all: false does not make sense, so this would be a `All bool `json:"all,omitempty"`
deviceClass: gpu.dra.example.com requests:
- requestName: gpus
amount: # one-of!
count: 4
deviceClass: gpu.dra.example.com requests:
- requestName: gpu
# no amount: defaults to 1
deviceClass: gpu.dra.example.com By making this a one-of, we can add a range or optional allocation later without breaking old clients. |
To be clear: Later we can add range, optional allocation, and even lgtm! |
One thing - does this mean we need matchAttributes within a request? Or we can leave that out and add it next release? They can still do match attributes across requests (which in fact implies it within the request...so that's almost as good). |
I had that in some earlier proposal. I think it's okay to leave it out because as you said, the claim-level constraints apply and should cover most cases. |
There is one more complication that we need to warn users about: the size of slices in the API is limited, which limits how many devices can be allocated per claim (via the results slice). Even a single request can be too much if the count is too high. I'll add that to the docs in a PR for this issue and it might be worth adding some validation for this. |
There's another problem with "all devices on a node": the way we have currently defined ResourcePool, a scheduler cannot be certain that it has seen all ResourcePool objects published by the driver. It might schedule a daemonset pod as soon as it has seen one device in one object, with access to just that one device, while the driver is still publishing 10 more. I have some ideas how we can define our pool concept better to avoid that problem. I'll put that and the |
I updated kubernetes/enhancements#4709 with the revised pool concept and "amount" per request. Let's discuss directly there, I am not going to do a prototype PR. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This was removed from #14 to limit the scope and because adding it would make the implementation more complex.
For the "give me management access to all devices on a node" use case we need a way to specify "all devices". A counter with minimum 1 and no maximum would be one solution. Management access is currently targeted for 1.31, so perhaps a counter should be, too?
/assign
The text was updated successfully, but these errors were encountered: