From 91d40e453c3456b7ad9fa239104d626d0f5fd767 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Tue, 14 Jul 2026 14:09:03 +0300 Subject: [PATCH 1/2] CI: Ubuntu 26.04 is added to test --- .github/workflows/ci.yml | 2 + Dockerfile--ubuntu_26_04.tmpl | 90 +++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 Dockerfile--ubuntu_26_04.tmpl diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39fa220..117d6e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,8 @@ jobs: python: "3.14" - platform: "ubuntu_24_04" python: "3" + - platform: "ubuntu_26_04" + python: "3" - platform: "altlinux_10" python: "3" - platform: "altlinux_11" diff --git a/Dockerfile--ubuntu_26_04.tmpl b/Dockerfile--ubuntu_26_04.tmpl new file mode 100644 index 0000000..828561f --- /dev/null +++ b/Dockerfile--ubuntu_26_04.tmpl @@ -0,0 +1,90 @@ +ARG PYTHON_VERSION=3 + +# --------------------------------------------- base1 +FROM ubuntu:26.04 AS base1 + +# Disable interactive apt questions so that the build doesn't hang when setting time zones +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + sudo \ + curl \ + ca-certificates \ + openssh-server \ + sshpass \ + time \ + netcat-traditional \ + iproute2 \ + git \ + && rm -rf /var/lib/apt/lists/* + +# --------------------------------------------- base2_with_python-3 +FROM base1 AS base2_with_python-3 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + python3 \ + python3-dev \ + python3-venv \ + && rm -rf /var/lib/apt/lists/* + +ENV PYTHON_BINARY=python3 + +# --------------------------------------------- final +FROM base2_with_python-${PYTHON_VERSION} AS final + +EXPOSE 22 +RUN ssh-keygen -A + +RUN useradd -m test + +# It enables execution of "sudo service ssh start" without password +RUN echo "test ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers + +COPY --chown=test:test . /home/test/testgres +WORKDIR /home/test/testgres + +ENV LANG=C.UTF-8 + +RUN chmod 700 /home/test/ && \ + mkdir -p /home/test/.ssh && \ + chown -R test:test /home/test/.ssh + +# +# \"$@\" +# - quote is important! +# - "DUMMY-DUMMY-DUMMY" will be ignored. Do not ask me "why?". AXEZ. +# +ENTRYPOINT ["sh", "-c", " \ + set -eux; \ + echo 'SYSTEM START: PREPARING SSH'; \ + service ssh start; \ + ls -la /home/test/.ssh/; \ + \"$@\" \ +", "DUMMY-DUMMY-DUMMY"] + +# Run tests by default (master machine role) +CMD ["bash", "-c", " \ +set -eux; \ +echo \"HOME DIR IS [`realpath ~/`]\"; \ +echo \"WORK DIR IS [$(pwd)]\"; \ +if [ ! -f /home/test/.ssh/id_rsa ]; then \ + su test -c \"ssh-keygen -t rsa -f /home/test/.ssh/id_rsa -q -N ''\"; \ + su test -c \"cat /home/test/.ssh/id_rsa.pub >> /home/test/.ssh/authorized_keys\"; \ + chmod 600 /home/test/.ssh/authorized_keys; \ +fi; \ +ls -la /home/test/.ssh/; \ +su test -c \"ssh-keyscan -H localhost >> /home/test/.ssh/known_hosts\"; \ +su test -c \"ssh-keyscan -H 127.0.0.1 >> /home/test/.ssh/known_hosts\"; \ +if [ -n \"${TEST_CFG__REMOTE_HOST:-}\" ]; then \ + su test -c \"ssh-keyscan -H ${TEST_CFG__REMOTE_HOST} >> /home/test/.ssh/known_hosts\"; \ +fi; \ +if [ -n \"${TEST_CFG__REMOTE_SSH_KEY:-}\" ]; then \ + cp \"${TEST_CFG__REMOTE_SSH_KEY}\" \"${TEST_CFG__REMOTE_SSH_KEY}_ci\"; \ + export TEST_CFG__REMOTE_SSH_KEY=\"${TEST_CFG__REMOTE_SSH_KEY}_ci\"; \ + chown test:test \"${TEST_CFG__REMOTE_SSH_KEY}\"; \ + chmod 600 \"${TEST_CFG__REMOTE_SSH_KEY}\"; \ + ls -la /home/test/.ssh/; \ +fi; \ +ls -la ./; \ +su test -c \"bash ./run_tests3.sh\"; \ +"] From e28b74f4e99840b17fcaba509ad43dc5aa40e0b7 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Tue, 14 Jul 2026 15:42:01 +0300 Subject: [PATCH 2/2] CI: Fix for TestOsOpsCommon::test_mkdir__mt[remote_ops] on ubuntu 26.04 Returning classic GNU coreutils instead of the default Rust/uutils. --- Dockerfile--ubuntu_26_04.tmpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile--ubuntu_26_04.tmpl b/Dockerfile--ubuntu_26_04.tmpl index 828561f..ddfaa9d 100644 --- a/Dockerfile--ubuntu_26_04.tmpl +++ b/Dockerfile--ubuntu_26_04.tmpl @@ -16,6 +16,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ netcat-traditional \ iproute2 \ git \ + # FIX FOR TestOsOpsCommon::test_mkdir__mt[remote_ops] \ + # INFO [2026-07-14 11:12:31] [Worker #3] Number 0 is reserved! \ + # INFO [2026-07-14 11:12:31] [Worker #0] Number 0 is reserved! \ + # Returning classic GNU coreutils instead of the default Rust/uutils \ + && apt-get install -y --allow-remove-essential coreutils-from-gnu coreutils-from-uutils- \ && rm -rf /var/lib/apt/lists/* # --------------------------------------------- base2_with_python-3