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

modify Job.Scale RPC to return an error if there is an active deployment #8187

Merged
merged 3 commits into from
Jun 17, 2020

Conversation

cgbaker
Copy link
Contributor

@cgbaker cgbaker commented Jun 17, 2020

Job.Scale will return a 400-coded error if the job has an active deployment. This is a short-term solution to the problem where the autoscaler might attempt to scale the job while it is being updated, which would result in the previous deployment being cancelled and a new deployment being created.

This PR does two things:

  • block the Job.Scale operations
  • make a best-effort attempt to register a scaling event in the case that the scaling action was blocked

resolves #8143

@cgbaker cgbaker requested review from notnoop and tgross June 17, 2020 17:31
@cgbaker cgbaker added this to the 0.12.0 milestone Jun 17, 2020
@cgbaker cgbaker added the theme/autoscaling Issues related to supporting autoscaling label Jun 17, 2020
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@tgross
Copy link
Member

tgross commented Jun 17, 2020

The nomad/volumewatcher TestVolumeWatch_StartStop that's showing up in https://app.circleci.com/pipelines/github/hashicorp/nomad/9948/workflows/bb354ce0-6e80-42b0-adcc-9bbcdfc218ff/jobs/76232/steps isn't a known-flaky test (or at least I've never seen it flake). But I can't see any way this code would impact it, so I'm going to kick off the build again and then open a new issue to look into that as part of the CSI work I'll be digging into post 0.12.0-beta

@tgross
Copy link
Member

tgross commented Jun 17, 2020

Flaky test fixed in #8189

@cgbaker cgbaker merged commit ea6e351 into master Jun 17, 2020
@cgbaker cgbaker deleted the f-8143-block-scaling-during-deployment branch June 17, 2020 19:38
@github-actions
Copy link

github-actions bot commented Jan 3, 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 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/autoscaling Issues related to supporting autoscaling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deployments should block scale operations
2 participants