Repository navigation
fix(master): reject revoked nodes after long-poll wake - #440
Open
Floating-Y wants to merge 1 commit into
Open
Floating-Y wants to merge 1 commit into
Floating-Y wants to merge 1 commit into
Conversation
Signed-off-by: danwood <118035379+Floating-Y@users.noreply.github.com>
This branch has not been deployed
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.
A node revoked while its idle poll was held could resume after certificate validation, mark itself connected again, and proceed to command dispatch.
Make the health UPDATE conditional on
revoked=0and have shareddiffreturn 403 when no node is updated. The check runs at the shared state write, so a resumed poll cannot reconnect a revoked node or reachtake_execs. The listening-node driver already propagates the same error.Add identity regression coverage using an explicit oneshot signal after the request enters its hold, without fixed sleeps. Assert that the held and subsequent polls return 403, the node stays offline, and ordinary automatic placement returns 503 when it is the only candidate. Keep a healthy-node control that wakes and receives a Create command. Extend state coverage for rejected revoked reports and health updates after certificate registration.
Validation:
cargo test -p sandstorm-core --test node_identity --test master_api --test listen_mode: 87 passed (13 identity, 68 master API, 6 listening mode).cargo test -p sandstorm-core --lib state::tests: 24 passed.cargo test -p sandstorm-core --lib master::drive: 2 passed.cargo fmt --all --checkand diff whitespace checks passed.Linux tests ran in WSL Ubuntu. The full repository suite was not run. A zero-row health update, including an unregistered node, now returns 403.