Skip to content

Add jws-diag modcluster command: display mod_cluster listener configuration - #22

Merged
dsoumis merged 1 commit into
web-servers:mainfrom
onkar717:feat/modcluster
Aug 14, 2026
Merged

Add jws-diag modcluster command: display mod_cluster listener configuration#22
dsoumis merged 1 commit into
web-servers:mainfrom
onkar717:feat/modcluster

Conversation

@onkar717

@onkar717 onkar717 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds ModClusterParser — standalone DOM scan of server.xml for <Listener className="*ModCluster*"> elements; extracts known attributes and captures unknown ones in an extraAttributes map
  • Adds ModClusterConfig value object with all known mod_cluster listener attributes and their documented defaults (connector, advertise, advertiseGroupAddress, advertisePort, proxyList, balancer, stickySession, stickySessionCookie)
  • Adds modcluster sub-command with --format human|json output
  • Human output: labeled key/value display with explicit vs default provenance; exits with code 2 when no mod_cluster listener is found
  • JSON output: full config object with found: false sentinel when absent
  • Zero changes to existing config model, parser, or command code

Design decisions

  • Standalone DOM scan avoids coupling to the existing ServerXmlParser pipeline; the mod_cluster <Listener> is an infrastructure concern, not a per-<Service> concern
  • extraAttributes map captures forward-compatible unknowns so operator-specific attrs are not silently dropped
  • Defaults match the mod_cluster 1.3/2.x documented defaults so output is always complete even when attrs are omitted from server.xml

Test plan

  • ModClusterParserTest full config fixture, defaults-only fixture, no listener fixture
  • ModClusterHumanFormatterTestgolden snapshot for found / not-found cases
  • ModClusterJsonFormatterTest golden snapshot for found / not-found cases
  • mvn verify passes (391 tests, 0 failures)

@onkar717

Copy link
Copy Markdown
Collaborator Author

@dsoumis

@dsoumis
dsoumis merged commit 90d9864 into web-servers:main Aug 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants