redpanda-data / redpanda-data/redpanda
Improve redpanda validation error for unset advertised addresses
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.6k
- Forks
- 792
- PR merge metrics
- No merged PRs in 30d
Description
Who is this for and what problem do they have today?
If a user has a redpanda.yaml with no advertised addresses configured but the listeners set to 0.0.0.0:
# redpanda.yaml
redpanda:
rpc_server:
address: 0.0.0.0
port: 33145
kafka_api:
- address: 0.0.0.0
port: 9092
Redpanda will fail to start with the following logs:
WARN 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:763 - Node property 'advertised_kafka_api' validation error: listener '' improperly configured with ADDR_ANY (0.0.0.0)
WARN 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:763 - Node property 'advertised_rpc_api' validation error: listener '' improperly configured with ADDR_ANY (0.0.0.0)
INFO 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:433 - Shutdown complete.
ERROR 2024-02-16 12:40:47,313 [shard 0:main] main - application.cc:459 - Failure during startup: std::invalid_argument (Validation errors in node config)
The errors mention advertised_kafka_api and advertised_rpc_api to be set to ADDR_ANY (0.0.0.0) even if the configuration file does not set these properties.
What are the success criteria?
To warn the user that Redpanda sets the advertised addresses to the listener addresses when the advertised address is not set. Hence the error message.
Why is solving this problem impactful?
Better UX when facing this error, since 0.0.0.0 is a valid value for a listener, but not for an advertised address.
Additional notes
Original issue: https://github.com/redpanda-data/redpanda/issues/12395
JIRA Link: CORE-1791
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the validation for the advertised_kafka_api and advertised_rpc_api node properties, then trace how unset advertised addresses inherit listener addresses. Update the validation message to explain that 0.0.0.0 is valid for listeners but not advertised addresses, and verify the reported configuration produces the clearer warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100