redpanda-data / redpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!
https://redpanda.com
9.7k stars 591 forks source link

Developer Experience (DX) improvements #12431

Open c4milo opened 1 year ago

c4milo commented 1 year ago

DX Improvement 1

When trying to start Redpanda with:

/usr/bin/rpk redpanda start --check false --abort-on-seastar-bad-alloc --dump-memory-diagnostics-on-alloc-failure-kind=all --overprovisioned --smp 1 --node-id 0 --default-log-level=info --config local/redpanda.yml

one gets the following error:

main - cli_parser.cc:46 - Argument parse error: too many positional options have been specified on the command line

From the error, it is unclear how a user is supposed to quickly resolve the problem.

DX Improvement 2

A redpanda.yml configuration is provided with wrong values in some of the properties. The error returned back is the following:

application.cc:670 - Node property 'advertised_kafka_api' validation error: Invalid value: YAML::TypedBadConversion<model::broker_endpoint> (yaml-cpp: error at line 32, column 11: bad conversion)

From the error, it is unclear the value Redpanda tried to parse. In container environments, it takes extra steps to preserve the rendered configuration file placed inside a container that's in a crash loop. Printing the configuration value or the entire configuration file can help people to quickly troubleshoot what's wrong.

Who is this for and what problem do they have today?

People new to Redpanda trying to get started

What are the success criteria?

Why is solving this problem impactful?

JIRA Link: CORE-1379

SteveLauC commented 1 week ago

Hi, I am hitting the first issue! I would like to know can we fix the issue, thanks!

And, when I started it with rpk redpanda start --redpanda-cfg /etc/redpanda/redpanda.yaml -c=1 --cpuset=1 --memory=1G, it gave me:

$ rpk redpanda start --redpanda-cfg /etc/redpanda/redpanda.yaml -c=1 --cpuset=1 --memory=1G
WARNING: This is a setup for development purposes only; in this mode your clusters may run unrealistically fast and data can be corrupted any time your computer shuts down uncleanly.
We'd love to hear about your experience with Redpanda:
https://redpanda.com/feedback
Starting redpanda...
Running:
/opt/redpanda/bin/redpanda redpanda --redpanda-cfg /etc/redpanda/redpanda.yaml --unsafe-bypass-fsync=true --reserve-memory=0M --cpuset=1 --redpanda-cfg=/etc/redpanda/redpanda.yaml --c=1 --memory=1G --lock-memory=false --overprovisioned
ERROR  main - cli_parser.cc:46 - Argument parse error: option '--c=1' is ambiguous and matches '--collectd', '--collectd-address', '--collectd-hostname', '--collectd-poll-period', '--cpuset', and '--csum-offload'

It complained that --c=1 was not a valid option, but the option I gave is -c=1 rather than --c=1🤔