fix(smolmachines): consolidate virtiofs mounts to stay within libkrun limit
libkrun limits total mounts + port-mappings to 5. With all three sidecar daemons active (egress, git-gate, supervise), the prior layout used 3 mounts + 3 ports = 6, causing the VM to crash at boot with krun_start_enter returned -22. Merge the egress confdir and git-gate scripts into a single staging directory mounted at /bot-bottle-data/ with egress/ and git-gate/ subdirectories, reducing to 2 mounts + 3 ports = 5. Also clean up leftover VMs before creating new ones to handle interrupted teardowns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-4
@@ -89,16 +89,19 @@ RUN mkdir -p \
|
||||
/git-gate/creds \
|
||||
/git \
|
||||
/run/supervise \
|
||||
/home/mitmproxy/.mitmproxy
|
||||
/home/mitmproxy/.mitmproxy \
|
||||
/bot-bottle-data/egress \
|
||||
/bot-bottle-data/git-gate
|
||||
|
||||
# Static wrapper for the git-gate entrypoint. The per-bottle
|
||||
# entrypoint script is either:
|
||||
# - docker-cp'd to /git-gate-entrypoint.sh (docker/macOS backends),
|
||||
# which overwrites this wrapper; or
|
||||
# - virtiofs-mounted at /etc/git-gate/entrypoint.sh (smolmachines),
|
||||
# where this wrapper delegates to it at runtime.
|
||||
# - virtiofs-mounted at /bot-bottle-data/git-gate/entrypoint.sh
|
||||
# (smolmachines), where this wrapper delegates to it at runtime.
|
||||
# Fallback to /etc/git-gate/ for backwards compatibility.
|
||||
# Either way sidecar_init.py calls `/bin/sh /git-gate-entrypoint.sh`.
|
||||
RUN printf '#!/bin/sh\nexec /etc/git-gate/entrypoint.sh "$@"\n' \
|
||||
RUN printf '#!/bin/sh\nif [ -x /bot-bottle-data/git-gate/entrypoint.sh ]; then\n exec /bot-bottle-data/git-gate/entrypoint.sh "$@"\nfi\nexec /etc/git-gate/entrypoint.sh "$@"\n' \
|
||||
> /git-gate-entrypoint.sh \
|
||||
&& chmod 755 /git-gate-entrypoint.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user