From 883e04a3fe5013d82440ee725b948c932383d34f Mon Sep 17 00:00:00 2001 From: Abhishek Malvankar Date: Fri, 15 Dec 2023 19:33:13 -0500 Subject: [PATCH] debug docker res config-22 --- .github/workflows/mcad-CI.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mcad-CI.yml b/.github/workflows/mcad-CI.yml index f4166ebc..e60fa6b0 100644 --- a/.github/workflows/mcad-CI.yml +++ b/.github/workflows/mcad-CI.yml @@ -12,8 +12,8 @@ jobs: steps: - name: run docker resource config run: | - sudo touch $PWD/slice.conf - cat < $PWD/slice.conf + sudo touch /etc/systemd/system/docker_limit.slice + cat < /etc/systemd/system/docker_limit.slice [Unit] Description=Slice that limits docker resources Before=slices.target @@ -21,8 +21,8 @@ jobs: CPUAccounting=true CPUQuota=50% EOF - sudo systemctl start $PWD/slice.conf - new_content='{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/slice.conf" }' + sudo systemctl start /etc/systemd/system/docker_limit.slice + new_content='{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/docker_limit.slice" }' sudo sed -i 's|{ "exec-opts": \["native.cgroupdriver=cgroupfs"\], "cgroup-parent": "/actions_job" }|'"$new_content"'|' /etc/docker/daemon.json cat /etc/docker/daemon.json sudo systemctl restart docker