[
https://issues.apache.org/jira/browse/KAFKA-19595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18013377#comment-18013377
]
Francis Godinho commented on KAFKA-19595:
-----------------------------------------
Hi [~proggga], I'm new to contributing to Kafka and this sounds like a fun,
open-ended problem that isn't blocking much. Do you think I could take a stab
at it?
> Add configuration validation option to Kafka server startup
> -----------------------------------------------------------
>
> Key: KAFKA-19595
> URL: https://issues.apache.org/jira/browse/KAFKA-19595
> Project: Kafka
> Issue Type: New Feature
> Components: core
> Reporter: Mikhail Fesenko
> Priority: Minor
>
> *Problem Statement:* Currently, Kafka administrators have no way to validate
> server configuration files without actually starting the Kafka broker. This
> leads to:
> * Wasted time during deployments when configuration errors are discovered
> only at startup
> * Potential service disruptions in production environments
> * Difficulty in CI/CD pipelines to validate Kafka configurations before
> deployment
> * No quick way to test configuration changes without full broker startup
> overhead
> * *Critical cluster stability issues during rolling restarts* -
> misconfigured brokers can cause:
> ** Partition leadership imbalances
> ** Replication factor violations
> ** Network connectivity issues between brokers
> ** Data consistency problems
> ** Cascading failures across the cluster when multiple brokers restart with
> incompatible configurations
> *Proposed Solution:* Add a {*}--check-config{*}{{{}{}}} command-line option
> to the Kafka server startup script that would:
>
> * Parse and validate the server configuration file
> * Check for common configuration errors and inconsistencies
> * Validate property values and ranges
> * *Detect configuration incompatibilities that could affect cluster
> operations*
> * Support property overrides for testing different configurations
> * Exit with appropriate status codes (0 for valid config, non-zero for
> errors)
> * Provide clear error messages for invalid configurations
> *Usage Example:*
> {code:java}
> # Validate default server.properties
> kafka-server-start.sh --check-config config/server.properties
> # Validate with property overrides
> kafka-server-start.sh --check-config config/server.properties --override
> broker.id=1,log.dirs=/tmp/kafka-logs {code}
>
> *Expected Benefits:*
> * Faster feedback loop for configuration changes
> * Reduced deployment failures due to configuration issues
> * Better integration with automated deployment pipelines
> * Improved operational efficiency for Kafka administrators
> * *Prevention of cluster-wide issues during rolling restarts and maintenance*
> * *Early detection of configuration drift across cluster nodes*
> * *Reduced risk of data loss or corruption from misconfigured brokers*
> * Consistent validation logic with the actual server startup process
> *Acceptance Criteria:*
> *
> --check-config{{}} command-line option to trigger config validation mode
> * Comprehensive validation of server properties
> * Clear error reporting with specific issues identified
> * Support for property overrides during validation
> * Exit codes that can be used in scripts and automation
> * Documentation and usage examples
> This feature would significantly improve the operational experience for Kafka
> deployments and reduce configuration-related issues in production
> environments, especially in multi-broker cluster scenarios where
> configuration consistency is critical.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)