ZT_CONTROLLER=1 on a box with libpq present but unconfigured compiles clean and silently falls back, so a successful build proves nothing. This adds the embedded controller as a buildable artifact and the check that would have caught that failure. ZT_CONTROLLER_NO_SQL=1 gates the SQL block and the smeeclient cargo target, leaving the ZT_CONTROLLER=1 path byte-identical when unset. Dropping it removes the arch-pinned ext/*/install/ubuntu22.04 prebuilts and the rust toolchain from the build, so any Debian base works. Dockerfile.controller builds that target into a 142MB runtime image. Three defects surfaced while proving it, all logged in SPEC B8/B9: - .dockerignore was inert twice over. Its patterns ran as a post-COPY RUN printf, which the daemon has already used by then, and bare *.o matches the root only under Docker's filepath.Match, so all 121 stale objects were copied and linked against the image's glibc 2.36. Now **/*.o, which is the known stale-object hazard from AGENTS.md. - The gate asserted nm -C found nothing inside a runtime image with no nm. sh: nm: not found made the pipeline fail, ! inverted it to a pass, and the check went green on a missing tool. Uses grep -qaE instead. - The container ran with -p, so every API call returned 401: OneService gates on loopback source at OneService.cpp:1859 unless allowManagementFrom widens it, and a DNAT'd port arrives from the bridge gateway. The gate uses --network host, and the docs now say so. Verified: gate passes against the image and in --local, driving network create, member authorize, member list and the on-disk write. Identity and controller.d survive container replacement. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
800 B
Plaintext
30 lines
800 B
Plaintext
# Build outputs. The makefiles emit no -MMD dependency tracking, so shipping the
|
|
# checkout's prebuilt .o files into an image build can link an ABI-mismatched
|
|
# binary (symptom: SIGSEGV at Topology::Topology on startup). Never copy them.
|
|
.git
|
|
**/*.o
|
|
**/*.a
|
|
backone
|
|
backone-cli
|
|
backone-idtool
|
|
backone-selftest
|
|
|
|
# Arch-pinned vendored prebuilts (ubuntu22.04/amd64, ubuntu22.04/arm64).
|
|
# ZT_CONTROLLER_NO_SQL=1 must never link these; excluding them also keeps the
|
|
# build context from implying that the image is arch-locked.
|
|
ext/libpqxx-7.7.3/install
|
|
ext/hiredis-1.0.2/lib
|
|
ext/redis-plus-plus-1.3.3/install
|
|
rustybits/target
|
|
|
|
ext/redis-plus-plus-1.3.3/build
|
|
ext/hiredis-1.0.2/build
|
|
ext/libpqxx-7.7.3/build
|
|
|
|
# Docs and packaging that no image build reads.
|
|
docs
|
|
pkg
|
|
windows
|
|
java
|
|
rule-compiler/node_modules
|