-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
resource limits for pods #14876
resource limits for pods #14876
Conversation
@giuseppe I am getting failures for This might be something we want to look into... but for next week! |
we might need to add a fallback to |
opened a PR: containers/crun#964 |
@giuseppe how does getting a new crun version work since it isn't a go vendor? do we have to wait until a new release is cut or is it just built from the main branch. |
0a3e9cd
to
50b8d5f
Compare
912ff40
to
d81b5d1
Compare
one issue I've noticed is that you've hardcoded I am not sure there is any advantage in resolving them, can't we just pass whatever name we go as input? |
@cdoern all kinds or red tests here |
@giuseppe given the feedback in systemd/systemd#23938 I think we need to hardcode either block or char. Is there a way to tell which is which? |
Drive by, can't you just stat the source and get whether it is a block or char device? |
@rhatdan the issue is, runc's blkio device resources (which we use within c/common) only have a field for the major, minor, and limit. Unless there is a way to stat just the |
I only included the v1 name for a cgroup wide IO weight in my previous PR, this fixes the --blkio-weight flag in containers/podman#14876 Signed-off-by: Charlie Doern <[email protected]>
I only included the v1 name for a cgroup wide IO weight in my previous PR, this fixes the --blkio-weight flag in containers/podman#14876 Signed-off-by: Charlie Doern <[email protected]>
Major and minor are just ints, there is no way to differenctiate block or char. |
@edsantiago let me know if I addressed all of your changes! |
@mheon @rhatdan @giuseppe no rush since this won't get into 4.2, but feel free to merge once we get @edsantiago 's blessing on the tests |
No, tests are kind of broken still. Try this. |
that works. |
K. Is it clear what I fixed? That is: is anything unclear? I'm sorry about providing a patch without explanation, it's just, argh, today!! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdoern, edsantiago, giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No worries! I get everything you changed, I was trying to use sed for the spacing but yours works better. |
LGTM but I have a feeling this is going to blow up when combined with #14972 (runc). If yours merges first, I will need your help getting tests to pass (I will probably just add yet more |
@mheon just an FYI for when you review, I just changed pod_api.go (pod inspect) to include the new limits since I forgot to do that. Also, @edsantiago skipped the resources limits test in v1 since the limits are not allowed in most cases. |
Please add something to the Code LGTM |
@mheon does this work?
|
This is very unclear. As a Podman user, what I care about is: Can I use |
ok, @mheon
|
That WFM |
added the following flags and handling for podman pod create --memory-swap --cpuset-mems --device-read-bps --device-write-bps --blkio-weight --blkio-weight-device --cpu-shares given the new backend for systemd in c/common, all of these can now be exposed to pod create. most of the heavy lifting (nearly all) is done within c/common. However, some rewiring needed to be done here as well! Signed-off-by: Charlie Doern <[email protected]>
@containers/podman-maintainers PTAL and merge |
/lgtm |
added the following flags and handling for podman pod create
--memory-swap
--cpuset-mems
--device-read-bps
--device-write-bps
--blkio-weight
--blkio-weight-device
--cpu-shares
given the new backend for systemd in c/common, all of these can now be exposed to pod create.
most of the heavy lifting (nearly all) is done within c/common. However, some rewiring needed to be done here
as well!
Signed-off-by: Charlie Doern [email protected]
Does this PR introduce a user-facing change?