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

Create tool to get/set job object resource limits #918

Merged

Conversation

katiewasnothere
Copy link
Contributor

@katiewasnothere katiewasnothere commented Dec 22, 2020

This PR does the following:

  • Creates a tool to get/set job object resource limits called jobobject-util
  • Add new function to open existing job objects by name
  • Refactor's jobobject package's resource limit functions
  • Add two new winapi functions for dealing with job objects

This PR is part of the ongoing work for dynamic resource update. The jobobject-util tool will be used to get/set job object limits for process- and hypervisor- isolated containers.

Signed-off-by: Kathryn Baldauf [email protected]

@katiewasnothere katiewasnothere requested a review from a team as a code owner December 22, 2020 06:33
@katiewasnothere
Copy link
Contributor Author

@dcantah I'd especially like your feedback on this since you've been doing various job object work lately.

cmd/jobobject-util/main.go Outdated Show resolved Hide resolved
@dcantah
Copy link
Contributor

dcantah commented Dec 22, 2020

I'll take a look at this more in the morning but I'd like to not have to pass handles around. If we can add an Open that returns the JobObject type (like Create) and expose the limit methods through here like we do for the others I'd prefer that.

And I know for containers you need to use NtOpenJobObject so maybe expose an NtOpen also, or have some logic on Open to decide which to use, either or.

cmd/jobobject-util/main.go Outdated Show resolved Hide resolved
@katiewasnothere katiewasnothere force-pushed the job_object_limits_tool branch 3 times, most recently from 477b64e to bc47381 Compare January 13, 2021 20:02
cmd/jobobject-util/main.go Outdated Show resolved Hide resolved
cmd/jobobject-util/main.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

lgtm

@katiewasnothere katiewasnothere merged commit 4490e2e into microsoft:master Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants