Skip to content

Deploy proof: a non-JSON Thanos answer kills step 23 with a traceback, and preflight does not check monitoring #489

Open

Description

@ephico2real2

Part of #13. Found in OB1 run 27 (fb727b5 on CRC), 2026-11-20.

What is wrong.

  1. deploy/crc-proof.sh (docs/13 step 23, lines 263-264, by_job) parses whatever the Thanos query returns as JSON. CRC's openshift-monitoring was scaled to 0 (by the CRC recovery at 08:31:47Z), so the Thanos Route answered 503 text/html. Under set -e the step died with json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) instead of a fail line naming the cause. The 20-try loop cannot ride out a transient 503 either.
  2. Step 2's preflight (deploy/crc-guard.py preflight) does not check that Prometheus and Thanos answer. So the run rolled out new code (step 21) before it learned that step 23 could not pass.

How to prove it.

  • (1) Run by_job against a stand-in that answers 503 text/html. Today it gives a traceback. After the fix it should give one named fail line ("Thanos answered 503 text/html: is openshift-monitoring running?") and retry within the loop.
  • (2) Run preflight against a stand-in where Thanos answers 503. Today it passes. After the fix it should stop before any change is made.

Research mandate. Read the primary sources (OpenShift monitoring API, the Prometheus HTTP API error format, curl's --fail-with-body), fix the cause, and test both cases. Do not touch openshift-monitoring: it is a shared service.

Activity

  1. added
    bug
    status:open
    sev:low
    Backlog
    on Nov 20, 2026
  2. ephico2real2 commented on Nov 20, 2026

    @ephico2real2
    OwnerAuthor

    Owner, 2026-11-20: "I turned off OpenShift monitoring for now due to pressure on the MacBook." So monitoring off is an intended state on CRC, not a fault. The fix must therefore support it:

    • step 2's preflight detects that openshift-monitoring is scaled down;
    • the run records an explicit, named mode (for example CMAPI_PROOF_MONITORING=off, stated in the step log);
    • step 23 skips only its Prometheus/Thanos checks, each with a SKIP (monitoring off) line, and runs every other proof and its cleanup (deleting cmapi-system/cmapi-reader-token once both targets report CRC connected);
    • steps 24 and 25 run as usual.

    A Thanos answer that is not JSON while monitoring is on still fails, with a clear message. docs/13 documents the mode.

    When the fix lands: finish OB1 run 27 (steps 12, 13, 14, 23, 24 and 25) in that mode. Until then, the legacy cmapi-reader-token Secret and the run's Keycloak backup in ~/.cmapi-keycloak-backup stay in place.

  3. added
    sev:medium
    In-Progress
    and removed
    sev:low
    status:open
    Backlog
    on Nov 20, 2026
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

    In-Progressbugsev:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions