rjgoyln opened a new pull request, #11049:
URL: https://github.com/apache/ozone/pull/11049

   ## What changes were proposed in this pull request?
   
   The colon-delimited SCM Ratis role string is a wire format with four 
independent readers — the JMX view behind the SCM web UI, `ozone admin scm 
roles`, leader detection in `ozone admin safemode status`, and Recon's snapshot 
download — and none of them own it. HDDS-15774 made the encoding and the shared 
parser IPv6-safe but left most of those readers untested, and the JMX view, 
which reorders the fields, had no test at all. A change to the encoding today 
shifts its columns and breaks leader selection silently, surfacing as a runtime 
failure in an IPv6 deployment rather than as a test failure.
   
   This pins the format and covers each reader. The producer's output is 
asserted verbatim instead of being round-tripped through the parser, which is 
what actually holds the brackets and the field order in place; the DNS case 
asserts only the fields the encoding owns, so it does not depend on what the 
name resolves to. The existing IPv6 table test moves from substring matching to 
pinning every column. Both leader-detection readers also get the empty entry 
the producer emits for an addressless peer, since they diverge sharply on it.
   
   No behaviour changes. `SafeModeCheckSubcommand.findLeaderNode` was 
unreachable from a test because the subcommand builds its own `ScmClient`, so 
it now takes the node list as a parameter rather than reading the field, and 
the stateless `matchesAddress` becomes static with it.
   
   Two things are left for reviewers to weigh: `findLeaderNode` now reads only 
other objects' data and arguably belongs beside `SCMNodeInfo`, and the 
positional `String[]` indexing remains the underlying awkwardness — HDDS-15774 
raised a structured representation as the alternative, which this JIRA scopes 
out.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16138
   
   ## How was this patch tested?
   
   Unit tests only: `TestSCMRatisServerImpl`, 
`TestStorageContainerManagerRatisRoles` (new), 
`TestGetScmRatisRolesSubcommand`, `TestSafeModeCheckSubcommand` (new), 
`TestStorageContainerServiceProviderImpl`. Checkstyle, RAT and SpotBugs are 
clean across the three modules touched.
   
   Generated-by: Claude Code (Opus 5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to