Skip to content

feat: add blkio device options to docker container update#7031

Open
acouvreur wants to merge 2 commits into
docker:masterfrom
acouvreur:container-update-blkio-device-throttle
Open

feat: add blkio device options to docker container update#7031
acouvreur wants to merge 2 commits into
docker:masterfrom
acouvreur:container-update-blkio-device-throttle

Conversation

@acouvreur

@acouvreur acouvreur commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Closes #3325

Related to moby/moby#52651

- What I did

Add 5 options to docker container update to control the device blkio throttle.

- How I did it

I simply added the same options from the create command to the update command to be able to pass the blkio device arguments for the update.

- How to verify it

The current version of the moby/moby library does not forward those arguments even though they exist in the struct.

You need to set the moby/moby version to the one in moby/moby#52651 and then create a docker container with a certain blkio device throttle configuration and then update it using docker container update. Then you can inspect the container for those new values.

- Human readable description for the release notes

docker container update can now update the blkio device weights/IOPs

- A picture of a cute animal (not mandatory but encouraged)

@acouvreur acouvreur force-pushed the container-update-blkio-device-throttle branch 2 times, most recently from 11ba624 to 1c145a3 Compare June 6, 2026 18:46
@codecov-commenter

codecov-commenter commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/container/update.go 0.00% 30 Missing ⚠️

📢 Thoughts on this report? Let us know!

@acouvreur acouvreur requested review from a team and thaJeztah as code owners June 6, 2026 18:58
@thaJeztah thaJeztah added this to the 29.6.0 milestone Jun 12, 2026
@thaJeztah thaJeztah force-pushed the container-update-blkio-device-throttle branch from 0649cdb to e03b777 Compare June 12, 2026 16:48
@thaJeztah thaJeztah marked this pull request as draft June 12, 2026 16:49
@thaJeztah thaJeztah force-pushed the container-update-blkio-device-throttle branch from e03b777 to a37006f Compare June 12, 2026 16:56
acouvreur and others added 2 commits June 12, 2026 19:07
Signed-off-by: Alexis Couvreur <alexiscouvreur.pro@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the container-update-blkio-device-throttle branch from a37006f to 17ae429 Compare June 12, 2026 17:07
@thaJeztah thaJeztah marked this pull request as ready for review June 12, 2026 17:07
@vvoland

vvoland commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Thinking if we could align with the compose format a little bit more: https://docs.docker.com/reference/compose-file/services/#blkio_config

Comment on lines +46 to +52
options := &updateOptions{
blkioWeightDevice: opts.NewWeightdeviceOpt(opts.ValidateWeightDevice),
deviceReadBps: opts.NewThrottledeviceOpt(opts.ValidateThrottleBpsDevice),
deviceReadIOps: opts.NewThrottledeviceOpt(opts.ValidateThrottleIOpsDevice),
deviceWriteBps: opts.NewThrottledeviceOpt(opts.ValidateThrottleBpsDevice),
deviceWriteIOps: opts.NewThrottledeviceOpt(opts.ValidateThrottleIOpsDevice),
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to do this otherwise it would not validate and send [nil] as slice, but it looks like it currently defaults to sending an empty slice, which would probably reset the existing values by default (so something to fix)

@thaJeztah

Copy link
Copy Markdown
Member

Yeah, we probably should look; currently it's aligning with docker run / docker create, but agreed that these flags aren't ideal.

@thaJeztah

Copy link
Copy Markdown
Member

Discussing with @vvoland on slack; given that there's still some bits to discuss (and a potential bug to be fixed); let's have a closer look at options and not rush.

If we have a good plan soon, it can still be in v29.6.0-rc.2, otherwise we could shift it to v29.7 (which should not be far in the future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support All Blkio Throttles Available in Engine API

4 participants