Allow for constraints to take into account job allocations from another job
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Proposal
It would be nice to have the ability to have "dynamic" constraints on jobs - I guess it would be dynamic, can't really come up with a better term. Mostly just that a constraint should exist that can take into account the existance (or absence) of a running/healthy allocation for another job.
### Use-cases
We run a bit of software that we offer as SaaS and for scaling's sake, it requires some databases to run - at the moment we solve this by having the database (hsqldb) run as a sidecar to the actual job, but this gives us some overhead, and for data synchronisation it requires a bit of a jump-through-hoops approach that, while it works, is ugly as sin.
The easiest solution in our eyes is to run the hsqldb as a system job so each physical node runs one, so the whole pipeline becomes much easier. However, we can't run our SaaS containers if, for some reason, a node does not have the hsqldb allocation running (and system jobs do not seem to be evaluated automatically on a regular basis). It would be great to be able to say in a constraint that a job can only be placed on a node where another job has an active (and healthy) allocation.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named in the issue. Start by locating Nomad's constraint evaluation and system-job allocation logic, then clarify how a healthy allocation from another job should affect placement; done requires an agreed design, implementation, and coverage for allocation-present and allocation-absent cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100