-
Notifications
You must be signed in to change notification settings - Fork 2.9k
test: use block devices for I/O limit tests #26022
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
test: use block devices for I/O limit tests #26022
Conversation
f4fd259 to
cfc811a
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
cfc811a to
fd918cb
Compare
|
@Luap99 PTAL |
fd918cb to
3ec6c51
Compare
Luap99
left a comment
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.
LGTM, a small hint for module loading would be nice. These tests are run in many external CI systems so it would be helpful for them to know how to enable this test without having to search for this specific kernel device.
test/e2e/common_test.go
Outdated
| } | ||
| } | ||
|
|
||
| func SkipIfNotExist(path string) { |
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.
can you add a reason field, it would be nice to pass a hint, i.e. run modprobe null_blk nr_devices=1 so external consumers know directly how to make the test work.
test/system/030-run.bats
Outdated
| skip_if_rootless "cannot use this flag in rootless mode" | ||
|
|
||
| if test \! -e /dev/nullb0; then | ||
| skip "/dev/nullb0 not present" |
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.
same here include the modprobe null_blk nr_devices=1 info please
Cgroup block I/O limits cannot be applied to character devices. Ignore character devices in the inspect output. Update the API tests to use the null block device `/dev/nullb0` (if available) instead of `/dev/zero` for testing I/O limits. Signed-off-by: Giuseppe Scrivano <[email protected]>
The tests were incorrectly using `/dev/zero`. These options are intended to set I/O limits on specific block devices. The test already sets up a loopback device, so reuse it. Signed-off-by: Giuseppe Scrivano <[email protected]>
The tests for device I/O limits were using `/dev/zero`, which is not a block device suitable for these cgroup controls. Update the tests to use `/dev/nullb0` if it exists. Signed-off-by: Giuseppe Scrivano <[email protected]>
Load the `null_blk` kernel module to have the `/dev/nullb0` device available for the tests. Signed-off-by: Giuseppe Scrivano <[email protected]>
3ec6c51 to
80065f7
Compare
Luap99
left a comment
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.
LGTM
/cherry-pick v5.5
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@siretart @ricardobranco777 As I know you run these tests downstream just a heads up that you may have to run |
Thanks for the heads-up! |
|
@mheon PTAL |
|
/lgtm Too late to make RC2 unfortunately, but it should be in 5.5 final |
|
/cherry-pick v5.5 |
|
@Luap99: new pull request created: #26049 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
change the device used for block I/O limits (read/write BPS and IOPS).
Since
/dev/zerois not a block device, it's unsuitable for testing cgroup controls designed for block devices.