Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pkg/integrations/gitlab/snippet-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ if [ ! -f /etc/containers/containers.conf ]; then
sudo chmod 644 /etc/containers/containers.conf
fi

# Remove the per-container PID cap so compilation-heavy builds (e.g. Pillow
# compiling 60+ C files through a ccache->gcc->cc1->as chain) do not exhaust
# the cgroup pids.max and trigger EAGAIN on fork.
if grep -q '^\[containers\]' /etc/containers/containers.conf; then
if awk '/^\[containers\]/{f=1;next} /^\[/{f=0} f && /^pids_limit/{found=1} END{exit !found}' \
/etc/containers/containers.conf; then
sudo sed -i 's|^pids_limit.*|pids_limit = -1|' /etc/containers/containers.conf
else
sudo sed -i '/^\[containers\]/a pids_limit = -1' /etc/containers/containers.conf
fi
else
printf '\n[containers]\npids_limit = -1\n' | sudo tee -a /etc/containers/containers.conf > /dev/null
fi
sudo chmod 644 /etc/containers/containers.conf

{{- if .LogToJournald}}
# Set journald as the container log driver so CI job output is captured by the
# systemd journal and can be correlated with runner daemon logs via job_id.
Expand Down Expand Up @@ -174,6 +189,7 @@ sudo gitlab-runner register \
--docker-image "fedora:latest" \
--docker-host "unix:///run/podman/podman.sock" \
--docker-privileged \
--docker-pids-limit -1 \
"${_docker_dns_args[@]}" \
--docker-volumes "/etc/containers/executor-containers.conf:/etc/containers/containers.conf:ro"

Expand Down
3 changes: 3 additions & 0 deletions pkg/provider/ibmcloud/action/ibm-power/cloud-config
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ write_files:
[Service]
StandardOutput=append:/var/log/gitlab-runner/runner.log
StandardError=append:/var/log/gitlab-runner/runner.log
# Unlimited task/process ceiling so ccache->gcc->cc1->as chains during
# compilation-heavy builds do not hit the systemd default TasksMax.
TasksMax=infinity
- path: /etc/logrotate.d/gitlab-runner
permissions: '0644'
content: |
Expand Down
3 changes: 3 additions & 0 deletions pkg/provider/ibmcloud/action/ibm-z/cloud-config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ write_files:
[Service]
StandardOutput=append:/var/log/gitlab-runner/runner.log
StandardError=append:/var/log/gitlab-runner/runner.log
# Unlimited task/process ceiling so ccache->gcc->cc1->as chains during
# compilation-heavy builds do not hit the systemd default TasksMax.
TasksMax=infinity
- path: /etc/logrotate.d/gitlab-runner
permissions: '0644'
content: |
Expand Down