Repository navigation
Conversation
scontrol update printed only "node update failed" and dropped the message of the gRPC status. An administrator could not see why the controller refused the update.
pre
requested review from
biluriuday,
sajmera-pensando,
sgopinath1,
shiv-tyagi and
yansun1996
as code owners
October 3, 2026 07:14
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #992 +/- ##
=======================================
Coverage 83.01% 83.01%
=======================================
Files 216 216
Lines 121503 121515 +12
=======================================
+ Hits 100854 100868 +14
+ Misses 20649 20647 -2 🚀 New features to boost your workflow:
|
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.
Related:
Fixes #990
What this fixes
When spurctld refuses a node update,
scontrol update nodename=...printed onlynode update failed. The CLI dropped the message from the gRPC status, so the administrator had to read the controller log to find the cause.Approach
update_nodenow adds the status message to its error, so the CLI printsnode update failed: <reason>. It usesStatus::message()and not theDisplayoutput oftonic::Status, because that output also has the status code and quoting.Testing
A new unit test makes the mock controller refuse an update. It checks that the error from
update_nodecontains the controller reason.cargo fmt --check,cargo clippy --workspace --exclude spur-ffi --all-targets --lockedandcargo test --lockedpassed with no warnings: 4581 passed, 0 failed, 35 ignored.I ran these commands on a single-node cluster in two cycles:
dcce7c7scontrol update nodename=nosuch state=drain reason=terror: nosuch: node update failederror: nosuch: node update failed: node nosuch not foundscontrol update nodename=nosuch,<node> state=bogusunknown node state 'bogus' ...