Skip to content

github: fix the unit test workflow on the self-hosted runner - #13

Closed
uw-sc wants to merge 1 commit into
squid-19.2.6-cobaltcore-storagefrom
fix/build-error
Closed

uw-sc wants to merge 1 commit into
squid-19.2.6-cobaltcore-storagefrom
fix/build-error

Conversation

@uw-sc

@uw-sc uw-sc commented Sep 18, 2026 •

Copy link
Copy Markdown

Problem

The unit test workflow has not completed its build step on centos01 since 2026-09-11. Two independent
defects are involved.

1. The build container image silently lost the prebuilt Boost

All four attempts of the run for backport/570 (run 34588947862, 2026-09-11 … 09-14) died in
"Build container image and compile tests" with "The self-hosted runner lost communication with the
server"
— no error, no finalized log.

  • build-with-container.py -e build-container runs podman build --pull (pull policy always) against the
    floating docker.io/ubuntu:22.04 tag. Ubuntu refreshed that tag on 2026-09-03, so the next run
    (2026-09-11) rebuilt the image and re-ran install-deps.sh.
  • install-deps.sh installs the prebuilt ceph-libboost 1.82 packages into /opt/ceph via
    shaman.ceph.com. shaman's libboost index is gone (HTTP 504 / empty search result — also for upstream
    main's build), and the script swallows the failure
    (|| ci_debug "ceph-libboost package unavailable, you can build the submodule").
  • Result: an image without /opt/ceph; cmake falls back to -DBOOST_J=… and builds Boost from source,
    ~2 000 ninja edges block behind a 120 MB download, and the podman cache reuses that degraded image for
    every following run. The last run that passed this step (2026-07-09) still had the prebuilt Boost;
    toolchain and dashboard build were otherwise identical.

Change:

  1. Build a jammy base pinned by digest (ubuntu:22.04 multi-arch index of 2026-09-03) with the 17
    ceph-libboost-*1.82-dev packages installed directly from the chacra repo that shaman used to hand out.
    install-deps.sh then sees installed_ver=1.82, returns early and never contacts shaman.
  2. Build Dockerfile.build on top of it without --pull, tagged ceph-build:cobaltcore.
  3. Hard gate: podman run … test -f /opt/ceph/include/boost/config.hpp — a degraded image now fails the
    job instead of silently changing the build.
  4. configure / buildtests / ctest run with --tag cobaltcore -I cache, so build-with-container.py uses
    that image and never pulls or rebuilds it.

Nothing is pushed to any registry; both images stay in the runner's local podman storage. The repository's
build scripts are untouched (still identical to upstream/squid).

2. A leftover container blocked every following run

build-with-container.py runs every container as podman run --name=ceph_build (hard-coded, no option)
and relies on --rm for cleanup. The build step of run 34588947862 was killed before its container exited,
so the name stayed taken and every later run — including the first runs of this PR — failed with

Error: creating container storage: the container name "ceph_build" is already in use by 3b48b8bb7530...

Change: remove such a leftover in "Clean Workspace", where the workspace is reset anyway, and log
podman inspect first, so the state of the killed container (status, start/finish time, exit code, OOM
flag) ends up in the job log before it is deleted. That output is also the first direct evidence about how
the 2026-09-14 job died.

Verification

Locally, from an empty podman store:

  • Image step executed verbatim (extracted from the YAML): exit 0, installed_ver=1.82 ×2, zero shaman /
    "package unavailable" lines, gate BOOST_OK, 37 packages, BOOST_LIB_VERSION "1_82".
  • -e configure with -I cache: Container image ceph-build:cobaltcore present; cmake line
    -DWITH_SYSTEM_BOOST=ON -DBOOST_ROOT=/opt/ceph; Found Boost: /opt/ceph/lib/x86_64-linux-gnu/cmake/Boost-1.82.0/BoostConfig.cmake — identical to the last good runs.
  • A Boost-dependent TU (mon/MonMap.cc.o) compiles with -isystem /opt/ceph/include.
  • The cleanup block detects and removes a stale ceph_build container.

On the runner (runs 35317584220 / 35323621802, before the cleanup fix): the image step succeeded —
4 m 35 s cold, gate passed, -I cache resolved ceph-build:cobaltcore. Both runs then failed at the
ceph_build name collision, which is what section 2 fixes.

What to expect from the next run

  • Image step ~1 s (layer cache); ::warning::removing leftover ceph_build container plus the podman inspect line on the first run after the fix.
  • The build then reaches src/mon/MonClient.h:62 and fails there
    (-Wdefaulted-function-deleted; upstream fix b09d0aa64d6, handled separately). Reaching that point is
    the success criterion for this PR.
  • podman rmi ceph-build:HEAD.ubuntu22.04 on the runner frees the now-unused old image.

Follow-ups (separate)

  • The runner's death mechanism (memory / disk / agent) is still unproven; the podman inspect line above
    plus the runner's _diag logs should settle it. A --memory/--memory-swap ceiling and
    timeout-minutes for the build container are the next workflow-only hardening.
  • The same commit applies cleanly to squid-19.2.4-cobaltcore-storage (identical workflow) if wanted.

🤖 Generated with Claude Code

Two defects kept the workflow from getting past its build step on the
self-hosted runner.

1) The build container image silently lost the prebuilt Boost

The workflow let build-with-container.py build its own image
(-e build-container), which runs `podman build --pull` (pull policy
"always") against the floating docker.io/ubuntu:22.04 tag. Every refresh
of that tag rebuilds the image and re-runs install-deps.sh, which installs
the prebuilt ceph-libboost 1.82 packages into /opt/ceph via
shaman.ceph.com and swallows a failure ("ceph-libboost package
unavailable, you can build the submodule").

shaman's libboost index is gone (HTTP 504, empty search result), so the
image rebuilt on 2026-09-11 came out without /opt/ceph, cmake fell back to
-DBOOST_J and building Boost from source, and every later run reused that
degraded image from the podman cache. All four attempts of run 34588947862
died in the build step; the last run that passed it (2026-07-09) still had
the prebuilt Boost.

Build the image in the workflow instead:

* a jammy base pinned by digest (ubuntu:22.04 index of 2026-09-03) with
  the ceph-libboost 1.82 packages installed straight from the chacra repo
  that shaman used to resolve; install-deps.sh then sees
  installed_ver=1.82, returns early and never contacts shaman
* Dockerfile.build on top of that base without --pull, tagged
  ceph-build:cobaltcore
* a hard check that /opt/ceph/include/boost/config.hpp exists, so a
  degraded image fails the job instead of changing the build silently
* configure, buildtests and ctest run with `--tag cobaltcore -I cache`, so
  build-with-container.py uses that image and never pulls or rebuilds it

Nothing is pushed to any registry; both images stay in the runner's local
podman storage. The repository's build scripts are unchanged.

2) A leftover container blocked every following run

build-with-container.py runs every container as `podman run
--name=ceph_build` (hard-coded) and relies on --rm for cleanup. The build
step of run 34588947862 was killed before its container exited, so the
name stayed taken and every later run failed with

  Error: creating container storage: the container name "ceph_build" is
  already in use by 3b48b8bb7530...

Remove such a leftover in "Clean Workspace", where the workspace is reset
anyway, and log `podman inspect` first so the state of the killed
container (status, start/finish time, exit code, OOM flag) ends up in the
job log before it is deleted.

Verified locally from an empty podman store: the image step builds with no
shaman contact, configure produces -DWITH_SYSTEM_BOOST=ON
-DBOOST_ROOT=/opt/ceph and finds Boost 1.82 under /opt/ceph, a
Boost-dependent translation unit compiles with -isystem /opt/ceph/include,
and the cleanup block removes a stale ceph_build container.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
On-behalf-of: SAP <[email protected]>
Signed-off-by: Uwe Schwaeke <[email protected]>
@uw-sc uw-sc changed the title github: build the CI image with the prebuilt Boost from chacra github: fix the unit test workflow on the self-hosted runner Sep 18, 2026
@uw-sc uw-sc closed this Sep 21, 2026
@uw-sc

uw-sc commented Sep 21, 2026

Copy link
Copy Markdown
Author

wrong way of fixing the pre existing build errors

@uw-sc
uw-sc deleted the fix/build-error branch September 21, 2026 09:18
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.

1 participant