Project

General

Profile

Container dispatch » History » Version 4

Peter Amstutz, 12/02/2015 07:55 PM

1 1 Peter Amstutz
h1. Crunch2 dispatch
2 2 Peter Amstutz
3 3 Peter Amstutz
Some discussion notes from https://dev.arvados.org/issues/6429 and https://dev.arvados.org/issues/6518
4
5 4 Peter Amstutz
h2. Interaction with node manager
6 3 Peter Amstutz
7 2 Peter Amstutz
Suggest writing crunch 2 job dispatcher as a new set of actors in node manger.
8
9
This would enable us to solve the question of communication between the scheduler and cloud node management (#6520).
10
11
Node manager already has a lot of the framework we will want like concurrency (can have one actor per job) and a configuration system.
12
13 1 Peter Amstutz
Different schedulers (slurm, sge, kubernetes) can be implemented as modules similarly to how different cloud providers are supported now.
14 4 Peter Amstutz
15
If we don't actually combine them, we should at least move the logic of deciding how many and what size nodes to run from the node manager to the dispatcher; the dispatcher can then communicate its wishlist to node manager.
16 2 Peter Amstutz
17
h2.  Interaction with API
18
19
More ideas:
20
21
Have a "dispatchers" table. Dispatcher processes are responsible for pinging the API server similar to how it is done for nodes to show they are alive.
22
23
A dispatcher claims a container by setting "dispatcher" field to it's UUID. This field can only be set once and that locks the record so that only the dispatcher can update it.
24
25
If a dispatcher stops pinging, the containers it has claimed should be marked as TempFail.
26
27
Dispatchers should be able to annotate containers (preferably through links) for example "I can't run this because I don't have any nodes with 40 GiB of RAM".
28
29
h2. Retry
30
31
How do we handle failure? Is the dispatcher required to retry containers that fail, or is the dispatcher a "best effort" service and the API decides to retry by scheduling a new container?
32
33
Currently the container_uuid field only holds a single container_uuid at a time. If the API schedules a new container, does that mean any container requests associated with that container get updated with the new container?
34
35
If the container_uuid field only holds one container at a time, and container don't link back to the container requests that created, then we don't have a way to record of past attempts to fulfill this request. This means we don't have anything to check against container_count_max. A few possible solutions:
36
37
* Make container_uuid an array of containers created to fulfill a given container request (this introduces complexity)
38
* Decrement container_count_max on the request when submitting a new container
39
* Compute content address of the container request and discover containers with that content address. This would conflict with "no reuse" or "impure" requests which are supposed to ignore past execution history. Could solve this by salting the content address with a timestamp; "no reuse" containers would never ever be reusable which might be fine.
40
41
I think we should distinguish between infrastructure failure and task failure by distinguishing between "TempFail" and "PermFail" in the container state. "TempFail" shouldn't count againt the container_count_max count, or alternately we only honor container_count_max for "TempFail" tasks and don't retry "PermFail".
42
43
Ideally, "TempFail" containers should retry forever, but with a backoff. One way to do the backoff is to schedule the container to run at a specific time in the future.
44
45
h2. Scheduling
46
47
Having a field specifying "wait until time X to run this container" would be generally useful for cron-style tasks.