Issues

Select view

Select search mode

 
50 of

MongoDB operator overwrites ten MongoDB configurations

Description

Describe the bug
The MongoDB operator overwrites some parameters in the user provided MongoDB configuration, causing them to be ineffective.
Each unique configuration parameter has a unique root cause. We wanted to report the enumeration of the overwritten configuration parameters, each with their corresponding root cause.

Properties that do not take effects

  1. net.bindIpAll: This property cannot be disabled as it is always enabled by the operator when creating containers using --bind_ip_all argument

  2. net.bindIP: This property does not take effect as it is overwritten by --bind_ip_all as well.

  3. net.port: The port is always set to 27017 as it is hard-coded by the operator

  4. net.tls.allowInvalidCertificates: The operator expose another property, spec.tls.allowInvalidCertificates, to enable or disable this feature and it has a default value of true. Even if user does not provided spec.tls.allowInvalidCertificates and want to configure the cluster with the configuration file, the operator will add a flag to enable this feature based on the default value causing the overwritten behaviour.

  5. net.tls.mode: Same as last property, the operator expose another property spec.tls.mode. The operator always overwrites the mode using the default value when user does not set spec.tls.mode and wants to use configuration file to configure the cluster.

  6. security.clusterAuthMode: This property is overwritten and is always x509 if user does not provide spec.tls in CR interface and only specifies the configurations in the configuration file.

  7. security.authorization: After user set authorization to disabled, it does not take effect.

  8. storage.dbPath: This property is overwritten by the operator using a hard-coded path

  9. storage.engine: This property is always overwritten by the default value of spec.replset.storage.engine (the default value is wiredTiger).

  10. storage.engine.indexConfig.prefixCompression: This property is overwritten by the flag created using the default value of spec.relpset.storage.wiredTiger.indexConfig.prefixCompression (the default value is true).

To Reproduce

  1. Deploy a MonogDB cluster, for example:

  1. add the configuration contains properties listed above, for example:

  1. exec into container and check the runtime configuration by using db.adminCommand({getCmdLineOpts: 1})

Expected behavior
We expect that the configurations specified in spec.replset.configuration take effect if we do not provide values for the corresponding properties in the CR interface (e.g. spec.replset.storage.engine).

Current behavior
Some properties set in the configuration file are overwritten and do not take effect due to the default values of their corresponding properties exposed in CR interface by the operator.

Desktop (please complete the following information):

  • OS: Ubuntu

  • Reproduced on latest release v1.18.0

Environment

None

Details

Assignee

Reporter

Needs QA

Yes

Priority

Smart Checklist

Created yesterday
Updated yesterday

Activity

Show:

Flag notifications