Repository navigation
fix: deflake //rs/tests/node:ipv4_integration_test by stopping ic-replica before the crypto vault - #11874
Merged
Conversation
…lica before the crypto vault The node re-registration scripts stopped ic-crypto-csp before ic-replica. The orchestrator's vault client then reconnected about 100 ms later and socket-activated a new vault, which could load the old key files before they were deleted. The node came back with its old node ID, its one-time registration check passed against a stale local registry, and the test timed out waiting for registry version 4. Stop ic-replica first, then the vault's socket and service, and assert that the node registers with a new node ID. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes address the restart race and strengthen registration checks, with no unresolved findings.
0 open findings
What changed in this PR
Fixes a node re-registration race in system tests by preventing the crypto vault from restarting with old keys.
Changes:
- Stop
ic-replicabefore stopping the vault socket and service. - Restart the vault after deleting keys.
- Assert that re-registration produces a new node ID.
| File | Description |
|---|---|
| rs/tests/node/ipv4_integration_test.rs | Corrects shutdown order and checks the new node ID. |
| rs/tests/consensus/node_registration_test_common/src/lib.rs | Applies the same safeguards to shared node-registration tests. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
pierugo-dfinity
approved these changes
Oct 16, 2026
pierugo-dfinity
left a comment
Contributor
There was a problem hiding this comment.
Sounds good thanks
basvandijk
enabled auto-merge
October 16, 2026 12:56
Bownairo
approved these changes
Oct 16, 2026
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.
ipv4_integration_test_head_nns_localflaked on #11744 after removing its unassigned node and letting it register itself again: the registry stayed at version 3 until the 180 s timeout. The cause is a race in the test's re-registration script that already exists on master:ic-crypto-csp(the crypto vault) beforeic-replica(the orchestrator). The vault is socket-activated, and the orchestrator's vault client reconnects about 100 ms after losing its connection. If the orchestrator is still alive at that point, the reconnect starts a new vault, which can read the oldpublic_keys.pbandsks_data.pbbefore the script deletes them.On master the vault was started again this way in 4 of 223
_localattempts (2026-10-02..16). A failure also needs the new vault to read the key files before therm. The same timeout failed 4 Farm runs in Jan–Mar 2026.The fix changes both scripts that use this pattern:
ipv4_integration_testandnode_registration_test_common, which the two node registration tests share.ic-replicafirst, thenic-crypto-csp.sockettogether withic-crypto-csp.service. No vault client is left to reconnect, and the closed socket cannot start the vault before the keys are deleted. Start the socket and the service again afterwards.node_registration_with_node_allowance_test_local.Verification, with local
_localruns:sleep 0.3between the two stops, which forces the reconnect, failed 2 of 2 runs with the flake's signature: the old node ID and a timeout at registry version 3.ipv4_integration_test_local,ipv4_integration_test_head_nns_local,node_registration_with_node_allowance_test_localandnode_registration_with_max_rewardable_nodes_test_localpassed, and each node registered with a new ID.Labelled
CI_ALL_BAZEL_TARGETSso that CI runs these system tests:ipv4_integration_testis along_test.🤖 Generated with Claude Code