HydraIssues

A watcher polled an obliterated depot for 6.5 months and reported healthy the whole time
open bug Project: hydraperforcewatcher Reporter: 5 Nov 2026 05:07

Description

Mercator V1.1 was submitted to Perforce on 2026-10-21 as change 7, and nothing in Hydra noticed. The build never reached the mirror, hydracluster was never notified, and the central dashboard showed a healthy agent for the whole period.

What was wrong

The visitflanders agent runs on node node-perfor01 (the old shared Perforce box, 88.198.195.179) and was configured as:

perforce:
  port: "ssl:perforce.visitflanders.experiencenet.com:1666"
watches:
  - name: "soulmade"
    stream: "//soulmade/main"

//soulmade was obliterated on 2026-08-25 when the depot was restructured into //mercatormetahuman on the new visitflanders scale. The agent kept polling the frozen copy on the old server every 5 minutes and kept pushing state every 30 seconds. Its record at the time of writing:

agent_id: visitflanders
p4_port: ssl:perforce.visitflanders.experiencenet.com:1666
last_seen_at:      2026-11-05T04:55:22Z   <- 2 minutes ago
last_poll_at:      2026-11-05T04:54:52Z   <- 5 minutes ago
last_processed_at: 2026-04-22T14:24:41Z   <- 6.5 months ago
last_changelist: 92

This is the real defect, not the misconfiguration. A poll that succeeds against a depot with nothing in it is indistinguishable, in every signal the agent emits, from a poll against a depot that is being watched correctly. last_seen_at and last_poll_at both stay fresh. Nothing watches the distance between last_poll_at and last_processed_at, which had grown to 6.5 months. Silence was read as nothing to do rather than as nothing to look at.

Fixed

The correctly pointed agent now runs on hydraskin-perforce-1, where the Perforce server actually lives, as a second instance alongside the gallo-romeins one:

  • /root/.hydraperforcewatcher-mercator/config.yaml, unit hydraperforcewatcher-mercator.service, port ssl:127.0.0.1:1667, watching //mercatormetahuman/main
  • getDataDir() returns the config file's directory, so pointing HYDRAPERFORCEWATCHER_CONFIG at a second directory gives the instance its own state.yaml. No code change was needed
  • least-privilege Perforce account created on the visitflanders scale following the pattern from the provisioning runbook: user hydraperforce_svc, group hydraperforce_service with Timeout: unlimited, and a single appended protections line read user hydraperforce_svc * //mercatormetahuman/.... Verified it can read //mercatormetahuman/... and is refused elsewhere. Protections were backed up before the append, and the Security Level 4 forced-reset flag was cleared by changing the password as the service user, per the runbook caveat
  • the stale agent on node-perfor01 was renamed to visitflanders-legacy so the two stopped overwriting one record. Its config was backed up first

The dashboard now shows three agents, each on its correct port:

visitflanders         ssl:127.0.0.1:1667                                mercatormetahuman   CL 7
galloromeins          ssl:localhost:1666                                gallo-romeins       CL 11
visitflanders-legacy  ssl:perforce.visitflanders...:1666                soulmade            CL 92

Deliberately not done

The new watch starts level with the depot head at change 7, so changes 6 and 7 are not backfilled. Builds/MercatorV1.1.zip is 2,317,144,703 bytes and MercatorV1.0.zip sits beside it, so a backfill is a multi-GB transfer, and hydramirror shares an NVMe with hydratransfer so it costs twice (see #821 and its 50 GB limit). Needs an explicit decision, and it should run from hydraskin-perforce-1, which has 93 GB free, never from the old box, which is at 95% with 4.1 GB free.

Still open

  1. The health signal. An agent should report a watch as stale when last_poll_at has run far ahead of last_processed_at, or when the stream it watches no longer resolves. p4 changes against a non-existent path is not an error, which is why this was silent. This is the part worth fixing in the product.
  2. node-perfor01 is on v0.1.3 while the current release is v0.3.1, and v0.1.3's config schema is the pre-mirror: one with a release_server: block that the current code no longer reads. It has not self-updated in 9 months. Upgrading it means rewriting its config, so it was left alone.
  3. What should that box watch now? //rupelmondecastleviewer/main still lives there and has no watcher at all (Tommaso, active development, see #441). Pointing the legacy agent at it is the obvious move, but it would start processing builds onto a disk with 4.1 GB free, so it needs a decision rather than a default.
  4. One global port per process. perforce.port is a single value shared by every entry in watches, and the reporter pushes one agent-level p4_port, so one process can never span two Perforce servers. That is why this is a second instance rather than a second watch. Three servers now run as containers on hydraskin-perforce-1 (1666 gallo-romeins, 1667 visitflanders, 1668 hydramancers), so the one-agent-per-server model means three units on one host. Worth deciding whether per-watch port belongs in the config.

Session Context

Venue
nbg1-dc

Comments (1)

api 23 Nov 2026 15:07

Same blind spot, second route, and this one may have been caused by the remediation recorded here.

On 2026-11-05 at about 04:57 UTC, minutes after the last_seen_at quoted in this issue, the sibling gallo-romeins watcher on the same host lost its Perforce ticket and could not poll at all. It logged P4PASSWD invalid or unset every 5 minutes for 18 days, stayed active, kept pushing state, and kept a fresh last_poll_at, so it looked exactly as healthy as the agent described here. Cyborn's CL12 sat unnoticed from 2026-11-20 until the museum asked for it on 2026-11-23.

The p4d log shows no logout, no password change and no restart for that account. What it does show at 04:57:49 is users, user -o hydraperforce_svc, protects -u hydraperforce_svc, groups hydraperforce_svc running as that user: the least-privilege verification described above. Both watcher instances run as root with HOME=/root, no P4TICKETS of their own, and the same username hydraperforce_svc against two servers, so they share /root/.p4tickets, which was rewritten at 05:11 with stale August entries.

Filed as #1207 with the detail and four asks, the first two of which overlap this issue: alarm on consecutive poll failures, and stop advancing last_poll_at on a failed poll so the last_poll_at to last_processed_at distance means what this issue wants it to mean.