Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/go.opentelemetry.io/ot…
Browse files Browse the repository at this point in the history
…el/exporters/otlp/otlptrace/otlptracehttp-1.33.0
  • Loading branch information
jade-guiton-dd authored Jan 7, 2025
2 parents fd6e888 + 645806a commit 8ff958a
Show file tree
Hide file tree
Showing 109 changed files with 3,512 additions and 1,360 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,12 @@
/pkg/util/crio/ @DataDog/container-integrations
/pkg/util/docker/ @DataDog/container-integrations
/pkg/util/ecs/ @DataDog/container-integrations
/pkg/util/encoding/ @DataDog/ebpf-platform
/pkg/util/funcs/ @DataDog/ebpf-platform
/pkg/util/gpu/ @DataDog/container-platform
/pkg/util/kernel/ @DataDog/ebpf-platform
/pkg/util/safeelf/ @DataDog/ebpf-platform
/pkg/util/slices/ @DataDog/ebpf-platform
/pkg/util/ktime @DataDog/agent-security
/pkg/util/kubernetes/ @DataDog/container-integrations @DataDog/container-platform @DataDog/container-app
/pkg/util/podman/ @DataDog/container-integrations
Expand Down
23 changes: 23 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1186,3 +1186,26 @@ workflow:
- test/new-e2e/tests/gpu/**/*
- pkg/collector/corechecks/gpu/**/*
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916

# windows_docker_2022 configures the job to use the Windows Server 2022 runners.
# Use in jobs that need to run on Windows Server 2022 runners.
.windows_docker_2022:
tags: ["runner:windows-docker", "windowsversion:2022"]
variables:
# Full image name for Agent windows build image, for use in docker run command
WINBUILDIMAGE: registry.ddbuild.io/ci/datadog-agent-buildimages/windows_ltsc2022_${ARCH}${DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${DATADOG_AGENT_WINBUILDIMAGES}

# windows_docker_2019 configures the job to use the Windows Server 2019 runners.
# Use in jobs that need to run on Windows Server 2019 runners.
.windows_docker_2019:
tags: ["runner:windows-docker", "windowsversion:1809"]
variables:
# Full image name for Agent windows build image, for use in docker run command
WINBUILDIMAGE: registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${DATADOG_AGENT_WINBUILDIMAGES}

# windows_docker_default configures the job to use the default Windows Server runners
# Use in jobs that may need to have their version updated in the future.
#
# Current default: Windows Server 2019
.windows_docker_default:
extends: .windows_docker_2019
4 changes: 2 additions & 2 deletions .gitlab/binary_build/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build_windows_container_entrypoint:
- !reference [.except_mergequeue]
- when: on_success
stage: binary_build
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
needs: ["lint_windows-x64"]
variables:
ARCH: "x64"
Expand All @@ -23,7 +23,7 @@ build_windows_container_entrypoint:
-e WINDOWS_BUILDER=true
-e AWS_NETWORKING=true
-e TARGET_ARCH="$ARCH"
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
c:\mnt\Dockerfiles\agent\windows\entrypoint\build.bat
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem build-out\${CI_JOB_ID}
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/choco_build/choco_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
rules:
!reference [.on_deploy_stable_or_beta_repo_branch]
stage: choco_and_install_script_build
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
variables:
ARCH: "x64"
script:
Expand All @@ -21,7 +21,7 @@
-e CI_PIPELINE_ID=${CI_PIPELINE_ID}
-e BUCKET_BRANCH="$BUCKET_BRANCH"
-e AWS_NETWORKING=true
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
powershell.exe -C "C:\mnt\tasks\winbuildscripts\Generate-Chocolatey-Package.ps1 -MSIDirectory c:\mnt\omnibus\pkg -Flavor $FLAVOR -InstallDeps 1"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- $CopyNupkgToS3 = "$S3_CP_CMD --recursive --exclude '*' --include '*.nupkg' build-out $S3_RELEASE_ARTIFACTS_URI/choco/nupkg"
Expand Down
20 changes: 10 additions & 10 deletions .gitlab/container_build/docker_windows_agent7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
docker_build_agent7_windows1809:
extends:
- .docker_build_agent7_windows_common
tags: ["runner:windows-docker", "windowsversion:1809"]
- .windows_docker_2019
variables:
VARIANT: 1809
TAG_SUFFIX: -7
Expand All @@ -11,7 +11,7 @@ docker_build_agent7_windows1809:
docker_build_agent7_windows1809_jmx:
extends:
- .docker_build_agent7_windows_common
tags: ["runner:windows-docker", "windowsversion:1809"]
- .windows_docker_2019
variables:
VARIANT: 1809
TAG_SUFFIX: -7-jmx
Expand All @@ -20,7 +20,7 @@ docker_build_agent7_windows1809_jmx:
docker_build_agent7_windows2022_jmx:
extends:
- .docker_build_agent7_windows_common
tags: ["runner:windows-docker", "windowsversion:2022"]
- .windows_docker_2022
variables:
VARIANT: ltsc2022
TAG_SUFFIX: -7-jmx
Expand All @@ -29,7 +29,7 @@ docker_build_agent7_windows2022_jmx:
docker_build_agent7_windows2022:
extends:
- .docker_build_agent7_windows_common
tags: ["runner:windows-docker", "windowsversion:2022"]
- .windows_docker_2022
variables:
VARIANT: ltsc2022
TAG_SUFFIX: "-7"
Expand All @@ -38,7 +38,7 @@ docker_build_agent7_windows2022:
docker_build_agent7_windows1809_core:
extends:
- .docker_build_agent7_windows_servercore_common
tags: ["runner:windows-docker", "windowsversion:1809"]
- .windows_docker_2019
variables:
VARIANT: 1809
TAG_SUFFIX: -7
Expand All @@ -47,7 +47,7 @@ docker_build_agent7_windows1809_core:
docker_build_agent7_windows1809_core_jmx:
extends:
- .docker_build_agent7_windows_servercore_common
tags: ["runner:windows-docker", "windowsversion:1809"]
- .windows_docker_2019
variables:
VARIANT: 1809
TAG_SUFFIX: -7-jmx
Expand All @@ -56,7 +56,7 @@ docker_build_agent7_windows1809_core_jmx:
docker_build_agent7_windows2022_core:
extends:
- .docker_build_agent7_windows_servercore_common
tags: ["runner:windows-docker", "windowsversion:2022"]
- .windows_docker_2022
variables:
VARIANT: ltsc2022
TAG_SUFFIX: "-7"
Expand All @@ -65,7 +65,7 @@ docker_build_agent7_windows2022_core:
docker_build_agent7_windows2022_core_jmx:
extends:
- .docker_build_agent7_windows_servercore_common
tags: ["runner:windows-docker", "windowsversion:2022"]
- .windows_docker_2022
variables:
VARIANT: ltsc2022
TAG_SUFFIX: -7-jmx
Expand All @@ -74,7 +74,7 @@ docker_build_agent7_windows2022_core_jmx:
docker_build_fips_agent7_windows2022_core:
extends:
- .docker_build_fips_agent7_windows_servercore_common
tags: ["runner:windows-docker", "windowsversion:2022"]
- .windows_docker_2022
variables:
VARIANT: ltsc2022
TAG_SUFFIX: "-7-fips"
Expand All @@ -83,7 +83,7 @@ docker_build_fips_agent7_windows2022_core:
docker_build_fips_agent7_windows2022_core_jmx:
extends:
- .docker_build_fips_agent7_windows_servercore_common
tags: ["runner:windows-docker", "windowsversion:2022"]
- .windows_docker_2022
variables:
VARIANT: ltsc2022
TAG_SUFFIX: -7-fips-jmx
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/deploy_packages/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish_winget_7_x64:
dependencies: []
rules: !reference [.on_deploy_stable_or_beta_repo_branch_manual]
stage: deploy_packages
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
variables:
ARCH: "x64"
before_script:
Expand All @@ -23,7 +23,7 @@ publish_winget_7_x64:
-v "$(Get-Location):c:\mnt"
-e WINGET_GITHUB_ACCESS_TOKEN=${wingetPat}
-e GENERAL_ARTIFACTS_CACHE_BUCKET_URL=${GENERAL_ARTIFACTS_CACHE_BUCKET_URL}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
Powershell
-C "C:\mnt\tasks\winbuildscripts\Update-Winget.ps1"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
2 changes: 1 addition & 1 deletion .gitlab/e2e/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ new-e2e-gpu:
variables:
TARGETS: ./tests/gpu # the target path where tests are
TEAM: ebpf-platform
E2E_PULUMI_LOG_LEVEL: 8 # incident-33572
E2E_PULUMI_LOG_LEVEL: 10 # incident-33572
needs: # list of required jobs. By default gitlab waits for any previous jobs.
- !reference [.needs_new_e2e_template]
- deploy_deb_testing-a7_x64 # agent 7 debian package
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/integration_test/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- !reference [.except_mergequeue]
- when: on_success
needs: ["go_deps", "go_tools_deps"]
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
before_script:
- $tmpfile = [System.IO.Path]::GetTempFileName()
- (& "$CI_PROJECT_DIR\tools\ci\fetch_secret.ps1" -parameterName "$Env:VCPKG_BLOB_SAS_URL" -tempFile "$tmpfile")
Expand All @@ -29,7 +29,7 @@
-e GOMODCACHE="c:\modcache"
-e VCPKG_BINARY_SOURCES="clear;x-azblob,${vcpkgBlobSaSUrl}"
-e PIP_INDEX_URL=${PIP_INDEX_URL}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
powershell.exe -c "c:\mnt\tasks\winbuildscripts\Invoke-IntegrationTests.ps1 -BuildOutOfSource 1 -CheckGoVersion 1 -InstallDeps 1"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }

Expand Down
4 changes: 2 additions & 2 deletions .gitlab/lint/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.lint_windows_base:
stage: lint
needs: ["go_deps", "go_tools_deps"]
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
script:
- $ErrorActionPreference = "Stop"
- '$_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content ; Write-Host "Running on instance $($_instance_id)"'
Expand All @@ -20,7 +20,7 @@
-e CI_PIPELINE_ID=${CI_PIPELINE_ID}
-e CI_PROJECT_NAME=${CI_PROJECT_NAME}
-e GOMODCACHE="c:\modcache"
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:$Env:DATADOG_AGENT_WINBUILDIMAGES
${WINBUILDIMAGE}
powershell.exe -c "c:\mnt\tasks\winbuildscripts\Invoke-Linters.ps1 -BuildOutOfSource 1 -CheckGoVersion 1 -InstallDeps 1"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }

Expand Down
4 changes: 2 additions & 2 deletions .gitlab/package_build/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ installer-arm64-oci:

windows-installer-amd64:
stage: package_build
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
needs: ["go_mod_tidy_check", "go_deps"]
rules:
- !reference [.except_mergequeue]
Expand Down Expand Up @@ -222,7 +222,7 @@ windows-installer-amd64:
-e S3_OMNIBUS_CACHE_BUCKET="$S3_OMNIBUS_CACHE_BUCKET"
-e USE_S3_CACHING="$USE_S3_CACHING"
-e API_KEY_ORG2=${API_KEY_ORG2}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
powershell -C "c:\mnt\tasks\winbuildscripts\Build-InstallerPackages.ps1 -BuildOutOfSource 1 -InstallDeps 1 -CheckGoVersion 1"
after_script:
- '$_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content ; Write-Host "Running on instance $($_instance_id)"'
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/package_build/windows.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
.windows_msi_base:
stage: package_build
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
needs: ["go_mod_tidy_check", "go_deps"]
script:
- $ErrorActionPreference = 'Stop'
Expand Down Expand Up @@ -38,7 +38,7 @@
-e API_KEY_ORG2=${API_KEY_ORG2}
-e OMNIBUS_GIT_CACHE_DIR=${Env:TEMP}/${CI_PIPELINE_ID}/omnibus-git-cache
-e AGENT_FLAVOR=${AGENT_FLAVOR}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
powershell -C "c:\mnt\tasks\winbuildscripts\Build-AgentPackages.ps1 -BuildOutOfSource 1 -InstallDeps 1 -CheckGoVersion 1"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem omnibus\pkg
Expand Down Expand Up @@ -85,7 +85,7 @@ windows_zip_agent_binaries_x64-a7:
rules:
- !reference [.except_mergequeue]
- when: on_success
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
needs: ["go_mod_tidy_check", "go_deps"]
variables:
ARCH: "x64"
Expand Down Expand Up @@ -121,7 +121,7 @@ windows_zip_agent_binaries_x64-a7:
-e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG}
-e PIP_INDEX_URL=${PIP_INDEX_URL}
-e API_KEY_ORG2=${API_KEY_ORG2}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
powershell -C "c:\mnt\tasks\winbuildscripts\Build-OmnibusTarget.ps1 -BuildOutOfSource 1 -InstallDeps 1 -CheckGoVersion 1"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem omnibus\pkg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
powershell_script_signing:
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
stage: choco_and_install_script_build
needs: []
variables:
Expand All @@ -12,5 +12,5 @@ powershell_script_signing:
- $WINDOWS_POWERSHELL_DIR
script:
- mkdir $WINDOWS_POWERSHELL_DIR
- docker run --rm -v "$(Get-Location):c:\mnt" -e AWS_NETWORKING=true -e IS_AWS_CONTAINER=true registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES} powershell -C "dd-wcs sign \mnt\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1"
- docker run --rm -v "$(Get-Location):c:\mnt" -e AWS_NETWORKING=true -e IS_AWS_CONTAINER=true ${WINBUILDIMAGE} powershell -C "dd-wcs sign \mnt\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1"
- copy .\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1 $WINDOWS_POWERSHELL_DIR\Install-Datadog.ps1
12 changes: 6 additions & 6 deletions .gitlab/source_test/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- !reference [.except_disable_unit_tests]
- !reference [.fast_on_dev_branch_only]
needs: ["go_deps", "go_tools_deps"]
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
script:
- $ErrorActionPreference = "Stop"
- '$_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content ; Write-Host "Running on instance $($_instance_id)"'
Expand Down Expand Up @@ -43,7 +43,7 @@
-e CODECOV_TOKEN="${CODECOV_TOKEN}"
-e S3_PERMANENT_ARTIFACTS_URI="${S3_PERMANENT_ARTIFACTS_URI}"
-e COVERAGE_CACHE_FLAG="${COVERAGE_CACHE_FLAG}"
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
powershell.exe -c "c:\mnt\tasks\winbuildscripts\Invoke-UnitTests.ps1 -BuildOutOfSource 1 -CheckGoVersion 1 -InstallDeps 1 -UploadCoverage 1 -UploadTestResults 1"
- If ($lastExitCode -ne "0") { exit "$lastExitCode" }
variables:
Expand All @@ -65,7 +65,7 @@ tests_windows-x64:
.tests_windows_sysprobe:
stage: source_test
needs: ["go_deps", "go_tools_deps"]
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
script:
- $ErrorActionPreference = "Stop"
- '$_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content ; Write-Host "Running on instance $($_instance_id)"'
Expand All @@ -79,7 +79,7 @@ tests_windows-x64:
-e SIGN_WINDOWS_DD_WCS=true
-e GOMODCACHE="c:\modcache"
-e PIP_INDEX_URL=${PIP_INDEX_URL}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
c:\mnt\tasks\winbuildscripts\sysprobe.bat
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
artifacts:
Expand All @@ -90,7 +90,7 @@ tests_windows-x64:
.tests_windows_secagent:
stage: source_test
needs: ["go_deps", "go_tools_deps"]
tags: ["runner:windows-docker", "windowsversion:1809"]
extends: .windows_docker_default
script:
- $ErrorActionPreference = "Stop"
- '$_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content ; Write-Host "Running on instance $($_instance_id)"'
Expand All @@ -104,7 +104,7 @@ tests_windows-x64:
-e SIGN_WINDOWS_DD_WCS=true
-e GOMODCACHE="c:\modcache"
-e PIP_INDEX_URL=${PIP_INDEX_URL}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
${WINBUILDIMAGE}
c:\mnt\tasks\winbuildscripts\secagent.bat
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
artifacts:
Expand Down
18 changes: 16 additions & 2 deletions Dockerfiles/agent/cont-init.d/60-sysprobe-check.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
#!/bin/bash

if grep -Eq '^ *enable_tcp_queue_length *: *true' /etc/datadog-agent/system-probe.yaml || [[ "$DD_SYSTEM_PROBE_CONFIG_ENABLE_TCP_QUEUE_LENGTH" == "true" ]]; then
sysprobe_cfg="/etc/datadog-agent/system-probe.yaml"

if grep -Eq '^ *enable_tcp_queue_length *: *true' $sysprobe_cfg || [[ "$DD_SYSTEM_PROBE_CONFIG_ENABLE_TCP_QUEUE_LENGTH" == "true" ]]; then
if [ -f /etc/datadog-agent/conf.d/tcp_queue_length.d/conf.yaml.example ]; then
mv /etc/datadog-agent/conf.d/tcp_queue_length.d/conf.yaml.example \
/etc/datadog-agent/conf.d/tcp_queue_length.d/conf.yaml.default
fi
fi

if grep -Eq '^ *enable_oom_kill *: *true' /etc/datadog-agent/system-probe.yaml || [[ "$DD_SYSTEM_PROBE_CONFIG_ENABLE_OOM_KILL" == "true" ]]; then
if grep -Eq '^ *enable_oom_kill *: *true' $sysprobe_cfg || [[ "$DD_SYSTEM_PROBE_CONFIG_ENABLE_OOM_KILL" == "true" ]]; then
if [ -f /etc/datadog-agent/conf.d/oom_kill.d/conf.yaml.example ]; then
mv /etc/datadog-agent/conf.d/oom_kill.d/conf.yaml.example \
/etc/datadog-agent/conf.d/oom_kill.d/conf.yaml.default
fi
fi

# Match the key gpu_monitoring.enabled: true using Python's YAML parser, which is included in the base image
# and is more robust than using regexes.
gpu_monitoring_enabled=$(python3 -c "import yaml, sys; data=yaml.safe_load(sys.stdin); print(bool(data.get('gpu_monitoring', {}).get('enabled')))" < $sysprobe_cfg)

# Note gpu_monitoring_enabled is a Python boolean, so casing is important
if [[ "$gpu_monitoring_enabled" == "True" ]] || [[ "$DD_GPU_MONITORING_ENABLED" == "true" ]]; then
if [ -f /etc/datadog-agent/conf.d/gpu.d/conf.yaml.example ]; then
mv /etc/datadog-agent/conf.d/gpu.d/conf.yaml.example \
/etc/datadog-agent/conf.d/gpu.d/conf.yaml.default
fi
fi
2 changes: 1 addition & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ core,github.com/containerd/containerd/api/services/tasks/v1,Apache-2.0,"Copyrigh
core,github.com/containerd/containerd/api/services/transfer/v1,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/api/services/version/v1,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/api/types,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/api/types/runc/options,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/api/types/task,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/api/types/transfer,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/archive,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
Expand Down Expand Up @@ -833,7 +834,6 @@ core,github.com/containerd/containerd/remotes/errors,Apache-2.0,"Copyright 2012-
core,github.com/containerd/containerd/rootfs,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/runtime/linux/runctypes,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/runtime/restart,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/runtime/v2/runc/options,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/sandbox,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/sandbox/proxy,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
core,github.com/containerd/containerd/services,Apache-2.0,"Copyright 2012-2015 Docker, Inc."
Expand Down
Loading

0 comments on commit 8ff958a

Please sign in to comment.