fix: scope storage-node cluster status updates to the node's cluster - #1253
Merged
Conversation
set_node_unreachable, set_node_schedulable and set_node_down called update_cluster_status(cluster_id) where `cluster_id` was not a parameter or a local but a module global, left behind by the monitor's top-level loop as it iterated clusters. Those three functions run on the per-node worker threads started by loop_for_node, so on a management plane serving more than one cluster they read whichever cluster the main loop happened to be on at that instant: a node going unreachable in cluster A could drive a status recalculation for cluster B, and which one it hit depended on thread timing. Each node already carries its own cluster_id, and line 1042 in this same file already used it. Use it at the other three sites too.
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.
set_node_unreachable,set_node_schedulableandset_node_downcalledupdate_cluster_status(cluster_id)wherecluster_idwas not a parameter or a local but a module global, left behind by the monitor's top-level loop as it iterated clusters.Those three functions run on the per-node worker threads started by loop_for_node, so on a management plane serving more than one cluster they read whichever cluster the main loop happened to be on at that instant: a node going unreachable in cluster A could drive a status recalculation for cluster B, and which one it hit depended on thread timing.
Each node already carries its own cluster_id, and line 1042 in this same file already used it. Use it at the other three sites too.