Skip to content

Let appliance owners download a redacted support bundle of past logs from the dashboard, and log why health pings fail #4032

Open
8 of 9 issues completed

Description

@pithead-developer

What's the problem

There is no way to get logs off a Pithead appliance after an incident.

So when an owner's appliance reports an outage, neither the owner nor the project can tell what happened.

That is the situation for the owner's production appliance on 2026-11-11. Its Healthchecks check went DOWN about 09:47–12:24Z (2 h 37 min) and again 12:42–13:32Z (49 min). The cause cannot be confirmed.

What it impacts

  • Owners: every appliance owner who sees an outage, a stalled miner or a failed update can only reboot and hope. They cannot send the project evidence.
  • The project: user reports of appliance problems cannot be diagnosed. Intermittent issues stay open for lack of logs (for example Appliance recovery can commit healthy while the local miner stalls until restarted #3375).
  • Monitoring: without logs, a real outage looks the same as a failed health ping (below).

How I found it

This came from the owner's production appliance alerts on 2026-11-11, from the Healthchecks Telegram bot ("pithead-prod is DOWN … success signal did not arrive on time").

The appliance could not be read: no shell or SSH, and it is the owner's box. Indirect evidence:

  • The mining service stayed up. The xmrig journals of three rigs that mine to the production appliance show them on its stratum continuously through both windows. The only gaps were two 5-second reconnects, at 09:26Z and 09:40Z.
  • The health ping is what failed. Pithead sends the Healthchecks ping through Tor (socks5h). A test bench's Tor egress probe failed 9 times in the 09Z hour, and once each at 11Z and 12Z. That points at the Tor path, but it is an inference. The appliance's own Tor and dashboard logs are what would confirm it.

How important is it

High. The owner asked for it after a production incident. It is the prerequisite for supporting appliance users at all. It is placed on v2.0.4 because it is needed to diagnose a live problem; under the patch-release placement rule a new capability would normally go to 2.1.0, so the owner can move it.

Acceptance criteria

  • An authenticated, owner-only dashboard action downloads a support bundle for a chosen time window, defaulting to the last 72 hours. Contents:
    • the journald entries for every Pithead unit and container (dashboard, Tor, monerod, tari, p2pool, xmrig-proxy, the built-in miner, pithead-boot, update/RAUC, address watch);
    • health and status history;
    • Tor bootstrap and circuit state;
    • versions, slot, and config shape (keys only).
  • The bundle is redacted with the existing support-bundle redaction (bundle_redact_log and the Add a bounded, redacted live log API (tail and follow per service) and a dashboard log viewer #3978 redactor, shared): no wallet secrets, tokens, passwords, stratum credentials or onion private keys. A test asserts a seeded secret never appears in the output.
  • The journal survives reboots for at least the bundle window (persistent journald with a size cap), so a bundle taken after a reboot still covers the incident.
  • Each Healthchecks, Telegram or webhook ping attempt that fails is logged with its reason (Tor SOCKS timeout, DNS, HTTP status). The dashboard shows the last failures, so a failed ping can be told apart from a real outage.
  • The same bundle can be produced from the appliance's recovery or maintenance screen, without the dashboard running.
  • The docs say how an owner downloads a bundle and how to send it with a bug report (link with Add a 'Report a bug' link (bugs@pitheadmining.com) to the shell and Maintenance #3746).
  • Ships in v2.0.4 as a dashboard action (owner, 2026-11-12). The owner will use it to export the full record of the 2026-11-11 production outage (Prod Tor client wedged for 15 h: Monero node peerless and tor auto-heal never escalated past a rejected NEWNYM #4045, Stop serving stratum work while the node is stale so rigs fail over to their backup pool #4046) once v2.0.4 is installed on that appliance.
  • The bundle includes each container's full retained log for the chosen window, not only the last 200 lines (the DIY bundle runs docker compose logs --tail 200 today).
  • The bundle includes every file the owner saved under /data/pithead/support/, redacted the same way. Incident captures taken at the console before this feature existed are exported with everything else.

Possible solutions

  • Reuse the DIY support-bundle code path (lib/pithead/07-support-bundle.sh) behind a dashboard endpoint. Run it in the existing control service, write the archive to a private temp file, and stream it to the authenticated owner.
  • Add a ping_failures ring buffer in the dashboard's existing SQLite store for the notifier, shown on the health page.
  • Make journald persistent on /data with SystemMaxUse sized from free space, if it is not already persistent for every unit.
  • Unknown: whether the appliance journal is persistent today for all services. The fix should measure that first.

Sub-issues

Sub-issues

8 of 9 Issues completed
Loading 9 sub-issues

Activity

  1. added this to the v2.0.4 milestone on Nov 11, 2026
  2. added
    enhancement
    dashboard
    appliance
    P1-user-facing
    on Nov 11, 2026
  3. added
    tracker
    on Nov 11, 2026
  4. pithead-architect commented on Nov 11, 2026

    @pithead-architect

    A local session judged this too big for one local session (Too big for one local session: the issue carries four independent objectives (dashboard bundle download over the control channel, notifier ping-failure logging with dashboard display, a no-dashboard recovery-state bundle, and a journald persistence guarantee) touching about a dozen source files acro). The runner filed 4 chunks as sub-issues and marked this issue a tracker, so it is not picked again:

  5. pithead-developer commented on Nov 12, 2026

    @pithead-developer
    ContributorAuthor

    Correction to my earlier reading of the 11-11 outage. It was not only the Tor health ping that failed. The appliance's Tor client wedged at ~09:27Z, the Monero node had no peers from then on and was still stuck 15 hours later, and the rigs kept mining a stale tip. Details are in #4045 (the Tor wedge and the auto-heal gap) and #4046 (stop serving work while the node is stale).

    The evidence again came only from the owner copying per-service logs out of the dashboard by hand. The appliance journal around the 09:26–09:27Z trigger is still unreachable, which is exactly the gap this issue covers.

  6. added
    release-blocker
    on Nov 12, 2026
  7. pithead-developer commented on Nov 12, 2026

    @pithead-developer
    ContributorAuthor

    Owner, 2026-11-12: log pulling ships in v2.0.4 no matter what. If the Tor wedge fixes (#4045, #4046) slip, this one still ships.

    Additions to the acceptance criteria:

    • Format: a single .zip download from the dashboard (one click, owner-only). It holds the full journal for the chosen window, each container's full log, Tor bootstrap, guard and circuit state, P2Pool and monerod status snapshots (height, peers, sync flag), and doctor --json.
    • Usable when the stack is broken: the download keeps working while Tor, monerod or P2Pool are down or wedged, because that is exactly when it is needed. The download path must not depend on any of them.
    • Tested: a test downloads the zip from a stack with Tor deliberately wedged and checks that it is complete and redacted.
  8. pithead-developer commented on Nov 15, 2026

    @pithead-developer
    ContributorAuthor

    Owner, 2026-11-15: "make sure 2.0.4 has the export logs feature also. i want to be able to select a time frame and then dump pretty much every log on the system into a zip file for download. this is so we can debug issues users face"

    Operator notes: the closed children do not deliver this yet.

    A read-only audit of develop at eb929ceb93 found gaps against this request and against this tracker's own criteria. Each gap was re-checked by a second agent.

    • Format: the export is a .tar.gz, not a .zip (lib/pithead/07-support-bundle.sh, 46b-control-support-bundle.sh).
    • Window: the only control is "hours back from now", from 1 to 168. There is no start/end range, so a past incident window cannot be chosen.
    • Off by default: the dashboard route exists only when the control channel is enabled, and it defaults to off.
    • Coverage: only 15 hard-coded units are collected. Missing:
      • the rest of the system journal: kernel, boots, network, time sync, container engine, crash records;
      • the units for the Tari wallet, wallet RPC, LAN guard and firstboot;
      • doctor --json, chain status snapshots, and Tor guard/circuit state;
      • /data/pithead/support/ (C12).
    • Silent truncation:
      • each unit is cut to its newest 2 MiB with no marker;
      • a bundle over 64 MiB fails outright;
      • dashboard history stops at 5000 rows;
      • the docs say the export refuses rather than truncates, which is wrong.
    • DIY: the dashboard export collects almost nothing on DIY. The CLI keeps 200 lines per container and has no window.
    • Proof:
      • nothing downloads the archive with Tor wedged (C16);
      • the full dashboard-to-download flow has not run on appliance hardware;
      • no browser test covers it.

    New v2.0.4 release-blocker sub-issues will follow on this tracker. This tracker stays open until they merge and an appliance run proves the zip.

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

    @pithead-architect

    The support bundle ships in 2.0.4: #4127, #4128 and #4129 are merged, and an appliance run (bench job 607, 2026-11-21) proved the baseline and Tor-wedged bundles complete, window-bounded and redacted. The remaining proof, the monerod-stopped leg in #4131, moved to v2.0.5 under the owner's 2026-11-16 ruling, so this tracker follows it there and no longer gates 2.0.4.

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

    P1-user-facingappliancedashboardenhancementtracker

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions