redpanda icon indicating copy to clipboard operation
redpanda copied to clipboard

bootstrap overwrites ports specified in redpanda.yaml

Open patrickangeles opened this issue 3 years ago • 1 comments
trafficstars

Version & Environment

22.2.x

What went wrong?

Steps to reproduce

  1. Edit redpanda.yaml such that redpanda.kafka_api uses a nonstandard port (e.g., 9093)
  2. Run rpm redpanda config bootstrap --id 0 --self <ip>
  3. Look at redpanda.yaml, the Kafka API port will be set to the default (9092)

patrickangeles avatar Sep 21 '22 19:09 patrickangeles

Relevant code: https://github.com/redpanda-data/redpanda/blob/319976aa32ad6b38616e239da83227d494e79e78/src/go/rpk/pkg/cli/cmd/redpanda/config.go#L138

patrickangeles avatar Sep 21 '22 19:09 patrickangeles

I think bootstrap should just refuse to run if the file is already populated -- if the user gets here they're probably confused (they already have a config file, why are they running the command to create one?) and we should give them feedback to tell them "hey, this command doesn't do what you thought"

jcsp avatar Sep 21 '22 20:09 jcsp

That's a good point, agree

twmb avatar Sep 27 '22 03:09 twmb

This has a slightly tricky interaction with rpk redpanda config init; bumping this to 23.1 likely

twmb avatar Oct 23 '22 23:10 twmb

Unfortunately, it seems like we have many defined flows of people first setting a few configuration values, and then bootstrapping the rest: https://github.com/redpanda-data/openmessaging-benchmark/blob/1c9b850ef2f278bef6b6ffcedeb48492abfdbbf9/driver-redpanda/deploy/deploy.yaml#L189-L212 https://github.com/redpanda-data/openmessaging-benchmark/blob/03de634041178d457267db45915f36fe6d1c16ec/driver-redpanda/deploy/certification/configure.base.sh.j2#L5-L27 https://github.com/redpanda-data/deployment-automation/blob/8579fdde423714696881c07dc1ee331652c31ffd/ansible/playbooks/start-redpanda.yml#L29-L39

Although it doesn't look like our documentation recommends this flow, I don't think we can change bootstrap to bail if non-defaults already exist.

twmb avatar Oct 31 '22 19:10 twmb