Repository navigation
Fix/friction log local install - #655
Merged
Merged
Conversation
…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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR:
https://ghcr.io/v2/Issues:
ax local startcan wait several minutes and then failwith only
error: timed out waiting for the condition. Two cases we hit:--server-image, for example).every pull from ghcr.io times out.
In both, the reason was in the pod status the whole time, and
axdid notread it.
ax version dev, so a report could notsay which commit it came from.
What changes
Rollout status (
internal/install/executil/rollout.go)ax local startandax installwaited withkubectl rollout status --timeout.executil.WaitRolloutruns the same wait in 15 s slices and readsthe workload's pods between them. It prints what they are waiting for when it
changes, and a timeout error ends with the last status:
The status is Kubernetes' own reason and message.
WaitRolloutdoes notinterpret 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.Uprequestshttps://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-dirtyfora 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)~/.ax/bin/ax versionto verify the install, and stops on a failed step.