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

scale: add -check-index to job scale command #23457

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Jun 27, 2024

The RPC handler for scaling a job passes flags to enforce the job modify index is unchanged when it makes the write to Raft. But its only checking against the existing job modify index at the time the RPC handler snapshots the state store, so it can only enforce consistency for its own validation.

In clusters with automated scaling, it would be useful to expose the enforce index options to the API, so that cluster admins can enforce that scaling only happens when the job state is consistent with a state they've previously seen in other API calls. Add this option to the CLI and API and have the RPC handler check them if asked.

Fixes: #23444

@tgross tgross added type/enhancement theme/autoscaling Issues related to supporting autoscaling theme/api HTTP API and SDK issues labels Jun 27, 2024
@tgross tgross added this to the 1.8.2 milestone Jun 27, 2024
The RPC handler for scaling a job passes flags to enforce the job modify index
is unchanged when it makes the write to Raft. But its only checking against the
existing job modify index at the time the RPC handler snapshots the state store,
so it can only enforce consistency for its own validation.

In clusters with automated scaling, it would be useful to expose the enforce
index options to the API, so that cluster admins can enforce that scaling only
happens when the job state is consistent with a state they've previously seen in
other API calls. Add this option to the CLI and API and have the RPC handler
check them if asked.

Fixes: #23444
Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

LGTM! personally, I might drop the EnforceIndex bool, but not a blocker.

command/job_scale.go Outdated Show resolved Hide resolved
@tgross tgross merged commit cd3101d into main Jun 27, 2024
21 checks passed
@tgross tgross deleted the f-job-scale-check-index branch June 27, 2024 20:54
Copy link

github-actions bot commented Jan 2, 2025

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 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.8.x backport to 1.8.x release line theme/api HTTP API and SDK issues theme/autoscaling Issues related to supporting autoscaling type/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scaling is possible during deployment with bad results
2 participants