Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
sched-simple: reject requests with unknown resource types #2425
The sched-simple implementation only supports resource types of
This PR fixes that oversight by requiring the scheduler to look at every resource at any given level in the jobspec request.
Note: Instead of canceling these jobs with the generic "unsatisfiable request" message as specified in #2417, the error message is more explicit:
$ flux mini run -g1 hostname job-event: exception type=alloc severity=0 Unsupported resource type 'gpu'
If that isn't ok then it is probably trivial to make the error message more generic.
Problem: When parsing jobspec with libjj, all but the first resource vertex in a list under an out edge was read by the parser, and other resources were ignored. Thus, requests for resources of unsupported types were being accepted by the scheduler, and the unsupported types ignored (as long as they were not the first element in the resource list) Change the libjj implementation to read all resources in the list at each level, and return an error if any resource doesn't match the list of supported types. Fixes #2417.
The error message from libjj for unsupported resource types has been improved. Update tests to reflect the new wording.
Ensure that a request for GPU resources with `flux mini run -g` returns an error from the simple-sched libjj JSON jobspec parser.
@@ Coverage Diff @@ ## master #2425 +/- ## ========================================== + Coverage 81.12% 81.13% +<.01% ========================================== Files 225 225 Lines 36102 36110 +8 ========================================== + Hits 29289 29298 +9 + Misses 6813 6812 -1