Who gets a job's next lease: every member's verdict (down, not in the job's members, not running it, the scheduler's filter and score, the owner policy's backoff), best first
$ sexc add @ajax/mesh-jobs-select- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 05:24v/# 1 version
- drwxr-xr-x-Oct 27 05:24files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 05:24 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-check ^0.1.0, @ajax/mesh-strbuf ^0.1.0, @ajax/mesh-jobs-spec ^0.1.0, @ajax/mesh-jobs-frame ^0.1.0
- dependents
- @ajax/mesh-jobs-node, @ajax/mesh-jobs-sched
- keywords
- mesh alphaos jobs scheduling leases
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-jobs-select
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-jobs-select 2 3Who gets a job's next lease: every member's verdict, best first. A member is rejected if it is down, 4not in the job's members, or doesn't run any of the job's programs. Otherwise the fleet scheduler 5decides: its filter (cordon, backends, arch, memory, avoid), a failure of the program there, then its 6score (measured speed and share, CPU and memory headroom, prefer, the owner penalty). The owner 7policy's backoff applies too (HTCondor's): a member held busy gets no leases while an idle member runs 8the program, and only floor-sized ones when it is the only one. `mj_pick_line` is what `job status` 9prints. 10 11The scheduler is an interface (`mj_sched`). `@ajax/mesh-jobs-sched` implements it over the fleet's 12model (`@ajax/mesh-sched-*`). Without one (a single meshd), a member that is alive and runs the 13program is eligible, unscored. 14 15## Ported from 16 17[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): 18`crates/mesh-host/src/jobs.rs`: `Pick` (`ok`, `line`), `select`. `SchedCx` became the `mj_sched` 19interface. 20 21## Tests 22 23`tests/select.c`: no fleet (alive and running it; down; not in the job's members; does not run 24there), and a stub scheduler (rejected, backed off when busy, unscored, best-first order, the busy 25member alone with floor-sized leases). With the fleet's own scheduler, the Rust's 26`select_is_the_schedulers_filter_and_score` runs in `@ajax/mesh-jobs-sched`. 27 28## Licence 29 30MIT. See the repository's LICENSE.