Make scheduler respect resource reservations#274
Conversation
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This is in preparation for adding additional metadata to this type and using it in the filtering pipeline. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Current coverage is
|
There was a problem hiding this comment.
I feel like we have this conversation every time, but isn't it cheaper to just pass a pointer rather than copying NodeInfo? :)
There was a problem hiding this comment.
I'll change this function to take *NodeInfo.
Fix filter pipeline to consider available resources. Hook up filter pipeline to scheduler. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
5f7ece9 to
c41b567
Compare
|
@aluzzardi: Updated, PTAL |
In v1 we had to move our Let's keep it this way though - we may re-assess once the scheduler package grows |
|
@aluzzardi: Is there anything else I should address before merging this? I saw you had a comment about |
|
LGTM Notes for later (don't hold back the merge): We should update this later to use state timestamps that will be added by #320 (/cc @stevvooe). It will be useful to know "this task is pending since ". Another cool feature would be to make use of the state's message: "this task is pending since because: there are not enough resources in the cluster". We had a way in v1 filters to explain why filters didn't pass (e.g. constraints not met, resources not available) however it turns out the design of that feature was flawed. @dongluochen and I had an idea on how to use filter bitmaps to figure out which combination of filters were making the task un-schedulable. Not urgent, we should probably put something into our "icebox" |
Based on initial work by @aluzzardi:
nodeHeapIteminto the exported typeNodeInfoso it can be used to expose additional metadata about nodes to filters.AvailableResourcesfield toNodeInfo. Keep it up to date in the scheduler loop.filterpackage intoschedulerso that it can use theNodeInfotype without creating a circular dependency.Pipelineto the scheduler so that the readiness check and resource availability check run against each scheduling candidate.PTAL