Skip to content
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

api: validate scale count value is not negative. #7903

Merged
merged 1 commit into from
May 11, 2020
Merged

api: validate scale count value is not negative. #7903

merged 1 commit into from
May 11, 2020

Conversation

jrasell
Copy link
Member

@jrasell jrasell commented May 8, 2020

An operator could submit a scale request including a negative count
value. This negative value caused the Nomad server to panic. The
fix adds validation to the submitted count, returning an error to
the caller if it is negative.

closes #7902

@jrasell jrasell added type/bug theme/api HTTP API and SDK issues theme/autoscaling Issues related to supporting autoscaling labels May 8, 2020
@jrasell jrasell requested review from notnoop and cgbaker May 8, 2020 14:41
@jrasell jrasell self-assigned this May 8, 2020
Copy link
Contributor

@notnoop notnoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think we need some nilness validation as well but feel free to merge after it's addressed.

nomad/job_endpoint.go Outdated Show resolved Hide resolved
An operator could submit a scale request including a negative count
value. This negative value caused the Nomad server to panic. The
fix adds validation to the submitted count, returning an error to
the caller if it is negative.
Copy link
Contributor

@cgbaker cgbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jrasell jrasell merged commit 64c4b49 into master May 11, 2020
@jrasell jrasell deleted the b-gh-7902 branch May 11, 2020 07:17
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

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 have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/api HTTP API and SDK issues theme/autoscaling Issues related to supporting autoscaling type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Nomad panics when attempting to scale a job by a negative value
3 participants