Skip to content

install: name unavailable Substrate workloads in ax local status - #758

Merged
YoyinZyc merged 1 commit into
google:mainfrom
YoyinZyc:fix-754-local-status
Nov 25, 2026
Merged

YoyinZyc merged 1 commit into
google:mainfrom
YoyinZyc:fix-754-local-status

Conversation

@YoyinZyc

Copy link
Copy Markdown
Collaborator

Part of #754

Problem

ax local status looked only at ate-api-server and at the proxy_arp sysctl of the node. In #754 the envoy container of atenet-router stayed unready and the atenet-router Service had no endpoints, so new workspaces hung, while the status still read:

Substrate:     ate-api-server (1/1 available)

Change

KindProvider.Status now reads every workload that ax local start installs for Agent Substrate, with one kubectl get deployments,statefulsets,daemonsets -A. When a workload has fewer available pods than it wants, the Substrate: line names it instead of ate-api-server:

Substrate:     degraded: atenet-router (0/1 available), atenet-egress (0/1 available)

Not in this PR

#754 also asks that a Workspace report the unreachable router as a condition instead of staying in Preparing with no conditions. Arguable if we should let workspace to report the underlying subtrate status especially we could potentially make workspace 100% declaritive.

Test

On a Kind cluster built from this branch (no liveness probe from #735, so Envoy stays drained):

$ ax local status --name ax-754
Cluster:       ax-754 (kind)
State:         Running
Kube Context:  kind-ax-754
Substrate:     ate-api-server (1/1 available)
AX Server:     ax-server (1/1 available in ax-system)


$ docker exec ax-754-control-plane pkill -TERM -f 'router --mode=ingress'
$ docker exec ax-754-control-plane pkill -TERM -f 'router --mode=egress'

$ kubectl --context kind-ax-754 -n ate-system get deploy atenet-router atenet-egress
NAME            READY   UP-TO-DATE   AVAILABLE
atenet-egress   0/1     1            0
atenet-router   0/1     1            0

$ ax local status --name ax-754
Cluster:       ax-754 (kind)
State:         Running
Kube Context:  kind-ax-754
Substrate:     degraded: atenet-router (0/1 available), atenet-egress (0/1 available)
AX Server:     ax-server (1/1 available in ax-system)

`ax local status` looked only at ate-api-server and at the proxy_arp
sysctl of the node. In google#754 the envoy container of atenet-router stayed
unready, the atenet-router Service had no endpoints, and new workspaces
hung, while the status still read "ate-api-server (1/1 available)".

Status now reads every workload that Bootstrap installs, with one
`kubectl get deployments,statefulsets,daemonsets -A`. When one of them
has fewer available pods than it wants, the Substrate line names it
instead of ate-api-server:

    Substrate:  degraded: atenet-router (0/1 available), atenet-egress (0/1 available)

A cluster where everything is available still prints
"ate-api-server (1/1 available)". A workload that is scaled to zero, or
that the cluster does not have, is not reported.

The line names no command for an unavailable workload. Its pods are
usually starting or being restarted, and `ax local start` does not
restart a pod that stays unready.

The sysctl warning keeps its words and follows the workloads. With an
unavailable ate-api-server the line changes from

    ate-api-server (0/1 available) [degraded: node sysctls reset after restart; run 'ax local start' to restore]

to

    degraded: ate-api-server (0/1 available); node sysctls reset after restart; run 'ax local start' to restore

AX Studio reads the first "<n>/<m> available" of the line and the word
"degraded", so it shows the Substrate layer as not ready in both forms.

The list of workloads is in kind.go and has to follow the Substrate
manifests. TestSubstrateWorkloadsMatchManifests compares the two, so a
Substrate bump that adds, renames or removes a workload fails the test
until the list is updated. skills/substrate names this step under
"Bumping Substrate".

Tested on a Kind cluster without the liveness probe of google#735: after
SIGTERM to the router processes of atenet-router and atenet-egress,
`ax local status` printed the line above, also with -o json.

Updates google#754
@YoyinZyc
YoyinZyc requested review from mayawang and rakyll November 24, 2026 23:49
@YoyinZyc
YoyinZyc merged commit 1e5a8d9 into google:main Nov 25, 2026
11 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