This is an automated email from the ASF dual-hosted git repository.

jstastnycz pushed a commit to branch radtriste-fix-pipelines
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-pipelines.git


The following commit(s) were added to refs/heads/radtriste-fix-pipelines by 
this push:
     new 3a977f48 cgroup v2 #1
3a977f48 is described below

commit 3a977f48206deda55f2bea1aac6d7ba443eca549
Author: jstastny-cz <[email protected]>
AuthorDate: Tue Nov 14 08:16:33 2023 +0100

    cgroup v2 #1
---
 apache-nodes/Dockerfile.kogito-ci-build |  2 +-
 apache-nodes/entrypoint.sh              | 19 ++++++++++++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/apache-nodes/Dockerfile.kogito-ci-build 
b/apache-nodes/Dockerfile.kogito-ci-build
index 240f9cf3..1bc0858e 100644
--- a/apache-nodes/Dockerfile.kogito-ci-build
+++ b/apache-nodes/Dockerfile.kogito-ci-build
@@ -108,7 +108,7 @@ RUN wget 
https://github.com/mislav/hub/releases/download/v2.14.2/hub-linux-amd64
   sudo update-alternatives --install /usr/local/bin/hub hub /opt/hub/bin/hub 1
 
 # Cekit
-RUN pip${PYTHON_MAJOR_VERSION} install cekit==4.8.0 behave lxml docker 
docker-squash elementPath pyyaml ruamel.yaml python-dateutil Jinja2 pykwalify 
colorlog click && \
+RUN pip${PYTHON_MAJOR_MINOR_VERSION} install cekit==4.8.0 behave lxml docker 
docker-squash elementPath pyyaml ruamel.yaml python-dateutil Jinja2 pykwalify 
colorlog click && \
   sudo update-alternatives --install /usr/local/bin/cekit cekit 
~/.local/bin/cekit 1
 RUN wget 
https://github.com/openshift/source-to-image/releases/download/v1.3.8/source-to-image-v1.3.8-980ca195-linux-amd64.tar.gz
 -P /tmp && \
   tmp_dir=$(mktemp -d) && \
diff --git a/apache-nodes/entrypoint.sh b/apache-nodes/entrypoint.sh
index 1ac2c0ad..81e85501 100755
--- a/apache-nodes/entrypoint.sh
+++ b/apache-nodes/entrypoint.sh
@@ -1,7 +1,20 @@
 #!/bin/bash
-
+set -e
 # Start docker
 start-docker.sh
 
-# Execute specified command
-"$@"
\ No newline at end of file
+# cgroup v2: enable nesting
+if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
+       # move the processes from the root group to the /init group,
+       # otherwise writing subtree_control fails with EBUSY.
+       # An error during moving non-existent process (i.e., "cat") is ignored.
+       mkdir -p /sys/fs/cgroup/init
+       xargs -rn1 < /sys/fs/cgroup/cgroup.procs > 
/sys/fs/cgroup/init/cgroup.procs || :
+       # enable controllers
+       sed -e 's/ / +/g' -e 's/^/+/' < /sys/fs/cgroup/cgroup.controllers \
+               > /sys/fs/cgroup/cgroup.subtree_control
+fi
+
+if [ $# -gt 0 ]; then
+       exec "$@"
+fi
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to