Skip to content
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

cli: add instruction for blkio-weight-device #1381

Merged
merged 1 commit into from
May 23, 2018
Merged

cli: add instruction for blkio-weight-device #1381

merged 1 commit into from
May 23, 2018

Conversation

Ace-Tang
Copy link
Contributor

blkio.weight_device need cfq io scheduler enable, add this
instruction for blkio-weight-device

add condition check for ci test TestRunBlockIOWeightDevice

Same problem also exist in #1346.

Signed-off-by: Ace-Tang aceapril@126.com

Ⅰ. Describe what this PR did

[root@r10d08216.sqa.zmf /root]
#pouch run -ti --blkio-weight-device "/dev/sda:1000" reg.docker.alibaba-inc.com/sunyuan/ubuntu:14.04 bash
Error: failed to run container 143a0e: {"message":"failed to create task, container id: 143a0e09b0d0d3905a6c56f66aa55576c0801fd50d1dc5072d6578eefc182231: OCI runtime create failed: container_linux.go:265: starting container process caused \"process_linux.go:348: container init caused \\\"process_linux.go:320: setting cgroup config for procHooks process caused \\\\\\\"failed to write 8:0 1000 to blkio.weight_device: write /sys/fs/cgroup/blkio/default/143a0e09b0d0d3905a6c56f66aa55576c0801fd50d1dc5072d6578eefc182231/blkio.weight_device: operation not supported\\\\\\\"\\\"\": unknown"}

Container fails to start, because sda's io scheduler is deadline, but blkio.weight_device need cfq,

[root@r10d08216.sqa.zmf /sys/fs/cgroup/blkio]
#cat /sys/block/sda/queue/scheduler 
noop [deadline] cfq 

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

blkio.weight_device need cfq io scheduler enable, add this
instruction for blkio-weight-device

add condition check for ci test TestRunBlockIOWeightDevice

Same problem also exist in #1346.

Signed-off-by: Ace-Tang <aceapril@126.com>
@codecov-io
Copy link

Codecov Report

Merging #1381 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1381      +/-   ##
==========================================
- Coverage   38.61%   38.53%   -0.08%     
==========================================
  Files         248      248              
  Lines       16512    16512              
==========================================
- Hits         6376     6363      -13     
- Misses       9318     9328      +10     
- Partials      818      821       +3
Impacted Files Coverage Δ
cli/common_flags.go 0% <0%> (ø) ⬆️
ctrd/container.go 48.06% <0%> (-2.33%) ⬇️
daemon/mgr/spec_linux.go 66.66% <0%> (-1.81%) ⬇️
daemon/mgr/network.go 68.3% <0%> (-0.5%) ⬇️
daemon/mgr/container.go 49.35% <0%> (-0.09%) ⬇️
daemon/logger/jsonfile/utils.go 71.66% <0%> (+1.66%) ⬆️

@Letty5411
Copy link
Contributor

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label May 23, 2018
@Letty5411 Letty5411 merged commit 1adfb78 into AliyunContainerService:master May 23, 2018
@@ -36,7 +36,7 @@ type Resources struct {
//
BlkioDeviceWriteIOps []*ThrottleDevice `json:"BlkioDeviceWriteIOps"`

// Block IO weight (relative weight).
// Block IO weight (relative weight), need CFQ IO Scheduler enable.
// Maximum: 1000
// Minimum: 0
Copy link
Contributor

@sunyuan3 sunyuan3 May 23, 2018

Choose a reason for hiding this comment

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

between 10 and 1000
Minimum should be 10

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, Could you help fix this, @sunyuan3

@Ace-Tang Ace-Tang deleted the doc_blkio branch May 23, 2018 10:48
starnop pushed a commit to starnop/pouch that referenced this pull request May 24, 2018
cli: add instruction for blkio-weight-device
Signed-off-by: Starnop <starnop@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/cli LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants