Clean up self-hosted lifecycle harness runs

This commit is contained in:
2026-04-14 19:37:18 +02:00
parent 808c280232
commit 97b484b9dd
3 changed files with 22 additions and 9 deletions
+1
View File
@@ -464,6 +464,7 @@ experiments."
(file "/usr/sbin/syslogd" "usr/sbin/syslogd")
(file "/usr/sbin/utx" "usr/sbin/utx")
(file "/usr/bin/id" "usr/bin/id")
(file "/usr/bin/what" "usr/bin/what")
(file "/sbin/kldload" "sbin/kldload")
(file "/sbin/kldstat" "sbin/kldstat")
(file "/sbin/devfs" "sbin/devfs")
@@ -457,10 +457,13 @@ echo "self-hosted XCP-ng guest is ready"
echo " guest_ip=$guest_ip"
echo " vm_id=$vm_id"
echo " vdi_id=$vdi_id"
echo " current_os_file=$current_os_file"
echo " candidate_os_file=$candidate_os_file"
echo " metadata_file=$metadata_file"
if [ "$boot_only" -eq 0 ]; then
echo " lifecycle_out=$lifecycle_out"
if [ "$cleanup" -eq 1 ]; then
echo " workdir=cleaned (set KEEP_WORKDIR=1 or WORKDIR=... to retain $workdir)"
else
echo " current_os_file=$current_os_file"
echo " candidate_os_file=$candidate_os_file"
echo " metadata_file=$metadata_file"
if [ "$boot_only" -eq 0 ]; then
echo " lifecycle_out=$lifecycle_out"
fi
fi
trap - EXIT
+12 -3
View File
@@ -144,8 +144,14 @@ show_status_summary() {
}
tmpdir=$(mktemp -d /tmp/fruix-self-hosted-node-lifecycle.XXXXXX)
cleanup_tmpdir=1
if [ "${KEEP_WORKDIR:-0}" -eq 1 ]; then
cleanup_tmpdir=0
fi
cleanup() {
rm -rf "$tmpdir"
if [ "$cleanup_tmpdir" -eq 1 ]; then
rm -rf "$tmpdir"
fi
}
trap cleanup EXIT
@@ -260,5 +266,8 @@ fi
echo
echo "self-hosted node lifecycle validation completed"
echo "artifacts: $tmpdir"
trap - EXIT
if [ "$cleanup_tmpdir" -eq 1 ]; then
echo "artifacts: cleaned (set KEEP_WORKDIR=1 to retain $tmpdir)"
else
echo "artifacts: $tmpdir"
fi