-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If MaxParallel == 0 default limit to count #3081
Conversation
@clinta Do you think it is better if we make it a validation error instead. It feels like this may catch people unaware. |
I can't think of a situation where someone could be depending on the current behavior. I know I expected an omitted |
I would personally expect a value of If we need to signal |
@clinta Would you mind changing it to a validation issue? https://github.com/hashicorp/nomad/blob/master/nomad/structs/structs.go#L2065 and https://github.com/hashicorp/nomad/blob/master/nomad/structs/structs_test.go#L1394 |
If this becomes a validation error should the default value be changed? Is there anywhere else where a default value is invalid? There's some code here that defaults to a 10% of the count (or a minimum of 1). Perhaps this should be run anytime a MaxParallel of 0 is encountered, instead of just for migrating from the old nomad/nomad/structs/structs.go Lines 1532 to 1549 in 46e6547
|
@clinta Lets update the default to be 1. Rather error on the conservative side. Most people should be specifying this if they want more. It is something job operator should be conscious of. You can add the defaulting here: https://github.com/hashicorp/nomad/blob/master/api/jobs.go#L379 And update the default in the nomad/structs/structs.go file that is referenced. |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
If you run a job with an
update
stanza but do not specifymax_parallel
it defaults to 0 which prevents any allocations from ever being updated. Amax_parallel
value of 0 should be treated the same as as a job with noupdate
stanza specified.