skip set cpu.weight when cpu.idle is enabled in cgroups v2#4143
skip set cpu.weight when cpu.idle is enabled in cgroups v2#4143qdaxb wants to merge 1 commit intoopencontainers:mainfrom
Conversation
9079199 to
d255be9
Compare
|
Instead of silently skipping we should fail as a validation error. |
@mrunalp Thanks for reply. I'm still a little confused about the There is no description in the spec that
So I think fs2 should be compatible with this situation like systemd, or directly add a hint in the document that they cannot be used at the same time? |
Should be a warning to avoid breaking compatibility? |
|
Yes, this should probably be a warning. I'm going to carry this into #4227. |
Signed-off-by: axb <uaxb@hotmail.com>
|
There's no need for a warning. The problem is, This PR needs a test case though. Can you add one @qdaxb ? |
In cgroups v2, setting
cpu.weightwhencpu.idle==1will fail withInvalid argumentThis pr fixed this situation, consistent with https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/systemd/v2.go#L119