From 435b440b67af9e898bee2ca9caa5f26194801db1 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Tue, 14 Jan 2025 19:55:56 -0800 Subject: [PATCH 1/2] Remove deployment support for Debian versions that reached EOL (#5804) * Remove EOL Debian deployment support and tests * Remove debian buster leftover --- .github/workflows/ansible.yml | 2 - .github/workflows/puppet-test.yml | 2 +- .../ansible/molecule/config/vagrant.yml | 4 +- .../ansible/molecule/default/Dockerfile.j2 | 4 -- deployments/ansible/roles/collector/README.md | 3 +- .../ansible/roles/collector/defaults/main.yml | 2 +- .../collector/tasks/linux_install_fluentd.yml | 2 - deployments/chef/README.md | 3 +- deployments/chef/attributes/default.rb | 7 +-- deployments/chef/kitchen.yml | 13 ----- deployments/puppet/manifests/params.pp | 6 +-- deployments/salt/README.md | 3 +- .../salt/splunk-otel-collector/fluentd.sls | 2 - packaging/installer/install.sh | 17 +------ .../images/deb/Dockerfile.debian-buster | 47 ------------------- .../images/deb/Dockerfile.debian-stretch | 45 ------------------ .../tests/deployments/puppet/puppet_test.py | 2 +- .../deployments/salt/images/Dockerfile.deb | 5 -- .../salt/images/distro_docker_opts.yaml | 2 - .../tests/images/deb/Dockerfile.debian-buster | 24 ---------- .../images/deb/Dockerfile.debian-stretch | 27 ----------- packaging/tests/installer_test.py | 6 +-- .../images/deb/Dockerfile.debian-buster | 44 ----------------- .../images/deb/Dockerfile.debian-stretch | 47 ------------------- 24 files changed, 15 insertions(+), 304 deletions(-) delete mode 100644 packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-buster delete mode 100644 packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-stretch delete mode 100644 packaging/tests/images/deb/Dockerfile.debian-buster delete mode 100644 packaging/tests/images/deb/Dockerfile.debian-stretch delete mode 100644 packaging/tests/instrumentation/images/deb/Dockerfile.debian-buster delete mode 100644 packaging/tests/instrumentation/images/deb/Dockerfile.debian-stretch diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml index a076865425..b954673501 100644 --- a/.github/workflows/ansible.yml +++ b/.github/workflows/ansible.yml @@ -70,8 +70,6 @@ jobs: - amazonlinux2023 - centos8 - centos9 - - debian9 - - debian10 - debian11 - debian12 - opensuse12 diff --git a/.github/workflows/puppet-test.yml b/.github/workflows/puppet-test.yml index f567868923..f568f4b5f9 100644 --- a/.github/workflows/puppet-test.yml +++ b/.github/workflows/puppet-test.yml @@ -72,7 +72,7 @@ jobs: distro=$(for d in $dockerfiles; do echo -n "\"$d\","; done) puppet_release='"6","7","8"' with_instrumentation='"true","false"' - exclude='{"DISTRO": "debian-stretch", "PUPPET_RELEASE": "8"}, {"DISTRO": "ubuntu-xenial", "PUPPET_RELEASE": "8"}' # puppet 8 not supported for these distros + exclude='{"DISTRO": "ubuntu-xenial", "PUPPET_RELEASE": "8"}' # puppet 8 not supported for this distro matrix="{\"DISTRO\": [${distro%,}], \"PUPPET_RELEASE\": [${puppet_release}], \"WITH_INSTRUMENTATION\": [${with_instrumentation}], \"exclude\": [${exclude}]}" echo "$matrix" | jq echo "matrix=${matrix}" >> $GITHUB_OUTPUT diff --git a/deployments/ansible/molecule/config/vagrant.yml b/deployments/ansible/molecule/config/vagrant.yml index df6475da7a..c52ac5fcfe 100644 --- a/deployments/ansible/molecule/config/vagrant.yml +++ b/deployments/ansible/molecule/config/vagrant.yml @@ -13,8 +13,8 @@ platforms: box: ubuntu/focal64 - name: centos8 box: centos/8 - - name: buster64 - box: debian/buster64 + - name: bookworm64 + box: debian/bookworm64 - name: amazonlinux box: bento/amazonlinux-2 provisioner: diff --git a/deployments/ansible/molecule/default/Dockerfile.j2 b/deployments/ansible/molecule/default/Dockerfile.j2 index 9b9045fc29..ce60f667ac 100644 --- a/deployments/ansible/molecule/default/Dockerfile.j2 +++ b/deployments/ansible/molecule/default/Dockerfile.j2 @@ -1,9 +1,5 @@ {% if item.image not in ["opensuse12", "opensuse15", "centos9"] %} FROM geerlingguy/docker-{{ item.image }}-ansible:latest -{% if item.image == "debian9" %} -RUN sed -i 's|http://.*.debian.org|http://archive.debian.org|' /etc/apt/sources.list -RUN sed -i '/stretch-updates/d' /etc/apt/sources.list -{% endif %} {% elif item.image == "centos9" %} FROM quay.io/centos/centos:stream9 ENV container docker diff --git a/deployments/ansible/roles/collector/README.md b/deployments/ansible/roles/collector/README.md index e981110817..a562e28a6a 100644 --- a/deployments/ansible/roles/collector/README.md +++ b/deployments/ansible/roles/collector/README.md @@ -174,8 +174,7 @@ which allows setting up a proxy to download the collector binaries. (**default:** `false`) - `td_agent_version`: Version of td-agent (fluentd package) that will be - installed (**default:** `3.7.1` for Debian stretch and `4.3.2` for other - distros) + installed (**default:** `4.3.2`) - `splunk_fluentd_config`: Path to the fluentd config file on the remote host. (**default:** `/etc/otel/collector/fluentd/fluent.conf` on Linux, diff --git a/deployments/ansible/roles/collector/defaults/main.yml b/deployments/ansible/roles/collector/defaults/main.yml index 73f2fa1449..8fefa7c393 100644 --- a/deployments/ansible/roles/collector/defaults/main.yml +++ b/deployments/ansible/roles/collector/defaults/main.yml @@ -40,7 +40,7 @@ start_service: true splunk_skip_repo: false # Explicitly set version of td-agent, -# By default: 3.7.1 for Debian stretch and 4.3.2 for other distros. +# By default: 4.3.2 td_agent_version: "" # Default path on Linux: "/etc/otel/collector/fluentd/fluent.conf". diff --git a/deployments/ansible/roles/collector/tasks/linux_install_fluentd.yml b/deployments/ansible/roles/collector/tasks/linux_install_fluentd.yml index a69ce936ce..f792857583 100644 --- a/deployments/ansible/roles/collector/tasks/linux_install_fluentd.yml +++ b/deployments/ansible/roles/collector/tasks/linux_install_fluentd.yml @@ -6,8 +6,6 @@ td_agent_version: |- {%- if td_agent_version -%} {{ td_agent_version }} - {%- elif ansible_distribution_release == "stretch" -%} - 3.7.1-0 {%- elif ansible_os_family == "Debian" -%} 4.3.2-1 {%- else -%} diff --git a/deployments/chef/README.md b/deployments/chef/README.md index d7b4b22d06..6f0fb157c4 100644 --- a/deployments/chef/README.md +++ b/deployments/chef/README.md @@ -160,8 +160,7 @@ required `splunk_access_token` attribute and some optional attributes: - `fluentd_version`: Version of the [td-agent]( https://www.fluentd.org/download) (Fluentd) package to install (**default:** - `3.7.1` for Debian stretch, and `4.3.1` for all other Linux distros and - Windows) + `4.3.1` for all Linux distros and Windows) - `fluentd_config_source`: Source path to the Fluentd config file. This file will be copied to the `fluentd_config_dest` path on the node. See the diff --git a/deployments/chef/attributes/default.rb b/deployments/chef/attributes/default.rb index 945701ea8c..0eb3c71db1 100644 --- a/deployments/chef/attributes/default.rb +++ b/deployments/chef/attributes/default.rb @@ -26,12 +26,7 @@ default['splunk_otel_collector']['with_fluentd'] = false default['splunk_otel_collector']['fluentd_version'] = if platform_family?('debian') - case node['lsb']['codename'] - when 'stretch' - '3.7.1-0' - else - '4.3.2-1' - end + '4.3.2-1' else '4.3.2' end diff --git a/deployments/chef/kitchen.yml b/deployments/chef/kitchen.yml index 8e1124c292..caf3c1799b 100644 --- a/deployments/chef/kitchen.yml +++ b/deployments/chef/kitchen.yml @@ -41,19 +41,6 @@ platforms: image: dokken/rockylinux-9 pid_one_command: /usr/lib/systemd/systemd - - name: debian-9 - driver: - image: dokken/debian-9 - intermediate_instructions: | - RUN sed -i 's|http://.*.debian.org|http://archive.debian.org|' /etc/apt/sources.list - RUN sed -i '/stretch-updates/d' /etc/apt/sources.list - pid_one_command: /bin/systemd - - - name: debian-10 - driver: - image: dokken/debian-10 - pid_one_command: /bin/systemd - - name: debian-11 driver: image: dokken/debian-11 diff --git a/deployments/puppet/manifests/params.pp b/deployments/puppet/manifests/params.pp index 100429c240..80ed49ef05 100644 --- a/deployments/puppet/manifests/params.pp +++ b/deployments/puppet/manifests/params.pp @@ -1,7 +1,6 @@ # Class for default param values based on OS class splunk_otel_collector::params { $fluentd_version_default = '4.3.2' - $fluentd_version_stretch = '3.7.1-0' $collector_additional_env_vars = {} if $facts['os']['family'] == 'redhat' or $facts['os']['family'] == 'debian' or $facts['os']['family'] == 'suse' { @@ -14,10 +13,7 @@ $collector_config_dest = $collector_config_source $fluentd_base_url = 'https://packages.treasuredata.com' if $facts['os']['family'] == 'debian' { - $fluentd_version = downcase($facts['os']['distro']['codename']) ? { - 'stretch' => $fluentd_version_stretch, - default => "${fluentd_version_default}-1", - } + $fluentd_version = "${fluentd_version_default}-1" } else { $fluentd_version = $fluentd_version_default } diff --git a/deployments/salt/README.md b/deployments/salt/README.md index 20eb8b1384..2cffdce21d 100644 --- a/deployments/salt/README.md +++ b/deployments/salt/README.md @@ -126,8 +126,7 @@ splunk-otel-collector: - `td_agent_version`: Version of [td-agent]( https://td-agent-package-browser.herokuapp.com/) (fluentd package) that will - be installed (**default:** `3.7.1-0` for Debian 9, and `4.3.0` for other - distros) + be installed (**default:** `4.3.0`) - `splunk_fluentd_config`: Path to the fluentd config file on the remote host. (**default:** `/etc/otel/collector/fluentd/fluent.conf`) diff --git a/deployments/salt/splunk-otel-collector/fluentd.sls b/deployments/salt/splunk-otel-collector/fluentd.sls index 69adbbd2df..c82d74bbeb 100644 --- a/deployments/salt/splunk-otel-collector/fluentd.sls +++ b/deployments/salt/splunk-otel-collector/fluentd.sls @@ -6,8 +6,6 @@ {% if td_agent_version %} {{ td_agent_version }} -{%- elif grains['oscodename'] == 'stretch' %} -{% set td_agent_version = '3.7.1-0' %} {%- elif grains['os_family'] == 'Debian' %} {% set td_agent_version = '4.3.2-1' %} {%- else %} diff --git a/packaging/installer/install.sh b/packaging/installer/install.sh index 90febf7eaf..b186146f15 100755 --- a/packaging/installer/install.sh +++ b/packaging/installer/install.sh @@ -40,12 +40,6 @@ get_distro_codename() { if [ "$distro" = "debian" ] && [ -z "$codename" ]; then case "$( get_distro_version )" in - 9) - codename="stretch" - ;; - 10) - codename="buster" - ;; 11) codename="bullseye" ;; @@ -97,15 +91,10 @@ default_listen_interface="0.0.0.0" default_collector_version="latest" default_td_agent_version="4.3.2" -default_td_agent_version_stretch="3.7.1-0" default_service_user="splunk-otel-collector" default_service_group="splunk-otel-collector" -if [ "$distro_codename" = "stretch" ]; then - default_td_agent_version="$default_td_agent_version_stretch" -fi - preload_path="/etc/ld.so.preload" default_instrumentation_version="latest" default_deployment_environment="" @@ -753,9 +742,7 @@ install() { apt-get -y update install_apt_package "splunk-otel-collector" "$collector_version" if [ -n "$td_agent_version" ]; then - if [ "$distro_codename" != "stretch" ]; then - td_agent_version="${td_agent_version}-1" - fi + td_agent_version="${td_agent_version}-1" if [ "$skip_fluentd_repo" = "false" ]; then install_td_agent_apt_repo "$td_agent_version" fi @@ -1039,7 +1026,7 @@ distro_is_supported() { ;; debian) case "$distro_codename" in - bookworm|bullseye|buster|stretch) + bookworm|bullseye) return 0 ;; esac diff --git a/packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-buster b/packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-buster deleted file mode 100644 index 6e37fa76c8..0000000000 --- a/packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-buster +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian:buster - -RUN apt-get update &&\ - apt-get install -yq ca-certificates procps systemd wget apt-transport-https libcap2-bin curl gnupg lsb-release - -ARG PUPPET_RELEASE="6" -RUN wget https://apt.puppetlabs.com/puppet${PUPPET_RELEASE}-release-buster.deb && \ - dpkg -i puppet${PUPPET_RELEASE}-release-buster.deb && \ - apt-get update && \ - apt-get install -y puppet-agent - -RUN wget -O /tmp/nodejs.tar.gz https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.gz && \ - mkdir -p /opt/ && \ - tar -C /opt/ -xzf /tmp/nodejs.tar.gz && \ - mv /opt/node* /opt/node - -ENV PATH=/opt/puppetlabs/bin:/opt/node/bin:$PATH - -ENV container docker - -RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \ - "systemd-tmpfiles-setup.service" ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/anaconda.target.wants/*; - -# Keep it from wiping our scratch dir in /tmp/scratch -RUN rm -f /usr/lib/tmpfiles.d/tmp.conf; - -RUN systemctl set-default multi-user.target -ENV init /lib/systemd/systemd - -RUN if [ $PUPPET_RELEASE -lt 8 ]; then \ - puppet module install puppetlabs-stdlib --version 4.24.0 && \ - puppet module install puppetlabs-apt --version 7.0.0; \ - else \ - puppet module install puppetlabs-stdlib --version 9.0.0 && \ - puppet module install puppetlabs-apt --version 9.1.0; \ - fi - -COPY deployments/puppet /etc/puppetlabs/code/environments/production/modules/splunk_otel_collector - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/sbin/init"] diff --git a/packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-stretch b/packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-stretch deleted file mode 100644 index b27eeec288..0000000000 --- a/packaging/tests/deployments/puppet/images/deb/Dockerfile.debian-stretch +++ /dev/null @@ -1,45 +0,0 @@ -FROM debian:stretch - -RUN sed -i 's|http://.*.debian.org|http://archive.debian.org|' /etc/apt/sources.list -RUN sed -i '/stretch-updates/d' /etc/apt/sources.list - -RUN apt-get update &&\ - apt-get install -yq ca-certificates procps systemd wget apt-transport-https libcap2-bin curl gnupg lsb-release - -ARG PUPPET_RELEASE="6" -RUN wget https://apt.puppetlabs.com/puppet${PUPPET_RELEASE}-release-stretch.deb && \ - dpkg -i puppet${PUPPET_RELEASE}-release-stretch.deb && \ - apt-get update && \ - apt-get install -y puppet-agent - -RUN wget -O /tmp/nodejs.tar.gz https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.gz && \ - mkdir -p /opt/ && \ - tar -C /opt/ -xzf /tmp/nodejs.tar.gz && \ - mv /opt/node* /opt/node - -ENV PATH=/opt/puppetlabs/bin:/opt/node/bin:$PATH - -ENV container docker - -RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \ - "systemd-tmpfiles-setup.service" ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/anaconda.target.wants/*; - -# Keep it from wiping our scratch dir in /tmp/scratch -RUN rm -f /usr/lib/tmpfiles.d/tmp.conf; - -RUN systemctl set-default multi-user.target -ENV init /lib/systemd/systemd - -RUN puppet module install puppetlabs-stdlib --version 4.24.0 -RUN puppet module install puppetlabs-apt --version 7.0.0 - -COPY deployments/puppet /etc/puppetlabs/code/environments/production/modules/splunk_otel_collector - -VOLUME [ "/sys/fs/cgroup" ] - -ENTRYPOINT ["/lib/systemd/systemd"] diff --git a/packaging/tests/deployments/puppet/puppet_test.py b/packaging/tests/deployments/puppet/puppet_test.py index f144050f05..693a5106d7 100644 --- a/packaging/tests/deployments/puppet/puppet_test.py +++ b/packaging/tests/deployments/puppet/puppet_test.py @@ -125,7 +125,7 @@ def verify_env_file(container, api_url=SPLUNK_API_URL, ingest_url=SPLUNK_INGEST_ def skip_if_necessary(distro, puppet_release): - if distro in ("debian-stretch", "ubuntu-xenial") and int(puppet_release) >= 8: + if distro == "ubuntu-xenial" and int(puppet_release) >= 8: pytest.skip(f"Puppet {puppet_release} not supported for {distro}") diff --git a/packaging/tests/deployments/salt/images/Dockerfile.deb b/packaging/tests/deployments/salt/images/Dockerfile.deb index e6ff8c58a5..efc22b2cc9 100644 --- a/packaging/tests/deployments/salt/images/Dockerfile.deb +++ b/packaging/tests/deployments/salt/images/Dockerfile.deb @@ -6,11 +6,6 @@ ENV DEBIAN_FRONTEND=noninteractive ENV SALT_VERSION=latest ENV NODE_VERSION=16.20.2 -# repo update for debian:stretch -RUN if [ ${DISTRO_IMAGE} = "debian:stretch" ]; then \ - sed -i 's|http://.*.debian.org|http://archive.debian.org|' /etc/apt/sources.list && \ - sed -i '/stretch-updates/d' /etc/apt/sources.list; fi - RUN apt-get update && apt-get upgrade -y -o DPkg::Options::=--force-confold RUN apt-get install -y software-properties-common ca-certificates wget curl apt-transport-https python3-pip vim systemd procps diff --git a/packaging/tests/deployments/salt/images/distro_docker_opts.yaml b/packaging/tests/deployments/salt/images/distro_docker_opts.yaml index 5c8ae3b3e4..b1656292e7 100644 --- a/packaging/tests/deployments/salt/images/distro_docker_opts.yaml +++ b/packaging/tests/deployments/salt/images/distro_docker_opts.yaml @@ -1,7 +1,5 @@ deb: debian-bullseye: ["DISTRO_IMAGE=debian:bullseye"] - debian-buster: ["DISTRO_IMAGE=debian:buster"] - debian-stretch: ["DISTRO_IMAGE=debian:stretch"] ubunu-bionic: ["DISTRO_IMAGE=ubuntu:18.04"] ubuntu-focal: ["DISTRO_IMAGE=ubuntu:20.04"] ubuntu-jammy: ["DISTRO_IMAGE=ubuntu:22.04"] diff --git a/packaging/tests/images/deb/Dockerfile.debian-buster b/packaging/tests/images/deb/Dockerfile.debian-buster deleted file mode 100644 index 6ce957d8b0..0000000000 --- a/packaging/tests/images/deb/Dockerfile.debian-buster +++ /dev/null @@ -1,24 +0,0 @@ -# A debian image with systemd enabled. Must be run with: -# `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags -FROM debian:buster - -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update &&\ - apt-get install -yq ca-certificates curl procps systemd wget - -ENV container docker -RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \ - "systemd-tmpfiles-setup.service" ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/anaconda.target.wants/*; - -RUN systemctl set-default multi-user.target -ENV init /lib/systemd/systemd - -VOLUME [ "/sys/fs/cgroup" ] - -ENTRYPOINT ["/lib/systemd/systemd"] diff --git a/packaging/tests/images/deb/Dockerfile.debian-stretch b/packaging/tests/images/deb/Dockerfile.debian-stretch deleted file mode 100644 index 30080e3b85..0000000000 --- a/packaging/tests/images/deb/Dockerfile.debian-stretch +++ /dev/null @@ -1,27 +0,0 @@ -# A debian image with systemd enabled. Must be run with: -# `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags -FROM debian:stretch - -ENV DEBIAN_FRONTEND noninteractive - -RUN sed -i 's|http://.*.debian.org|http://archive.debian.org|' /etc/apt/sources.list -RUN sed -i '/stretch-updates/d' /etc/apt/sources.list - -RUN apt-get update &&\ - apt-get install -yq ca-certificates curl procps systemd wget - -ENV container docker -RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \ - "systemd-tmpfiles-setup.service" ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/anaconda.target.wants/*; - -RUN systemctl set-default multi-user.target -ENV init /lib/systemd/systemd - -VOLUME [ "/sys/fs/cgroup" ] - -ENTRYPOINT ["/lib/systemd/systemd"] diff --git a/packaging/tests/installer_test.py b/packaging/tests/installer_test.py index 52934dc31d..f23d436c04 100644 --- a/packaging/tests/installer_test.py +++ b/packaging/tests/installer_test.py @@ -202,7 +202,7 @@ def fluentd_supported(distro, arch): return False elif distro == "amazonlinux-2023": return False - elif distro in ("debian-stretch", "ubuntu-xenial") and arch == "arm64": + elif distro == "ubuntu-xenial" and arch == "arm64": return False elif distro == "debian-bookworm": return False @@ -398,7 +398,7 @@ def test_installer_with_instrumentation_default(distro, arch, method): if LOCAL_INSTRUMENTATION_PACKAGE: copy_file_into_container(container, LOCAL_INSTRUMENTATION_PACKAGE, f"/test/instrumentation.pkg") - if arch == "arm64" and distro in ("debian-stretch", "ubuntu-xenial"): + if arch == "arm64" and distro == "ubuntu-xenial": # npm installed with node v16 only supports python 3.6+, but these distros only provide python 3.5 # downgrade npm to support python 3.5 in order to build/compile splunk-otel-js run_container_cmd(container, "bash -l -c 'npm install --global npm@^6'") @@ -522,7 +522,7 @@ def test_installer_with_instrumentation_custom(distro, arch, method, sdk): if LOCAL_INSTRUMENTATION_PACKAGE: copy_file_into_container(container, LOCAL_INSTRUMENTATION_PACKAGE, f"/test/instrumentation.pkg") - if arch == "arm64" and distro in ("debian-stretch", "ubuntu-xenial"): + if arch == "arm64" and distro == "ubuntu-xenial": # npm installed with node v16 only supports python 3.6+, but these distros only provide python 3.5 # downgrade npm to support python 3.5 in order to build/compile splunk-otel-js run_container_cmd(container, "bash -l -c 'npm install --global npm@^6'") diff --git a/packaging/tests/instrumentation/images/deb/Dockerfile.debian-buster b/packaging/tests/instrumentation/images/deb/Dockerfile.debian-buster deleted file mode 100644 index 305408d15b..0000000000 --- a/packaging/tests/instrumentation/images/deb/Dockerfile.debian-buster +++ /dev/null @@ -1,44 +0,0 @@ -# A debian image with systemd enabled. Must be run with: -# `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags -FROM tomcat:9-jre8 as tomcat - -FROM debian:buster - -ARG TARGETARCH - -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update &&\ - apt-get install -yq ca-certificates curl procps python3 systemd wget - -ENV container docker -RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \ - "systemd-tmpfiles-setup.service" ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/anaconda.target.wants/*; - -COPY --from=tomcat /usr/local/tomcat /usr/local/tomcat -COPY --from=tomcat /opt/java /opt/java -COPY instrumentation/setup-tomcat.sh /opt/ -RUN bash /opt/setup-tomcat.sh - -ARG NODE_VERSION=v16 -COPY instrumentation/setup-express.sh /opt -RUN bash /opt/setup-express.sh - -COPY instrumentation/setup-dotnet.sh /opt -RUN if [ "$TARGETARCH" = "amd64" ]; then \ - apt-get update && \ - apt-get install -yq libicu63 && \ - bash /opt/setup-dotnet.sh; \ - fi - -RUN systemctl set-default multi-user.target -ENV init /lib/systemd/systemd - -VOLUME [ "/sys/fs/cgroup" ] - -ENTRYPOINT ["/lib/systemd/systemd"] diff --git a/packaging/tests/instrumentation/images/deb/Dockerfile.debian-stretch b/packaging/tests/instrumentation/images/deb/Dockerfile.debian-stretch deleted file mode 100644 index 0c6c048814..0000000000 --- a/packaging/tests/instrumentation/images/deb/Dockerfile.debian-stretch +++ /dev/null @@ -1,47 +0,0 @@ -# A debian image with systemd enabled. Must be run with: -# `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags -FROM tomcat:9-jre8 as tomcat - -FROM debian:stretch - -ARG TARGETARCH - -ENV DEBIAN_FRONTEND noninteractive - -RUN sed -i 's|http://.*.debian.org|http://archive.debian.org|' /etc/apt/sources.list -RUN sed -i '/stretch-updates/d' /etc/apt/sources.list - -RUN apt-get update &&\ - apt-get install -yq ca-certificates curl procps python3 systemd wget - -ENV container docker -RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \ - "systemd-tmpfiles-setup.service" ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/anaconda.target.wants/*; - -COPY --from=tomcat /usr/local/tomcat /usr/local/tomcat -COPY --from=tomcat /opt/java /opt/java -COPY instrumentation/setup-tomcat.sh /opt/ -RUN bash /opt/setup-tomcat.sh - -ARG NODE_VERSION=v14 -COPY instrumentation/setup-express.sh /opt -RUN bash /opt/setup-express.sh - -COPY instrumentation/setup-dotnet.sh /opt -RUN if [ "$TARGETARCH" = "amd64" ]; then \ - apt-get update && \ - apt-get install -yq libicu57 && \ - bash /opt/setup-dotnet.sh; \ - fi - -RUN systemctl set-default multi-user.target -ENV init /lib/systemd/systemd - -VOLUME [ "/sys/fs/cgroup" ] - -ENTRYPOINT ["/lib/systemd/systemd"] From 34ffda7040f188a997a5393cf2361e645e417cfa Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Tue, 14 Jan 2025 21:18:41 -0800 Subject: [PATCH 2/2] [chore] Upgrade CI workers for ansible tests (#5737) --- .github/workflows/ansible.yml | 10 ++++------ deployments/ansible/molecule/config/docker.yml | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml index b954673501..fc2d76aca5 100644 --- a/.github/workflows/ansible.yml +++ b/.github/workflows/ansible.yml @@ -36,8 +36,7 @@ jobs: lint: name: Lint - # Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Check out the codebase. uses: actions/checkout@v4 @@ -56,8 +55,8 @@ jobs: linux-test: name: Linux Test needs: lint - # Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved - runs-on: ubuntu-20.04 + # Use ubuntu-20.04.5 for containers with cgroups v1. Otherwise, use ubuntu-24.04 (cgroups v2). + runs-on: ${{ fromJSON('["ubuntu-24.04", "ubuntu-20.04"]')[contains(fromJSON('["amazonlinux2", "centos9", "opensuse12", "ubuntu1604"]'), matrix.distro)] }} strategy: fail-fast: false matrix: @@ -194,8 +193,7 @@ jobs: push-release-tag: name: Push Release Tag needs: lint - # Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: github.ref == 'refs/heads/main' steps: - name: Checkout diff --git a/deployments/ansible/molecule/config/docker.yml b/deployments/ansible/molecule/config/docker.yml index f7a8060cf0..f0bd6f090e 100644 --- a/deployments/ansible/molecule/config/docker.yml +++ b/deployments/ansible/molecule/config/docker.yml @@ -14,7 +14,7 @@ platforms: volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw privileged: true - cgroupns: host + cgroupns_mode: host pre_build_image: false provisioner: