fix(confluent): configure nodes named explicitly without a console method - #7714
Open
viniciusferrao wants to merge 2 commits into
Open
fix(confluent): configure nodes named explicitly without a console method#7714viniciusferrao wants to merge 2 commits into
viniciusferrao wants to merge 2 commits into
Conversation
…thod preprocess_request skips any node whose nodehm entry has neither cons nor serialport. That is the right default while scanning the whole table, but it also drops nodes the administrator named on the command line, leaving the dispatched node list empty. makeconfluentcfg then falls back to reading every node, so naming one console-less node quietly configures the whole cluster instead of the node that was asked for. A named node with no nodehm row at all is worse: both the selection here and the second lookup in makeconfluentcfg produce an undefined entry, which reaches confluent as an empty node name. Apply the skip only to the full table scan, and carry the node name through both lookups when the nodehm row is missing. Nodes without a console method are already handled downstream, where makeconfluentcfg keeps explicitly named entries and donodeent falls back to hardware management credentials. Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
Exercise the node-selection block from preprocess_request and the lookup adjustment from makeconfluentcfg directly, both extracted from the shipped plugin, with a stand-in nodehm table. Assert that an explicitly named node is configured whether it has no console attributes or no nodehm row at all, that neither lookup can emit an empty node name, and that the full table scan still skips console-less nodes so an entire cluster is not swept into confluent. That last group is what separates this from simply removing the skip, and it fails if the skip is dropped outright.
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.
preprocess_requestskips any node whose nodehm entry has neitherconsnorserialport. That is the right default while scanning the whole table, but it also drops nodes named on the command line, leaving the dispatched node list empty.makeconfluentcfgthen falls back to reading every node, so naming one console-less node quietly configures the whole cluster instead of the node that was asked for.A named node with no nodehm row at all is worse: both the selection here and the second lookup in
makeconfluentcfgproduce an undefined entry, which reaches confluent as an empty node name.Apply the skip only to the full table scan, and carry the node name through both lookups when the nodehm row is missing. Nodes without a console method are already handled downstream, where
makeconfluentcfgkeeps explicitly named entries anddonodeentfalls back to hardware management credentials.Verified against confluent 3.15.6 on an AlmaLinux 9.8 management node running xCAT 2.18.2. On the unpatched plugin,
makeconfluentcfgon a console-less node configures a different, console-capable node; patched, it configures the node that was named. A node with no nodehm row previously failed with"" is not a valid node nameand is now configured under its own name. A full scan still configures only the console-capable node.Recovered from the unmerged lenovobuild branch (897b224). The original removed the skip outright, which also changes the full-scan path and would sweep every console-less node in the cluster into confluent, so the skip is gated on that path instead.