2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 04:26:25 +00:00

fix(goconserver): scrub the bootstrap chroot too, not just the chroot

goconserver always compiles in the el10 chroot for the arch (el8/el9 ship a Go
too old for 0.3.3), so mockbuild-all's post-build scrub -- which keys on the target
cfg (el8/el9) -- cannot reach it, and goconserver self-scrubs its el10 build chroot.
But it ran only 'mock --scrub=chroot', leaving the ~190 MiB bootstrap-image tree
'<cfg>-bootstrap-<uniqueext>' behind. One survived per target per run and piled up in
/var/lib/mock -- part of the disk leak that filled the x86 build host to 99% and
flaked a build (VersatusHPC/xcat-core#51). Add '--scrub=bootstrap' so goconserver
reclaims its whole chroot, matching mockbuild-all's scrub_buildroot.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-08-11 22:45:38 -03:00
parent a5432f28ef
commit 9d32988ae2
+4 -1
View File
@@ -282,8 +282,11 @@ for my $log (qw(build.log root.log state.log)) {
# Reclaim goconserver's own build chroot. mockbuild-all's scrub keys on the TARGET cfg (el$rel), not
# the el10 build cfg used here, so scrub it ourselves to avoid leaking /var/lib/mock. Best-effort.
# Scrub BOTH the chroot and its bootstrap: the el10 build cfg is bootstrap-image based, so
# --scrub=chroot alone leaves the ~190 MiB <cfg>-bootstrap-<uniqueext> tree behind (it accumulated
# one per target per run in /var/lib/mock -- the disk leak of VersatusHPC/xcat-core#51).
system("mock -r " . sh_quote($build_cfg) . $mock_uniqueext_opt .
" --scrub=chroot >" . sh_quote("$log_dir/mock-scrub.log") . " 2>&1");
" --scrub=chroot --scrub=bootstrap >" . sh_quote("$log_dir/mock-scrub.log") . " 2>&1");
if (!$skip_install) {
print_step("Install and smoke test");