[Crunch2] Move "partitions" out of runtime_constraints
runtime_constraints has the following semantics:
Restrict the container's access to compute resources and the outside world (in addition to its explicitly stated inputs and output). -- Each key is the name of a capability, like "internet" or "API" or "clock". The corresponding value is true (the capability must be available in the container's runtime environment) or false (must not) or a value or an array of two numbers indicating an inclusive range. Numeric values are given in basic units (e.g., RAM is given in bytes, not KB or MB or MiB). If a key is omitted, availability of the corresponding capability is acceptable but not necessary.
The "partitions" field of Container/ContainerRequest does not fit these semantics. It should move to the new scheduling_parameters hash.
See Containers API
API server, arvados-cwl-runner and crunch-dispatch-slurm need to be updated accordingly.
#9 Updated by Radhika Chippada almost 5 years ago
- Added scheduling_parameters map to containers and container_requests. Added test(s) to container_requests test. Updated arvados-cwl-runner and crunch_dispatch_slurm and tests.
- Documentation is not updated since major updates are happening in #10346. Will add a subtask and handle it after 10346 is completed.
- Test passed at @ https://ci.curoverse.com/job/developer-run-tests/65/
#10 Updated by Peter Amstutz almost 5 years ago
for key in call_args: self.assertEqual(call_args[key], call_kwargs[key])
This doesn't seem right, it declares
call_body above but doesn't use it for comparison. Shouldn't it be doing something like
self.assertEqual(call_body, call_kwargs["body"]) ?
#11 Updated by Radhika Chippada almost 5 years ago
test_container.py -- This doesn't seem right, it declares call_body above but doesn't use it for comparison. Shouldn't it be doing something like self.assertEqual(call_body, call_kwargs["body"]) ?
Oops, that's silly. Updated the test assertions to compare call body. Thanks.
#13 Updated by Peter Amstutz almost 5 years ago
- Status changed from Resolved to Feedback
When submitting a container request:
<HttpError 422 when requesting https://192.168.5.2:8000/arvados/v1/container_requests?alt=json returned "#<ActiveRecord::RecordInvalid: Validation failed: Scheduling parameters must be a Hash, not a ActiveSupport::HashWithIndifferentAccess>">