-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[1.3] runc update: support per-device weight and iops #4931
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
Merged
cyphar
merged 5 commits into
opencontainers:release-1.3
from
kolyshkin:1.3-update-resources
Oct 16, 2025
Merged
[1.3] runc update: support per-device weight and iops #4931
cyphar
merged 5 commits into
opencontainers:release-1.3
from
kolyshkin:1.3-update-resources
Oct 16, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
For some reason this emits bogus linter-extra warnings (it didn't do it in #4775). Maybe we need to update golangci-lint in release-1.3 as well; let me try it. |
ddee53f to
d3a23b5
Compare
This support was missing from runc, and thus the example from the podman-update wasn't working. To fix, introduce a function to either update or insert new weights and iops. Add integration tests. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit 7696402) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
In case there's a duplicate in the device list, the latter entry overrides the former one. So, we need to modify the last entry, not the first one. To do that, use slices.Backward. Amend the test case to test the fix. Reported-by: lifubang <lifubang@acmcoder.com> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit 0b01dcc) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Apparently, having a minor of 0 does not always mean it's the whole device (not a partition): === /proc/partitions (using major: 259) === major minor #blocks name 8 16 78643200 sdb 8 17 77593583 sdb1 8 30 4096 sdb14 8 31 108544 sdb15 259 0 934912 sdb16 8 0 78643200 sda 8 1 78641152 sda1 Rewrite the test to not assume minor is 0, and use lsblk -d to find out whole devices. This fixes a test case which was added in commit 7696402. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit 46dac58) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
If an error occurs during a test which sets up loopback devices, the loopback device is not freed. Since most systems have very conservative limits on the number of loopback devices, re-running a failing test locally to debug it often ends up erroring out due to loopback device exhaustion. So let's just move the "losetup -d" to teardown, where it belongs. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (cherry picked from commit ceef984) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
openSUSE has an unfortunate default udev setup which forcefully sets all loop devices to use the "none" scheduler, even if you manually set it. As this is a property of the host configuration (and udev is monitoring from the host) we cannot really change this behaviour from inside our test container. So we should just skip the test in this (hopefully unusual) case. Ideally tools running the test suite should disable this behaviour when running our test suite. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (cherry picked from commit e6b4b5a) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
d3a23b5 to
2e82e55
Compare
lifubang
approved these changes
Oct 16, 2025
cyphar
approved these changes
Oct 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of #4775 (and it's followups #4807 and #4825) to release-1.3 branch.
The support for per-devices weights and iops update was missing from runc,
and thus the example from the podman-update wasn't working.
To fix, introduce a function to either update or insert new weights and iops.
Add integration tests.
Fixes: https://issues.redhat.com/browse/RHEL-81042
See also: containers/podman#26308