OOM Kill: documentation using not required Docker Mounts when kernel has BPF built in

Open Beginner friendly
#24,068 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker, linux
Domain
documentation

Research direction

Search the OOM Kill integration's Docker configuration documentation for the /lib/modules and /usr/src mounts. Read the surrounding setup instructions, then update the requirement to reflect kernels with BPF/BTF built in; done means the documentation no longer presents those mounts as unconditionally required.

Written by the indexing model from the issue text.

Description

oss/0 pending team/container-integrations

Summary

The OOM Kill integration's Docker configuration documentation instructs users to mount /lib/modules and /usr/src into the Agent container:

-v /lib/modules:/lib/modules
-v /usr/src:/usr/src

When the Linux kernel has BPF compiled in (i.e., the kernel ships with BTF support, as is the often the case with kernels 5.8+) datadog-agent does not require access to /usr/src or /lib/modules.

Steps to reproduce

Run the Agent with /lib/modules and /usr/src omitted on a kernel with BPF built in:

docker run \
  --name datadog-agent \
  --cap-add CAP_BPF \
  --cap-add CAP_PERFMON \
  -v /sys/kernel/debug:/sys/kernel/debug \
  -e DD_API_KEY=<DD_API_KEY> \
  -e DD_HOSTNAME=test-oom-kill \
  -e DD_SYSTEM_PROBE_ENABLED=true \
  -e DD_SYSTEM_PROBE_CONFIG_ENABLE_OOM_KILL=true \
  public.ecr.aws/datadog/agent:latest

Expected behavior

Documentation should note that /lib/modules and /usr/src mounts are only required on kernels that do not have BPF compiled in.

Actual behavior

Documentation unconditionally lists /lib/modules and /usr/src as required mounts, causing unnecessary host filesystem exposure.

Environment

  • Kernel: 5.8+ with BTF/BPF built in
  • Docker: version 25.0.14, build 0bab007
Dominant language
Python
Stars
1.1k
Forks
1.6k
Avg merge
2d 3h
Merged PRs (30d)
196

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/integrations-core

All issues in DataDog/integrations-core

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.