Skip to content

fix(goconserver): the bootstrap scrub removes the cache the next package needs - #103

Merged
dhilst merged 2 commits into
xcat2:masterfrom
VersatusHPC:fix/goconserver-scrub-keeps-bootstrap-cache
Nov 9, 2026
Merged

dhilst merged 2 commits into
xcat2:masterfrom
VersatusHPC:fix/goconserver-scrub-keeps-bootstrap-cache

Conversation

@dhilst

@dhilst dhilst commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

goconserver reclaims its own build chroot with --scrub=chroot --scrub=bootstrap. The bootstrap scrub also removes the shared /var/cache/mock/<cfg>-bootstrap cache, and mock does not put it back. The next package in the run binds that cache into its own bootstrap and fails before it compiles anything:

/bin/mount -n -o bind /var/cache/mock/alma+epel-10-x86_64-bootstrap/yum_cache \
    /var/lib/mock/alma+epel-10-x86_64-bootstrap-<uniqueext>/root/var/cache/yum

mock exits 32. conserver-xcat builds immediately after goconserver, so the el10 dep build failed there after five packages had built, and the whole EL family failed with it. Only the el10 bootstrap is container based and binds that cache, which is why el8 and el9 finished the same run.

The three cache directories are recreated after the scrub. The scrub itself is unchanged: mock knows the order to unmount this build's bootstrap tree in, and removing it by hand is what propagates an unmount to the host

…age needs

goconserver reclaims its own build chroot with --scrub=chroot --scrub=bootstrap.
The bootstrap scrub also removes the shared /var/cache/mock/<cfg>-bootstrap
cache, and mock does not put it back. The next package in the run binds that
cache into its own bootstrap and fails before it compiles anything:

  /bin/mount -n -o bind /var/cache/mock/alma+epel-10-x86_64-bootstrap/yum_cache
      /var/lib/mock/alma+epel-10-x86_64-bootstrap-<uniqueext>/root/var/cache/yum

mock exits 32. conserver-xcat builds immediately after goconserver, so
xcat-dep-build-el10-x86_64 build 143 failed there after five packages had built,
and took the EL family with it. Only the el10 bootstrap is container based and
binds that cache, which is why el8 and el9 finished the same run.

The three cache directories are recreated after the scrub. The scrub itself is
left alone: mock knows the order to unmount this build's bootstrap tree in, and
removing it by hand is what propagates an unmount to the host.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
@dhilst
dhilst requested a review from viniciusferrao November 8, 2026 00:51
@dhilst dhilst self-assigned this Nov 8, 2026
mockbuild.pl recreates the bootstrap cache that mock --scrub=bootstrap removes,
and it built the path from a literal /var/cache/mock. goconserver-openeuler.t
runs the builder under unshare --user --map-root-user, which maps root but leaves
the host cache unwritable, so the builder died in make_path and 12 of 160
assertions failed with "mkdir /var/cache/mock/<cfg>-bootstrap: Permission denied".

The path moved into MockBuildUtils::mock_bootstrap_cache_dirs, which takes the
cache root from XCAT_MOCK_CACHE_ROOT and falls back to /var/cache/mock, so the
production default does not change. run_case points it at a directory of each
case's own, and the builder now writes nothing outside the test's temporary tree.

Each of the six configurations asserts all three directories are present after the
scrub. Removing the recreate loop from mockbuild.pl fails exactly those six and
nothing else, so the assertions measure the fix rather than the fixture.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>

@viniciusferrao viniciusferrao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@dhilst
dhilst merged commit 195665e into xcat2:master Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants