Repository navigation
fix(relay): check clock skew on every cell production.tfvars declares - #28786
Merged
nwparker merged 3 commits intoOct 16, 2026
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Thanks @zanmlakar. I merged current main into this branch and added the new test to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Once an hour, a job checks that every relay server's clock is right, because a wrong clock once broke connections for everyone on that server. The job had a hard-coded list of servers 1 to 22, but there are now 35, so 13 of them were never checked, including all the Asia ones. Now the job reads the server list from the same config file that defines the servers, so a new server gets checked from its first run.
What Changed
c1toc22(seq 1 22). Cells c23 to c35 were never probed, and the run still passed.cloud/infra/terraform/environments/production.tfvars. It then reads everyhostnamein the file'srelay_gce_cellsblock, which is the same block Relay Ops'relayOpsCellsFromTerraformreads. Today that gives c1 to c35. Fenced cells stay in the list as before. They log "not serving" and are named, not judged.read no relay cells from production.tfvars; monitor blind. Before, it would have passed without checking anything.Why
Details are in #28775. To be clear about the stakes: since #10474, current desktops accept 30 s of host-proof clock skew, so a drift like the one in the August incident wouldn't break them today. But this monitor is still the only thing that measures relay clocks, and its 2 s alarm can't warn about cells it never probes.
Alternatives considered:
awkcan read from the file Relay Ops parses.hostname = "c…": this gives the same result today, but scoping it torelay_gce_cellskeeps it in step with what Relay Ops reads if another block ever declares a hostname.Linked Issue
Fixes #28775
Visual Proof
N/A. This changes a scheduled cloud operations workflow and adds a test; there's no UI or app behavior change.
Testing
New test:
cloud/dev/scripts/relay-clock-skew-monitor-workflow.test.mjstakes the measuring step's script out of the workflow and runs it withbash, using the realproduction.tfvarsand a stubcurl. It checks that the step probes exactly the cells the file declares, in order. It checks that the step fails when the file is missing or the block is empty. It also checks that the checkout fetches the file the step reads. All 3 tests pass. Againstmain's workflow, all 3 fail.Parser: the
awkreads c1 to c35 frommain'sproduction.tfvarsunder bothmawkandgawk.CI coverage: Cloud Verify won't run the new test until test(cloud): run every cloud script test by glob and fix the staging deploy-arguments test #28785 lands, because
cloud/package.jsoncurrently lists its test files by hand. Once that lands, it picks up the new test automatically.Not tested: the monitor itself against the live cells. It only runs on its hourly schedule or by manual dispatch, only when
ORCA_CLOUD_OPERATIONS_ENABLEDis set, and a fork can't dispatch it.Platforms: Linux only. The workflow runs on
ubuntu-latest.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Written with Claude Code (Claude Opus 5.5).
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)