diff --git a/infrastructure/node-io/guard-script.sh b/infrastructure/node-io/guard-script.sh index e12aca4..1aa599f 100644 --- a/infrastructure/node-io/guard-script.sh +++ b/infrastructure/node-io/guard-script.sh @@ -71,8 +71,10 @@ apply_io_max() { dir="$(find_dind_cgroup)" || return 1 want="259:0 wbps=${WMAX}" cur="$(cat "${dir}/io.max" 2>/dev/null || true)" + # blk-throttle reads back all four fields ("259:0 rbps=max wbps=40M ..."), + # so match on the wbps field alone, not on the exact written string. case "${cur}" in - *"${want}"*) : ;; + *"wbps=${WMAX}"*) : ;; *) if echo "${want}" > "${dir}/io.max" 2>/dev/null; then log "applied io.max '${want}' to ${dir#"${CGROOT}"} (was '${cur}')"