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

Setting a getLastErrorModes write concern value in the replset config breaks the operator #1759

Open
clrxbl opened this issue Dec 18, 2024 · 0 comments
Labels

Comments

@clrxbl
Copy link

clrxbl commented Dec 18, 2024

Report

When you set config.settings.getLastErrorModes in the replicaset config to something containing a write concern, the operator does not handle this properly and marks the cluster as unhealthy.

More about the problem

Error: failed to update config members: get replset config: failed to decode to replSetGetConfig: error decoding key config.settings.getLastErrorModes.EnsureGlobal.region: cannot decode 32-bit integer into a string type

Steps to reproduce

conf = rs.conf()
conf.settings.getLastErrorModes = { EnsureGlobal: { "region": 1 }}
rs.reconfig(conf)

A custom write concern requires an integer to be set, but the operator tries to parse it as string. It is not possible as a workaround to set it as string, as MongoDB refuses to apply this change

MongoServerError[InvalidReplicaSetConfig]: Expected getLastErrorModes.EnsureGlobal.region to be a number, not string

Versions

Kubernetes 1.31.1+k3s1
Operator 1.18.0
MongoDB 7.0.15-9

Anything else?

No response

@clrxbl clrxbl added the bug label Dec 18, 2024
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

1 participant