autoupgrade: tell the runner which container engine to use (v0.2.91)

run_oci.sh takes its engine from CONTAINER_ENGINE and defaults to docker, so on
the rootless-podman host this script was written for it would have looked for a
docker socket that is not there -- failing on every hourly tick with nothing to
show but a non-zero exit. Found while installing it on the Digesta production
server, before it ran.
Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
parent 7b570bc1
......@@ -16,7 +16,7 @@
# Canonical product version for CoderAI — single source of truth. Both the API
# metadata and the admin web UI read from here.
__version__ = "0.2.90"
__version__ = "0.2.91"
__tagline__ = "Complete orchestration, distribution and escalation of remotizable advanced inference."
# Configure the CUDA caching allocator BEFORE torch is imported anywhere.
......
......@@ -207,8 +207,12 @@ else
"$ENGINE" tag "$IMAGE_TAG" "$ROLLBACK_TAG" >/dev/null 2>&1 \
|| say "WARN: could not tag the rollback point; continuing without one"
CODERAI_UPGRADE_REF="$UPGRADE_REF" "$RUNNER" --upgrade --upgrade-ref "$UPGRADE_REF" \
"$IMAGE_TAG" >>"$LOG" 2>&1
# CONTAINER_ENGINE is how the runner picks podman over its docker default. It
# has to be told: on a rootless-podman host the runner would otherwise look
# for a docker socket that is not there, and the upgrade would fail on every
# tick with nothing to show for it but a non-zero exit.
CONTAINER_ENGINE="$ENGINE" CODERAI_UPGRADE_REF="$UPGRADE_REF" \
"$RUNNER" --upgrade --upgrade-ref "$UPGRADE_REF" "$IMAGE_TAG" >>"$LOG" 2>&1
rc=$?
[ "$rc" -eq 0 ] || { say "FAIL: the upgrade run exited $rc; image left as it was"; exit 1; }
......
......@@ -198,3 +198,18 @@ def test_the_token_is_never_written_to_the_log():
for line in SH.splitlines():
if "say " in line or "tee -a" in line:
assert "$ADMIN_TOKEN" not in line, line
def test_the_runner_is_told_which_engine_to_use():
"""run_oci.sh defaults to docker (ENGINE="${CONTAINER_ENGINE:-docker}"). On the
rootless-podman host this script exists for, not passing it would make every
tick look for a docker socket that is not there."""
assert 'CONTAINER_ENGINE="$ENGINE"' in SH
blk = SH.split('"$RUNNER" --upgrade')[0]
assert blk.rstrip().endswith('CODERAI_UPGRADE_REF="$UPGRADE_REF" \\') or \
'CONTAINER_ENGINE="$ENGINE" CODERAI_UPGRADE_REF' in SH
def test_the_runner_default_really_is_docker():
"""The premise above, asserted against the runner itself."""
assert 'ENGINE="${CONTAINER_ENGINE:-docker}"' in RUNNER
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment