Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redpanda startup fails to parse config after setting "redpanda.delete_retention_ms" to "null" using rpk #4169

Open
larsfroelich opened this issue Apr 1, 2022 · 3 comments
Labels

Comments

@larsfroelich
Copy link

larsfroelich commented Apr 1, 2022

Version & Environment

  • Redpanda version: v21.11.11 (rev ace82c7)
  • Operating System: Ubuntu 20.04.4 LTS

What went wrong?

After setting "redpanda.delete_retention_ms" to "null" using rpk, redpanda fails to startup with a parsing error application.cc:203 - Failure during startup: YAML::TypedBadConversion<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > > (yaml-cpp: error std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > > (yaml-cpp: error at line 10, column 24: bad conversion)

What should have happened instead?

The redpanda.delete_retention_ms in /etc/redpanda/redpanda.yaml should be modified to value null (without quotation marks)

How to reproduce the issue?

  1. Install redpanda as per docs
  2. run sudo rpk config set redpanda.delete_retention_ms null
  3. run systemctl restart redpanda

JIRA Link: CORE-878

@larsfroelich larsfroelich added the kind/bug Something isn't working label Apr 1, 2022
@jcsp
Copy link
Contributor

jcsp commented Apr 4, 2022

delete_retention_ms is not nullable, so the bug here is that it's allowed to be set to null at all.

In 22.1, there is a new configuration system (this would be set with "rpk cluster config set delete_retention_ms", which will properly prevent setting a value of the wrong type. However, this ticket makes me think we should also be improving rpk's "config set" command, which currently lets users set absolutely any value they like in the redpanda.yaml file (#4176)

@larsfroelich
Copy link
Author

retention_bytes has a default value of null according to docs, so I wonder if the same parsing-error occurs there as well after setting it to null using sudo rpk config set redpanda.retention_bytes null (unable to test this at the moment)

@jcsp
Copy link
Contributor

jcsp commented Apr 5, 2022

retention_bytes is nullable, delete_retention_ms is not. So null should work for retention_bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants