Skip to content

Secure, Fast, and Extensible Sandbox runtime for AI agents.

fix(charts/fast-sandbox): gate the agent start on the node ublkd socket

高然fc2fbedda05b
diff --git a/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml b/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml
index 9d02cc40e..c7d48d442 100644
--- a/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml
+++ b/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml
@@ -201,6 +201,20 @@ spec:
- name: firecracker-agent
image: {{ include "fast-sandbox.image" (dict "repository" .Values.runtime.image.repository "tag" .Values.runtime.image.tag "appVersion" .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.runtime.image.pullPolicy }}
+ {{- if .Values.runtime.oci.enabled }}
+ # The first host-readiness pass pings the node ublkd socket once;
+ # without this gate it races the sidecar's startup by a few hundred
+ # milliseconds, fails, and the node stays unlabeled until the next
+ # 5-minute recheck. Wait (bounded) for the socket, then start.
+ command: ["/bin/sh", "-ec"]
+ args:
+ - |-
+ for i in $(seq 1 300); do
+ [ -S /run/fast-sandbox/overlaybd/ublkd.sock ] && break
+ sleep 0.2
+ done
+ exec ./firecracker-runtime
+ {{- end }}
# Only Downward API identities live in env; all tunables come from
# the mounted agent config (nodeReadiness hot-reloads per pass).
env:
diff --git a/scripts/fast-sandbox-env/integration-env.sh b/scripts/fast-sandbox-env/integration-env.sh
index 001c3f709..3a3757860 100755
--- a/scripts/fast-sandbox-env/integration-env.sh
+++ b/scripts/fast-sandbox-env/integration-env.sh
@@ -1098,7 +1098,10 @@ runtime_up() {
done
# The readiness loop applies labels + FirecrackerReady itself.
for node in $(kubectl get nodes -o jsonpath='{.items[*].metadata.name}'); do
- wait_for "node $node labeled + FirecrackerReady" 120 \
+ # The agent's host-readiness recheck cadence is 5 minutes; when a
+ # first pass fails (e.g. a slow tool install), the labels land on
+ # the NEXT pass, so the wait must span one full recheck cycle.
+ wait_for "node $node labeled + FirecrackerReady" 480 \
runtime_node_labeled "$node"
done
pass "firecracker-runtime healthy + DART roster=$expected_members + nodes FirecrackerReady"