-
Notifications
You must be signed in to change notification settings - Fork 2.9k
podman-update: fix block device handling #26308
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
Conversation
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
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.
Thanks this seems similar to #26022
Can you add a test case for update that adding a char device such as /dev/zero raises an error now?
Refactor these functions to - avoid repetition of common code (mostly stat of block device path); - perform early return if nothing is to be done; - remove some excessive nesting. It also improves some error messages. This is a preparation for the next commit. Signed-off-by: Kir Kolyshkin <[email protected]>
In case something other than a block device is supplied, podman proceeds to apply settings for a block device with the same minor:major. For example, "--blkio-weight-device /dev/zero:123" (alas, this is taken literally from podman-update(1) EXAMPLES section) sets blkio weight for /dev/ram5. Instead, it should error out since /dev/zero is not a block device. Add an appropriate check. Signed-off-by: Kir Kolyshkin <[email protected]>
This is a test case for an issue fixed by the previous commit. Signed-off-by: Kir Kolyshkin <[email protected]>
Mainly this fixes an issue of using /dev/zero for block device examples. Also: * fix section title; * remove separate cgroup v2 and v1 examples, only leaving one; * break long lines. Signed-off-by: Kir Kolyshkin <[email protected]>
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
|
Anything I need to do to move it forward? |
|
@containers/podman-maintainers PTAL |
giuseppe
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, kolyshkin, 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 |
f235d47
into
containers:main
While working on https://issues.redhat.com/browse/RHEL-81042, I found out that podman-update(1) man page contains an example which uses
/dev/zeroinstead of a block device. I also found out that it is working on some systems and not on others.What happens is, if a non-block device is specified, the
major:minornumbers from it are used to set weight and throttle limits (iops/bps) for a block device with the samemajor:minorpair. This does not make any sense.Can be seen as a continuation of #26022.
Does this PR introduce a user-facing change?