Skip to content

Fix/friction log local install - #655

Merged
YoyinZyc merged 4 commits into
google:mainfrom
YoyinZyc:fix/friction-log-local-install
Nov 19, 2026
Merged

YoyinZyc merged 4 commits into
google:mainfrom
YoyinZyc:fix/friction-log-local-install

Conversation

@YoyinZyc

@YoyinZyc YoyinZyc commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

TLDR:

  1. Print detailed pod error instead of just general "error:timed out waiting for condition"
  2. Preflight check the egress by sending a request to https://ghcr.io/v2/
  3. Improve ax version output
  4. Improve the agent prompt for setting ax up.

Issues:

  1. On a clean machine, ax local start can wait several minutes and then fail
    with only error: timed out waiting for the condition. Two cases we hit:
  • The cluster cannot pull an image (a private --server-image, for example).
  • Containers on the host have no outbound network (IPv4 forwarding off), so
    every pull from ghcr.io times out.
    In both, the reason was in the pod status the whole time, and ax did not
    read it.
  1. A source build also printed ax version dev, so a report could not
    say which commit it came from.

What changes

Rollout status (internal/install/executil/rollout.go)

ax local start and ax install waited with kubectl rollout status --timeout. executil.WaitRollout runs the same wait in 15 s slices and reads
the workload's pods between them. It prints what they are waiting for when it
changes, and a timeout error ends with the last status:

==> Deploying ax-server (...)...
    ax-system/deployment/ax-server is not ready: pod ax-server-..., container ax-server: ImagePullBackOff: Back-off pulling image "...": ... 403 Forbidden
Error: waiting for ax-system/deployment/ax-server rollout: timed out after 3m0s: pod ax-server-..., container ax-server: ImagePullBackOff: ...

The status is Kubernetes' own reason and message. WaitRollout does not
interpret it and never ends the wait early, so it does not depend on kubelet
wording. A rollout that finishes within a slice prints nothing.

Egress warning (internal/install/cluster/kind.go)

After the Kind node is ready, KindProvider.Up requests https://ghcr.io/v2/
from inside the node. If that fails it prints a warning, and names IPv4
forwarding when Docker reports it off. The existing host checks cannot see
this, because the host has network access and its containers do not. It is a
warning, not an error: a cluster that uses a registry mirror still works.

ax version (internal/version)

A build that is not a release prints dev+<12 hex digits>, with -dirty for
a modified checkout, from the VCS information the Go toolchain records.
Release builds are unchanged. A build without VCS information still prints
dev.

Docs (docs/local_installer.md)

  • The agent setup prompt links the guide by URL, runs ~/.ax/bin/ax version
    to verify the install, and stops on a failed step.
  • A local cluster pulls every image anonymously, so images must be public.
  • Describes the egress check and the rollout output above.

…gress

'ax local start' and 'ax install' waited on 'kubectl rollout status
--timeout', which reports only 'timed out waiting for the condition'. The
reason, such as an image that cannot be pulled, was in the pod status the
whole time.

executil.WaitRollout runs the same wait in 15 s slices and reads the status
of the workload's pods between them. A container that cannot pull its image
for three slices in a row ends the wait, and a timeout lists what each pod
is waiting for, with the kubelet's message and the likely cause (no registry
credentials, registry unreachable, no such image).

After the Kind node is ready, KindProvider.Up requests https://ghcr.io/v2/
from inside the node and prints a warning when that fails, naming IPv4
forwarding when Docker reports it off. The host checks cannot see this,
because the host has network access and its containers do not.

docs/local_installer.md also says that a local cluster pulls every image
anonymously, so images must be public.
…eases

A source build printed 'dev', so a report could not say which commit it
came from. Read the revision the Go toolchain records and print
'dev+<12 hex digits>', with '-dirty' for a modified checkout.
The prompt named docs/local_installer.md by a relative path, which does not
exist on a machine without an ax checkout, so it now gives the URL.

'verify ax version' did not say which ax or what to do when it fails. The
installer puts ax in ~/.ax/bin, which is not on PATH in a new shell, and the
installer pipeline exits 0 when its download fails. The prompt now runs
~/.ax/bin/ax version and treats a failure as a failed install.

It also tells the agent to show the error of a failed step and stop.
…ng it

WaitRollout matched substrings of the kubelet's pull error to guess the
cause, and ended the wait early for a list of image pull reasons. Both
depend on wording and reason names that AX does not own.

Print what the rollout's pods are waiting for every 15 s, when it changes,
and put the last status in the timeout error, word for word. The wait
always runs to the rollout timeout.

@mayawang mayawang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Yuchen, this is exactly the friction we hit! LGTM once E2E is green. Does this cover #648 too?

@YoyinZyc

Copy link
Copy Markdown
Collaborator Author

I didn't reproduce #648 honestly, I suppose it was because of the image missing. We could test again once we wrap everything up.

@YoyinZyc
YoyinZyc merged commit c03f481 into google:main Nov 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants