Repository navigation
cgroup: skip empty Docker BlockIO when blkio controller is missing - #14763
Merged
copybara-service[bot] merged 1 commit intoNov 14, 2026
Merged
Conversation
Docker always emits a BlockIO object even when no I/O limits are set (empty object, or Weight=0). Treat those as "no limits" so runsc can start on hosts without CONFIG_BLK_CGROUP. Fixes gvisor#14738 Assisted-by: Cursor Agent
adi-IL
force-pushed
the
fix/cgroup-skip-empty-blockio
branch
from
September 15, 2026 18:26
d8a47bd to
f3eee18
Compare
Contributor
Author
|
This is ready for review when someone has a moment. Happy to make any changes. |
carzh
approved these changes
Nov 3, 2026
This was referenced Nov 10, 2026
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
### Description
`blockIO.skip` currently fails whenever `spec.BlockIO != nil`, even if every
field is the zero/empty default. Docker always populates `blockIO` (as `{}`
or `{"weight":0}`) when no I/O limits are requested, so runsc fails to start
on hosts that lack the blkio cgroup controller (`CONFIG_BLK_CGROUP=n`).
This change mirrors the cpuset optional-controller pattern: skip when BlockIO
is nil/empty/weight-0, and still error when real limits are set.
Fixes #14738
### AI disclosure
Assisted-by: Cursor Agent. I reviewed and validated the change against the
issue reproducer and the existing `TestOptional` coverage.
### Testing
- Extended `TestOptional` blkio case with `extraValid` entries for Docker 29
empty BlockIO and Docker <=24 `Weight=0`.
- Existing invalid-weight case still expects the missing-controller error.
Auto-fixed-by: [🤖] @EtiennePerot
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14763 from adi-IL:fix/cgroup-skip-empty-blockio f3eee18
PiperOrigin-RevId: 1019799700
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
### Description
`blockIO.skip` currently fails whenever `spec.BlockIO != nil`, even if every
field is the zero/empty default. Docker always populates `blockIO` (as `{}`
or `{"weight":0}`) when no I/O limits are requested, so runsc fails to start
on hosts that lack the blkio cgroup controller (`CONFIG_BLK_CGROUP=n`).
This change mirrors the cpuset optional-controller pattern: skip when BlockIO
is nil/empty/weight-0, and still error when real limits are set.
Fixes #14738
### AI disclosure
Assisted-by: Cursor Agent. I reviewed and validated the change against the
issue reproducer and the existing `TestOptional` coverage.
### Testing
- Extended `TestOptional` blkio case with `extraValid` entries for Docker 29
empty BlockIO and Docker <=24 `Weight=0`.
- Existing invalid-weight case still expects the missing-controller error.
Auto-fixed-by: [🤖] @EtiennePerot
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14763 from adi-IL:fix/cgroup-skip-empty-blockio f3eee18
PiperOrigin-RevId: 1019799700
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
### Description
`blockIO.skip` currently fails whenever `spec.BlockIO != nil`, even if every
field is the zero/empty default. Docker always populates `blockIO` (as `{}`
or `{"weight":0}`) when no I/O limits are requested, so runsc fails to start
on hosts that lack the blkio cgroup controller (`CONFIG_BLK_CGROUP=n`).
This change mirrors the cpuset optional-controller pattern: skip when BlockIO
is nil/empty/weight-0, and still error when real limits are set.
Fixes #14738
### AI disclosure
Assisted-by: Cursor Agent. I reviewed and validated the change against the
issue reproducer and the existing `TestOptional` coverage.
### Testing
- Extended `TestOptional` blkio case with `extraValid` entries for Docker 29
empty BlockIO and Docker <=24 `Weight=0`.
- Existing invalid-weight case still expects the missing-controller error.
Auto-fixed-by: [🤖] @EtiennePerot
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14763 from adi-IL:fix/cgroup-skip-empty-blockio f3eee18
PiperOrigin-RevId: 1019799700
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
### Description
`blockIO.skip` currently fails whenever `spec.BlockIO != nil`, even if every
field is the zero/empty default. Docker always populates `blockIO` (as `{}`
or `{"weight":0}`) when no I/O limits are requested, so runsc fails to start
on hosts that lack the blkio cgroup controller (`CONFIG_BLK_CGROUP=n`).
This change mirrors the cpuset optional-controller pattern: skip when BlockIO
is nil/empty/weight-0, and still error when real limits are set.
Fixes #14738
### AI disclosure
Assisted-by: Cursor Agent. I reviewed and validated the change against the
issue reproducer and the existing `TestOptional` coverage.
### Testing
- Extended `TestOptional` blkio case with `extraValid` entries for Docker 29
empty BlockIO and Docker <=24 `Weight=0`.
- Existing invalid-weight case still expects the missing-controller error.
Auto-fixed-by: [🤖] @EtiennePerot
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14763 from adi-IL:fix/cgroup-skip-empty-blockio f3eee18
PiperOrigin-RevId: 1019799700
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 14, 2026
### Description
`blockIO.skip` currently fails whenever `spec.BlockIO != nil`, even if every
field is the zero/empty default. Docker always populates `blockIO` (as `{}`
or `{"weight":0}`) when no I/O limits are requested, so runsc fails to start
on hosts that lack the blkio cgroup controller (`CONFIG_BLK_CGROUP=n`).
This change mirrors the cpuset optional-controller pattern: skip when BlockIO
is nil/empty/weight-0, and still error when real limits are set.
Fixes #14738
### AI disclosure
Assisted-by: Cursor Agent. I reviewed and validated the change against the
issue reproducer and the existing `TestOptional` coverage.
### Testing
- Extended `TestOptional` blkio case with `extraValid` entries for Docker 29
empty BlockIO and Docker <=24 `Weight=0`.
- Existing invalid-weight case still expects the missing-controller error.
Auto-fixed-by: [🤖] @EtiennePerot
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14763 from adi-IL:fix/cgroup-skip-empty-blockio f3eee18
PiperOrigin-RevId: 1019799700
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
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.
Description
blockIO.skipcurrently fails wheneverspec.BlockIO != nil, even if everyfield is the zero/empty default. Docker always populates
blockIO(as{}or
{"weight":0}) when no I/O limits are requested, so runsc fails to starton hosts that lack the blkio cgroup controller (
CONFIG_BLK_CGROUP=n).This change mirrors the cpuset optional-controller pattern: skip when BlockIO
is nil/empty/weight-0, and still error when real limits are set.
Fixes #14738
AI disclosure
Assisted-by: Cursor Agent. I reviewed and validated the change against the
issue reproducer and the existing
TestOptionalcoverage.Testing
TestOptionalblkio case withextraValidentries for Docker 29empty BlockIO and Docker <=24
Weight=0.