-
Notifications
You must be signed in to change notification settings - Fork 640
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
Add support for remaining blkio settings #3950
base: main
Are you sure you want to change the base?
Conversation
45a457d
to
ef71f08
Compare
Test failures do not appear to be related to the specific change. Previous runs have already passed those checks. |
Signed-off-by: Swagat Bora <[email protected]>
ef71f08
to
39f89b3
Compare
|
||
func TestRunBlkioSettingCgroupV2(t *testing.T) { | ||
t.Parallel() | ||
testutil.DockerIncompatible(t) |
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.
why is this docker imcompatible?
switch info.CgroupDriver { | ||
case "none", "": | ||
t.Skip("test requires cgroup driver") | ||
} |
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.
duplicated with line 429-431
} | ||
|
||
for _, tt := range tests { | ||
tt := tt // capture range variable |
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.
this is no longer needed after go 1.22 (or 1.21? not sure the exact version)
@@ -414,7 +414,7 @@ IPFS flags: | |||
- :nerd_face: `--ipfs-address`: Multiaddr of IPFS API (default uses `$IPFS_PATH` env variable if defined or local directory `~/.ipfs`) | |||
|
|||
Unimplemented `docker run` flags: | |||
`--blkio-weight-device`, `--cpu-rt-*`, `--device-*`, | |||
`--cpu-rt-*`, `--device-cgroup-rule`, |
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 also add these new flags to the this command doc?
BlkioWeight uint16 | ||
// BlkioWeightDevice specifies the Block IO weight (relative device weight) | ||
BlkioWeightDevice []string | ||
// BlkioDeviceReadBps specifies the Block IO read rate limit(bytes per second) of a device | ||
BlkioDeviceReadBps []string | ||
// BlkioDeviceWriteBps specifies the Block IO write rate limit(bytes per second) of a device | ||
BlkioDeviceWriteBps []string | ||
// BlkioDeviceReadIOps specifies the Block IO read rate limit(IO per second) of a device | ||
BlkioDeviceReadIOps []string | ||
// BlkioDeviceWriteIOps specifies the Block IO read rate limit(IO per second) of a device | ||
BlkioDeviceWriteIOps []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.
Do we need to support these flags in other commands? If so I suggest we create a separate struct, e.g., Blkio
.
Nerdctl today has support for
--blkio-weight
.This PR adds support for the remaining blkio options (as supported by docker).
Requires cgroup v2 and block device scheduler set to
bfq
Testing