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.
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.
| } | ||
| } | ||
|
|
||
| func SkipIfNotExist(path string) { |
There was a problem hiding this comment.
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.
| 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.
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 <gscrivan@redhat.com>
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 <gscrivan@redhat.com>
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 <gscrivan@redhat.com>
Load the `null_blk` kernel module to have the `/dev/nullb0` device available for the tests. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
3ec6c51 to
80065f7
Compare
|
[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.