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

Using the flag delete_retention_ms gives error with redpanda cluster configuration. #3082

Closed
singhsneetendra opened this issue Nov 28, 2021 · 9 comments
Labels
area/k8s community kind/bug Something isn't working

Comments

@singhsneetendra
Copy link

singhsneetendra commented Nov 28, 2021

Version & Environment

Redpanda version: v21.10.2 (rev bcc20e8)

Using this as base file to deploy 3 node cluster.
https://github.com/vectorizedio/redpanda/blob/dev/src/go/k8s/config/samples/one_node_cluster.yaml

My redpanda yaml

apiVersion: redpanda.vectorized.io/v1alpha1
kind: Cluster
metadata:
labels:
instance: testing
name: redpanda
namespace: redpanda-cluster
spec:
additionalConfiguration:
redpanda.auto_create_topics_enabled: "true"
redpanda.delete_retention_ms: "604800000"
redpanda.enable_sasl: "false"
redpanda.log_cleanup_policy: delete
configuration:
adminApi:
- port: 9644
developerMode: true
kafkaApi:
- port: 9092
pandaproxyApi:
- port: 8082
rpcServer:
port: 33145
image: vectorized/redpanda
replicas: 3
resources:
limits:
cpu: 1
memory: 1.2Gi
requests:
cpu: 1
memory: 1.2Gi
storage:
capacity: 10Gi
version: latest

value for redpanda.delete_retention_ms: "604800000" fails with error
INFO 2021-11-28 16:12:28,489 [shard 0] redpanda::main - application.cc:324 - Use rpk config set <cfg> <value> to change values below:
INFO 2021-11-28 16:12:28,490 [shard 0] redpanda::main - application.cc:200 - Failure during startup: YAML::TypedBadConversion<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > > (yaml-cpp: error at line 42, column 24: bad conversion)

any value above 950400 throw above error.

@singhsneetendra singhsneetendra added the kind/bug Something isn't working label Nov 28, 2021
@jcsp
Copy link
Contributor

jcsp commented Dec 9, 2021

Trying this with redpanda 21.11.1 (Neetendra mentioned in slack they were also using this version), redpanda itself doesn't seem to have a problem with a config like:

redpanda:
  delete_retention_ms: 604800000

I can see the value getting loaded:

INFO  2021-12-09 13:32:41,084 [shard 0] redpanda::main - application.cc:332 - redpanda.delete_retention_ms:604800000	- delete segments older than this - default 1 week

Seems like something could be going wrong in the operator, although I'm not sure what, as apparently smaller values do get passed through correctly.

@alenkacz
Copy link
Contributor

alenkacz commented Dec 9, 2021

@singhsneetendra can you please paste the part of redpanda logs where it shows the config loaded?

I'll also try to reproduce. Thanks for filing the issue

@singhsneetendra
Copy link
Author

cloud_storage_bucket: nimbus-testing-celerway-com-redpanda-data
cloud_storage_reconciliation_interval_ms: 900
cloud_storage_max_connections: 5
cloud_storage_trust_file: /etc/ssl/certs/ca-certificates.crt
enable_sasl: false
log_segment_size: 536870912
auto_create_topics_enabled: true
delete_retention_ms: 6.048e+08
enable_idempotence: true
enable_transactions: true
log_cleanup_policy: delete

value for delete_retention_ms read as exponential pattern (edited)
redpanda_party
eyes
dancing_chicken

@jcsp
Copy link
Contributor

jcsp commented Dec 10, 2021

Thanks for that @singhsneetendra

Looks like this is an issue on the path through our k8s operator, where the integer setting is getting passed through as a float (and thereby scientific notation) rather than an integer.

Intermediate yaml representations don't distinguish between floats and integers, but redpanda does at the point it loads values.

@singhsneetendra
Copy link
Author

That means there is code fix required in redpanda operator CRD ?
or there is way to specify it in some other way in custom yaml ?

@singhsneetendra
Copy link
Author

@jcsp you view on above comments ?

@jcsp
Copy link
Contributor

jcsp commented Dec 14, 2021

@singhsneetendra it sounds like a code fix is needed in operator, I don't know if there is a way to workaround this and inject a config by hand.

@alenkacz
Copy link
Contributor

@singhsneetendra so I spent some time on this, can you share which version of the operator were you running? I verified with 21.10.2 and also the latest and this is no longer an issue - we already fixed this in the past.

@singhsneetendra
Copy link
Author

@alenkacz , Yes I was running 21.7.* something and the updated version for operator fixed the issue and is working fine.
Thanks for help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/k8s community kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants