Skip to content

Commit

Permalink
Merge pull request #2082 from AkihiroSuda/blkio-kernel50
Browse files Browse the repository at this point in the history
integration: remove blkio.weight (unavailable in kernel 5.0)
  • Loading branch information
Mrunal Patel authored Jul 29, 2019
2 parents dd8b9b1 + 351bfb4 commit 80d35c7
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions tests/integration/update.bats
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ function setup() {
"period": 1000000,
"cpus": "0"
},
"blockio": {
"weight": 1000
},
"pids": {
"limit": 20
},
Expand Down Expand Up @@ -70,7 +67,6 @@ function check_cgroup_value() {
CGROUP_SYSTEM_MEMORY=$(grep "cgroup" /proc/self/mountinfo | gawk 'toupper($NF) ~ /\<'MEMORY'\>/ { print $5; exit }')

# check that initial values were properly set
check_cgroup_value $CGROUP_BLKIO "blkio.weight" 1000
check_cgroup_value $CGROUP_CPU "cpu.cfs_period_us" 1000000
check_cgroup_value $CGROUP_CPU "cpu.cfs_quota_us" 500000
check_cgroup_value $CGROUP_CPU "cpu.shares" 100
Expand All @@ -81,11 +77,6 @@ function check_cgroup_value() {
check_cgroup_value $CGROUP_MEMORY "memory.soft_limit_in_bytes" 25165824
check_cgroup_value $CGROUP_PIDS "pids.max" 20

# update blkio-weight
runc update test_update --blkio-weight 500
[ "$status" -eq 0 ]
check_cgroup_value $CGROUP_BLKIO "blkio.weight" 500

# update cpu-period
runc update test_update --cpu-period 900000
[ "$status" -eq 0 ]
Expand Down Expand Up @@ -182,16 +173,12 @@ function check_cgroup_value() {
"period": 1000000,
"cpus": "0"
},
"blockIO": {
"weight": 1000
},
"pids": {
"limit": 20
}
}
EOF
[ "$status" -eq 0 ]
check_cgroup_value $CGROUP_BLKIO "blkio.weight" 1000
check_cgroup_value $CGROUP_CPU "cpu.cfs_period_us" 1000000
check_cgroup_value $CGROUP_CPU "cpu.cfs_quota_us" 500000
check_cgroup_value $CGROUP_CPU "cpu.shares" 100
Expand All @@ -203,12 +190,11 @@ EOF
check_cgroup_value $CGROUP_PIDS "pids.max" 20

# redo all the changes at once
runc update test_update --blkio-weight 500 \
runc update test_update \
--cpu-period 900000 --cpu-quota 600000 --cpu-share 200 --memory 67108864 \
--memory-reservation 33554432 --kernel-memory 50331648 --kernel-memory-tcp 41943040 \
--pids-limit 10
[ "$status" -eq 0 ]
check_cgroup_value $CGROUP_BLKIO "blkio.weight" 500
check_cgroup_value $CGROUP_CPU "cpu.cfs_period_us" 900000
check_cgroup_value $CGROUP_CPU "cpu.cfs_quota_us" 600000
check_cgroup_value $CGROUP_CPU "cpu.shares" 200
Expand All @@ -233,9 +219,6 @@ EOF
"period": 1000000,
"cpus": "0"
},
"blockIO": {
"weight": 1000
},
"pids": {
"limit": 20
}
Expand All @@ -246,7 +229,6 @@ EOF

runc update -r $BATS_TMPDIR/runc-cgroups-integration-test.json test_update
[ "$status" -eq 0 ]
check_cgroup_value $CGROUP_BLKIO "blkio.weight" 1000
check_cgroup_value $CGROUP_CPU "cpu.cfs_period_us" 1000000
check_cgroup_value $CGROUP_CPU "cpu.cfs_quota_us" 500000
check_cgroup_value $CGROUP_CPU "cpu.shares" 100
Expand Down

0 comments on commit 80d35c7

Please sign in to comment.