diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4ee06799b..a7f94ec0c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,13 +6,21 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: submodules: true + - name: Install isolate v2 + run: | + cd isolate && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y build-essential libcap-dev libsystemd-dev pkg-config && make isolate && make isolate-cg-keeper && sudo make install && sudo cp systemd/* /etc/systemd/system/ && sudo systemctl daemon-reload && sudo systemctl start isolate.slice && sudo systemctl start isolate.service + + - name: Check if isolate is running + run: | + systemctl status isolate.service + - name: Check available cgroups run: | mount | grep cgroup diff --git a/Dockerfile b/Dockerfile index 1b2624a7f1..c85e1f1906 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ RUN apt-get install -y \ libcups2-dev \ libffi-dev \ libpq-dev \ + libsystemd-dev \ libyaml-dev \ mono-mcs \ openjdk-8-jdk-headless \ diff --git a/cms/grading/Sandbox.py b/cms/grading/Sandbox.py index 741b68dad7..5ec85d3e7c 100644 --- a/cms/grading/Sandbox.py +++ b/cms/grading/Sandbox.py @@ -1076,7 +1076,7 @@ def build_box_options(self): if self.box_id is not None: res += ["--box-id=%d" % self.box_id] if self.cgroup: - res += ["--cg", "--cg-timing"] + res += ["--cg"] if self.chdir is not None: res += ["--chdir=%s" % self.chdir] for src, dest, options in self.dirs: diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 8a121b313f..36f7dc4592 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -19,8 +19,12 @@ services: volumes: - "./codecov:/home/cmsuser/cms/codecov" privileged: true + cgroup: host command: > wait-for-it testdb:5432 -- sh -c " + mkdir /run/isolate ; + echo /sys/fs/cgroup > /run/isolate/cgroup ; + isolate-check-environment ; dropdb --host=testdb --username=postgres cmsdbfortesting ; createdb --host=testdb --username=postgres cmsdbfortesting ; cmsInitDB ; diff --git a/isolate b/isolate index eda2c65acd..758ab000e3 160000 --- a/isolate +++ b/isolate @@ -1 +1 @@ -Subproject commit eda2c65acd9ad5d4fc8ba46884e66445a8fca1b8 +Subproject commit 758ab000e3a1bcf1e57ffddea2340ffa1a5af49b