From e744a117d6bd75ca0f43cb9e0b346bfdc178bbd5 Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Mon, 2 Sep 2024 12:16:57 +0000 Subject: [PATCH] Remove systemd version + ostree check for docker TasksMax (#11493) systemd ignores unknown keys (with a warning) so version checking is not necessary. There is no rationale for excluding it from ostree systems either. --- roles/container-engine/docker/tasks/systemd.yml | 10 ---------- .../docker/templates/docker.service.j2 | 2 -- 2 files changed, 12 deletions(-) diff --git a/roles/container-engine/docker/tasks/systemd.yml b/roles/container-engine/docker/tasks/systemd.yml index 22fe3a02d..2f16d1f90 100644 --- a/roles/container-engine/docker/tasks/systemd.yml +++ b/roles/container-engine/docker/tasks/systemd.yml @@ -13,16 +13,6 @@ notify: Restart docker when: http_proxy is defined or https_proxy is defined -- name: Get systemd version - # noqa command-instead-of-module - systemctl is called intentionally here - shell: set -o pipefail && systemctl --version | head -n 1 | cut -d " " -f 2 - args: - executable: /bin/bash - register: systemd_version - when: not is_ostree - changed_when: false - check_mode: false - - name: Write docker.service systemd file template: src: docker.service.j2 diff --git a/roles/container-engine/docker/templates/docker.service.j2 b/roles/container-engine/docker/templates/docker.service.j2 index 539c3a5c4..44ccbd8e1 100644 --- a/roles/container-engine/docker/templates/docker.service.j2 +++ b/roles/container-engine/docker/templates/docker.service.j2 @@ -31,9 +31,7 @@ ExecStart={{ docker_bin_dir }}/dockerd \ $DOCKER_OPTS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_DNS_OPTIONS -{% if not is_ostree and systemd_version.stdout|int >= 226 %} TasksMax=infinity -{% endif %} LimitNOFILE=1048576 LimitNPROC=1048576 LimitCORE=infinity