Skip to content

Commit

Permalink
add bpftrace for CI debugging
Browse files Browse the repository at this point in the history
I like to run a bpftrace based program in CI to collect better logs for
specific processes not observed in the normal testing such as the podman
container cleanup command.

Given you need to have full privs to run ebpf and the package pulls in
an entire toolchain which is almost 500MB in install size we do not add
it the the container images to not bloat them without reason.

containers/podman#23487

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Aug 5, 2024
1 parent 798e83d commit 5d99e6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cache_images/debian_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ INSTALL_PACKAGES=(\
zstd
)

# bpftrace is only needed on the host as containers cannot run ebpf
# programs anyway and it is very big so we should not bloat the container
# images unnecessarily.
if ! ((CONTAINER)); then
INSTALL_PACKAGES+=( \
bpftrace
)
fi

msg "Installing general build/testing dependencies"
bigto $SUDO apt-get -q -y install "${INSTALL_PACKAGES[@]}"

Expand Down
4 changes: 4 additions & 0 deletions cache_images/fedora_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,12 @@ fi

# When installing during a container-build, having this present
# will seriously screw up future dnf operations in very non-obvious ways.
# bpftrace is only needed on the host as containers cannot run ebpf
# programs anyway and it is very big so we should not bloat the container
# images unnecessarily.
if ! ((CONTAINER)); then
INSTALL_PACKAGES+=( \
bpftrace
container-selinux
libguestfs-tools
selinux-policy-devel
Expand Down

0 comments on commit 5d99e6a

Please sign in to comment.