Skip to content

Commit

Permalink
CI: run and collect cleanup tracer logs
Browse files Browse the repository at this point in the history
In order to get better debug data for the nasty cleanup flakes.
Just a WIP for now to see if this even works, the install should be
moved into the images if it does work.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Aug 2, 2024
1 parent 849b217 commit f8a2000
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ bindings_task:
server_log_artifacts:
path: ./podman-server.log
type: text/plain
cleanup_tracer_artifacts:
path: ./podman-cleanup-tracer.log
type: text/plain
df_script: '$SCRIPT_BASE/logcollector.sh df'
audit_log_script: '$SCRIPT_BASE/logcollector.sh audit'
journal_script: '$SCRIPT_BASE/logcollector.sh journal'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ contrib/win-installer/shasums
contrib/win-installer/*.wixobj
contrib/win-installer/*.wixpdb
contrib/win-installer/*.log
podman-cleanup-tracer.log
8 changes: 8 additions & 0 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,13 @@ msg "************************************************************"
((${SETUP_ENVIRONMENT:-0})) || \
die "Expecting setup_environment.sh to have completed successfully"

if [[ "$UID" -eq 0 ]]; then
# start ebpf cleanup tracer, just some temporary hack for now to see if this even works
msg "start ebpf cleanup tracer"
bpftrace $GOSRC/hack/podman_cleanup_tracer.bt &> $GOSRC/podman-cleanup-tracer.log </dev/null &
TRACER_PID=$!
fi

# shellcheck disable=SC2154
if [[ "$PRIV_NAME" == "rootless" ]] && [[ "$UID" -eq 0 ]]; then
# Remove /var/lib/cni, it is not required for rootless cni.
Expand Down Expand Up @@ -550,3 +557,4 @@ fi
showrun $handler

showrun echo "finished"
kill "$TRACER_PID" || true
4 changes: 4 additions & 0 deletions contrib/cirrus/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ fi
case "$OS_RELEASE_ID" in
debian)
showrun echo "No-op conditional setup for debian"
showrun apt update
showrun apt install -y bpftrace
;;
fedora)
showrun echo "conditional setup for fedora"
Expand All @@ -148,6 +150,8 @@ case "$OS_RELEASE_ID" in
showrun setsebool container_manage_cgroup true
fi

showrun dnf install -y bpftrace

# Test nftables driver, https://fedoraproject.org/wiki/Changes/NetavarkNftablesDefault
# We can drop this once this implemented and pushed into fedora stable. We cannot test it on
# debian because the netavark version there is way to old for nftables support.
Expand Down

0 comments on commit f8a2000

Please sign in to comment.