Skip to content

ax local start hangs #648

Closed
Closed

Description

@rakyll
ax local start
...
ax ctx
CURRENT  NAME                                                      CLUSTER                                                   AX TUNNEL
*        ax-local                                                  kind-ax-local                                             -
         gke_dberkov-gke-dev2_us-central1-c_dberkov-substrate-poc  gke_dberkov-gke-dev2_us-central1-c_dberkov-substrate-poc  -
         gke_dberkov-gke-dev3_us-west1-c_substrate-test            gke_dberkov-gke-dev3_us-west1-c_substrate-test            -
         gke_kubecon-na-26-keynote-demo_us-west1-a_ate-ant-bench   gke_kubecon-na-26-keynote-demo_us-west1-a_ate-ant-bench   -
         gke_liorlieberman-gke-dev_us-west1-c_substrate-poc        gke_liorlieberman-gke-dev_us-west1-c_substrate-poc        -
ax get tasks
Error: kubectl port-forward exited for context "ax-local": error: unable to forward port because pod is not running. Current status=Pending

Activity

  1. yjjnls commented on Nov 19, 2026

    @yjjnls

    Walked the ax local path in the code (main @ af62e9d) — a few observations that may shortcut triage. Code walkthrough only, no repro on my side, so treat these as the shortlist to check, not a diagnosis.

    What the error actually says. ax get tasks sets up a background kubectl port-forward -n ax-system svc/ax-server; kubectl picks the pod behind the service (app.kubernetes.io/name=ax-server) and fails when its phase isn't Running/Succeeded. Current status=Pending means an ax-server pod exists but no container has started yet — that phase covers unschedulable pods, ImagePullBackOff, CreateContainerConfigError, and stuck projected-volume mounts alike, so the message alone doesn't say which.

    Where the "hang" is. The installer applies ax-postgres, waits (kubectl rollout status --timeout=3m), then applies ax-server and waits again (internal/install/axdeploy/deploy.go). A Pending pod turns that wait into ~3 minutes of "Waiting for deployment ... rollout to finish" followed by a bare timeout, and no pod events are printed. Note that an ax-server pod existing at all means the Substrate bootstrap and ax-postgres rolled out fine — only this last leg is stuck.

    Fastest disambiguation:

    ax local status
    kubectl --context ax-local -n ax-system get pods -o wide
    kubectl --context ax-local -n ax-system describe pod -l app.kubernetes.io/name=ax-server  # Events section
    kubectl --context ax-local get events -A --sort-by=.lastTimestamp | tail -40
    kubectl --context ax-local describe node ax-local-control-plane | sed -n '/Allocated resources/,/^Events/p'

    Ranked for the single-node kind path:

    1. Pull of the user-supplied --server-image. Everything else in the stack is digest-pinned from public registries; ax-server is the only workload with imagePullPolicy: Always, and ax local has no imagePullSecrets path, so the node can't use the host's docker keychain. Host-side digest resolution (EnsureDigestPinned in internal/install/axdeploy/digest.go) does use the keychain (plus a loopback-HTTP fallback for local registries), so a private or localhost:<port> image resolves on the host and then fails inside the node — the generated kind config carries no registry mirror, and unlike the e2e setup (hack/setup-e2e-kind.sh, which builds/pushes to its own local registry) there is no wiring for this. On Apple Silicon an amd64-only image lands here too ("no matching manifest for linux/arm64"). Events would show ErrImagePull.
    2. Scheduling headroom. The preflight hard-fails below 4 GiB of container-host RAM but only warns for 4–6 GiB — with this exact failure mode in the warning text ("pods may stay Pending under load", internal/install/executil/tools.go). Events would show FailedScheduling ... Insufficient memory or an untolerated node.kubernetes.io/memory-pressure taint.
    3. Projected volumes. ax-server mounts a podCertificate volume signed by podidentity.podcert.ate.dev/identity plus a ClusterTrustBundle projection (labelSelector podcert.ate.dev/canarying: live). Substrate's own postgres exercises the servicedns/postgres signers but not podidentity, so this path is only proven at the ax-server layer. Events would show FailedMount — and the phase still reads Pending.

    If it turns out to be #1, two small knobs would help independently of the environment: fall back to IfNotPresent when the ref is digest-pinned (a digest is immutable, and Always also defeats preloading via kind load docker-image), and dump get pods plus the failing pod's events when a rollout wait times out, so a hang becomes a diagnosis. Happy to dig further if you can paste the describe output.

  2. mayawang commented on Nov 19, 2026

    @mayawang
    Collaborator

    @YoyinZyc could you take this one? It's on the local start path

  3. YoyinZyc commented on Nov 19, 2026

    @YoyinZyc
    Collaborator

    Not sure if it is because the default image is not released yet, but let's test it again once most of the release thing is settled .

  4. added this to the v0.4.0 milestone on Nov 21, 2026
  5. rakyll commented on Nov 22, 2026

    @rakyll
    MemberAuthor

    This is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions