Skip to content

systemd and fs2 ignore update --cpu-period if cpu-quota was/is not set #2464

@kolyshkin

Description

@kolyshkin

systemd/v1, systemd/v2 and fs2 cgroup drivers ignore the CPU period during start/run, if CPU quota is not set.

Only the fs (v1) driver sets the period, working as expected.

Repro for systemd:

# make sure no quota/period set in config.json
runc --systemd-cgroup run -d --console-socket $CONSOLE_SOCKET test_update
# update the quota alone, no old values were set
runc --systemd-cgroup  update --cpu-period 30000 test_update
# check the value for v1:
cat /sys/fs/cgroup/$CGPATH/cpu.cfs_period_us
# check the value for v2:
cat /sys/fs/cgroup/$CGPATH/cpu.max

(same repro for fs2 driver, modulo --systemd-cgroup).

Expected value for period (second value in cpu.max) is the one set, i.e. 30000. Actual value is 100000.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions