-
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
quotas: refactor storage limit specification #24785
Conversation
88131c7
to
5dbef57
Compare
In anticipation of having quotas for dynamic host volumes, we want the user experience of the storage limits to feel integrated with the other resource limits. This is currently prevented by reusing the `Resources` type instead of having a specific type for `QuotaResources`. Update the quota limit/usage types to use a `QuotaResources` that includes a new storage resources quota block. The wire format for the two types are compatible such that we can migrate the existing variables limit in the FSM. Also fixes improper parallelism in the quota init test where we change working directory to avoid file write conflicts but this breaks when multiple tests are executed in the same process. Ref: hashicorp/nomad-enterprise#2096
deadc7f
to
5c8ef2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quibble with the appropriate usage of "in lieu" but otherwise, LGTM!
case 1: | ||
default: | ||
return nil, errors.New("only one storage block is allowed") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this still feels funny when we could avoid the concern, and the extra parsing, by using a map instead of a block, but I suppose consistency with the surrounding context wins out.
Co-authored-by: Daniel Bennett <[email protected]>
Updates the Nomad API package for the revisions to quotas in hashicorp/nomad#24785. This also brings in the dynamic host volumes API, which we'll need for 1.10.
Updates the Nomad API package for the revisions to quotas in hashicorp/nomad#24785. This also brings in the dynamic host volumes API, which we'll need for 1.10.
In anticipation of having quotas for dynamic host volumes, we want the user experience of the storage limits to feel integrated with the other resource limits. This is currently prevented by reusing the
Resources
type instead of having a specific type forQuotaResources
.Update the quota limit/usage types to use a
QuotaResources
that includes a new storage resources quota block. The wire format for the two types are compatible such that we can migrate the existing variables limit in the FSM.Also fixes improper parallelism in the quota init test where we change working directory to avoid file write conflicts but this breaks when multiple tests are executed in the same process.
Ref: https://github.com/hashicorp/nomad-enterprise/pull/2096
Testing & Reproduction steps
Upgrade testing (from the ENT version of this PR):
Contributor Checklist
changelog entry using the
make cl
command.ensure regressions will be caught.
and job configuration, please update the Nomad website documentation to reflect this. Refer to
the website README for docs guidelines. Please also consider whether the
change requires notes within the upgrade guide.
Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.