Job scaling should take additional params
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Proposal
`nomad job scale` should be a bit more configurable - like taking a param to stop the old allocs first. Or maybe that could be the default behaviour. Currently, it destroys the `latest` allocs.
### Use-cases
I'd like to use it for applications which need some updated files (fetched externally via S3 etc) and restart. However, to not stop the incoming traffic on the existing allocs, I can't use `nomad alloc restart` as it immediately kills the alloc. There's a `shutdown_delay` as well, but that isn't useful in this case since:
- the new alloc stays in `pending` state till the old alloc stops
- nomad doesn't de-register the service from the catalog until the service fully stops. So effectively, `shutdown_delay` doesn't have any effect if using `service.provider="nomad"`.
### Attempted Solutions
Couldn't find a workaround for this.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names the `nomad job scale` entry point but no files or tests. Start there and trace allocation replacement, service deregistration, and `shutdown_delay`; done should be a clear decision and tested behavior for additional parameters or a default that avoids dropping traffic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100