Skip to content

Image-upgrade gate cannot say why the pre-upgrade Tari identity read came back empty #4294

Closed

Description

@pithead-developer

What's the problem

The image-upgrade KVM phase failed at "pre-upgrade chain identities are readable" (tests/integration/lib/live-gates.sh:75-76 at 0cf8f02). The Monero read had succeeded, because the preceding check, which requires a valid Monero tip, passed. So the Tari block identity from tari_block_identity() (tests/integration/lib/live-upgrade-support.sh:410-412) was empty. The read runs a gRPC ListHeaders call inside the dashboard container, discards stderr (2>/dev/null) and does not retry. The failure detail therefore cannot say which chain failed or why. The upgrade was not attempted.

What it impacts

Any image-upgrade run with external chain nodes can fail with no usable diagnosis. The phase is required at the release gate (docs/dev/releasing.md), so one unexplained red blocks the gate until someone reruns and guesses. The KVM guest's remote-node-reachable stage (tests/os/image-upgrade-guest.sh) checks only the Monero ZMQ and RPC ports, so Tari reachability is never proven before the read.

How I found it

Job 378 on commit bdf2e2c (the pithead#4120 branch, head 0cf8f02) failed at this check. The guest system journal shows two dashboard exec calls in the window: Monero get_info (0.78s) and the Tari ListHeaders read (0.69s), with no third call. That rules out a timeout (the gRPC timeout is 8s). A fast error, an empty stream and an import or env error all fit. About 10 other image-upgrade runs with external nodes (11-10 to 11-17) passed this check, including two on the same bench and owner-payout branches, so the read logic works in general. The cause is not established.

How important is it

Normal priority, not a 2.0.4 release blocker on current evidence: one unreproduced failure among about 10 passes, on a proof run rather than a release gate. It becomes a blocker if an image-upgrade rerun at a commit carrying the #4118 fix fails at the same check. The diagnostics gap is worth closing either way.

Acceptance criteria

  • A failure of the pre-upgrade identity check names which chain (Monero or Tari) could not be read and includes the captured error text, with no secrets.
  • The Tari identity read retries a bounded number of times before the check fails.
  • The guest remote-node-reachable stage proves the external Tari gRPC endpoint is reachable, or fails naming it.
  • An image-upgrade run with external chain nodes passes the check, and a forced empty Tari read produces the chain-specific failure detail.

Possible solutions

  • Retry tari_block_identity and capture stderr into the failure detail (live-gates.sh:75-76, live-upgrade-support.sh:410-412).
  • Add a Tari gRPC reachability probe next to the Monero port checks in tests/os/image-upgrade-guest.sh.
  • Treat an empty ListHeaders stream (dashboard height ahead of the node tip) as a distinct, reported case.
  • Root cause is unknown: it may be the external Tari node or link rather than pithead. Rerun on the fix(test): KVM battery mines to the bench-supplied owner payouts (#4118) #4120 head first; a pass leaves only the diagnostics work.

Activity

  1. added this to the v2.0.5 milestone on Nov 20, 2026
  2. added
    bug
    testing
    P3-hardening
    on Nov 20, 2026
  3. pithead-developer commented on Nov 20, 2026

    @pithead-developer
    ContributorAuthor

    Root cause found: the external Tari node refuses ListHeaders

    Update: job 381 at 0cf8f02 failed identically at the same check (live-gates.sh:75-76), after job 378. Two failures in a row on the same lineage, so this is reproducible.

    Cause (two verifiers agree, confirmed). The external Tari node a KVM bench hands the guest answers GetVersion (6.2.0) and GetTipInfo (synced, LISTENING), but returns PermissionDenied: ListHeaders method not made available for every ListHeaders call.

    • VERIFIED: re-probed directly with grpcurl and the dashboard's base_node.proto. ListHeaders is refused for from_height 0, tip-1, tip and tip+1, in both sort orders. GetBlocks, GetHeaderByHash and GetConstants are refused too.
    • VERIFIED: tari_block_identity() (live-upgrade-support.sh:410-412) calls only ListHeaders and sends stderr to /dev/null. The refusal becomes an empty read, which matches the ~0.7s exec in the guest journal. The cached dashboard sync state uses allowed calls, which is why "upgrade starts from synced chains" passes first.
    • VERIFIED: the passes (583, 370, 372) log "node inputs filled from the bench serving chain nodes" and carry a provider id. 378, 381 and the later reruns do not, so they used the external node. Wait timing does not separate pass from fail (378 waited as long as 583).
    • VERIFIED: the gate files (guest script, live-upgrade-support.sh, live-gates.sh) are byte-identical between the last pass (a68610c, PR build(deps-dev): Bump @playwright/test from 1.65.0 to 1.65.1 in /dashboard/tests/browser #4203 head) and 0cf8f02. The image-upgrade.sh change is a same-jq refactor with the same Tari remote host.
    • INFERRED: the denial is the node's allowed-gRPC-methods setting (node config not read).
    • INFERRED: the earlier passes used a node that permits ListHeaders (not probed).
    • Not observed: the guest-side exception itself, because stderr is discarded. I probed from outside the guest.

    Not caused by #4120. The failing call and target do not depend on it. No image-upgrade run exists on the external node without #4120, but a develop-tip run issues the same ListHeaders to the same node. A rerun on the same node source will fail the same way.

    Fix (either one unblocks, independent):

    1. Node owner: add list_headers to the external node's allowed gRPC methods. No code change.
    2. Harness (belongs on develop, not in fix(test): KVM battery mines to the bench-supplied owner payouts (#4118) #4120): stop depending on ListHeaders in tari_block_identity(). Use an allowed call (GetTipInfo gives tip height and hash, so the identity comparison would use the tip hash) and stop discarding stderr so a PermissionDenied shows in the failure detail. Take this route if the allowlist is intentional hardening.

    The original diagnostics acceptance criteria (chain-specific failure detail, captured error text, Tari reachability probe in the guest) still stand and would have made this a one-look diagnosis.

    Priority change. The earlier "not a blocker" call assumed one unreproduced failure. It is now deterministic for every image-upgrade run against that node, and the phase is required at the release gate, so I am moving this to v2.0.4 as a release blocker until fix 1 or 2 lands.

  4. added
    release-blocker
    on Nov 20, 2026
  5. pithead-developer commented on Nov 20, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4118. Draft PR #4296 (head ec1c198) adds a three-attempt Tari identity read, a failure detail that names the chain and a masked gRPC error, a guest probe of the external Tari gRPC port, and a selftest (8 cases pass locally). It also updates the docs and the test inventory. The verifier's findings are fixed. The required tier4-kvm image-upgrade proof cannot run yet: the bench refuses image-upgrade jobs on commits that predate pithead#4120, and that PR (closing #4118) is still open. I posted this on the PR. Once #4118 closes, merge develop into the branch, submit the image-upgrade job, and add its evidence block. The GitHub tier 1-3 checks were still pending when I stopped. Not done: a GetTipInfo fallback for nodes that refuse ListHeaders, because the post-upgrade identity check needs a hash at a past height. The release-blocking cause still needs the node owner to allow ListHeaders, or an owner decision on that fallback.

    The runner resumes this issue when that one closes.

  6. added
    blocked
    on Nov 20, 2026
  7. removed
    blocked
    on Nov 20, 2026
  8. pithead-developer commented on Nov 21, 2026

    @pithead-developer
    ContributorAuthor

    The image-upgrade gate passes at develop b6f325161d24a84aa4e18e1b635cd50bbdf96f49: tier4-kvm job 383 on a KVM bench, phase image-upgrade: passed at 2026-11-21T02:32Z.

    The cause of the earlier failures was external. The remote Tari node used by the KVM benches refused ListHeaders; it now allows it. A direct probe returned the header at height 391000, and its hash matches the public explorer.

    So this no longer blocks the 2.0.4 cut, and I removed release-blocker. The diagnostic improvement in #4296 (name the chain and the error when the identity read fails) is still useful and can land when its proof is green, but the release does not wait for it.

  9. removed
    release-blocker
    on Nov 21, 2026
  10. pithead-developer commented on Nov 21, 2026

    @pithead-developer
    ContributorAuthor

    Merged in #4296.

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

    P3-hardeningbugtesting

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions