MongoDB Configuration Groups

MongoDB Configuration Groups

Launchpad Blueprint:

Problem Description

The MongoDB guestagent currently does not support configuration groups.

Proposed Change

The patch set will implement configuration groups for MongoDB 2.6 and above.

MongoDB 2.6 and above stores its configuration 1 in a YAML ‘mongod.conf’ file. The database service has to be restarted for any changes to the configuration file to take effect. All configuration changes will therefore be requiring database restart and ‘apply_overrides’ will be implemented as no-op.

Overrides will be implemented by replacing the current file with an updated one. The old file will be backed up in the same directory (as *.old) and restored on configuration reset.

The platform-default configuration file will be used as a base for our configuration template. Guest agent interfaces exposing the configuration properties will be made available to other modules such as backup and replication.

Most configuration properties will be available via configuration groups. Some, however, do not make sense in the Trove context.

These would include:

  • irrelevant options (like automatic snapshots, since the Trove user cannot retrieve them)

  • guestagent specific (e.g. file paths, passwords)

  • items that Trove needs to control (replication/clustering properties)

See Available Configuration Properties for the full list of supported options.

The user should be able to specify configurations properties as standard Python YAML objects - key-value pairs and dicts.

Available Configuration Properties

Keys not included in the lists are kept at their default values and are not configurable via Trove. See 1 for more details and default values.

The properties configurable by the user via the Trove API:

  • systemLog.verbosity

  • systemLog.component.accessControl.verbosity

  • systemLog.component.command.verbosity

  • systemLog.component.control.verbosity

  • systemLog.component.geo.verbosity

  • systemLog.component.index.verbosity


  • systemLog.component.query.verbosity

  • systemLog.component.replication.verbosity

  • systemLog.component.sharding.verbosity



  • systemLog.component.write.verbosity

  • systemLog.quiet

  • systemLog.traceAllExceptions

  • systemLog.logAppend

  • systemLog.logRotate

  • systemLog.timeStampFormat

  • net.maxIncomingConnections

  • net.wireObjectCheck

  • net.unixDomainSocket.enabled

  • net.ipv6

  • net.http.enabled

  • net.http.JSONPEnabled

  • net.http.RESTInterfaceEnabled

  • security.sasl.hostName

  • security.sasl.serviceName

  • security.sasl.saslauthdSocketPath

  • security.javascriptEnabled

  • operationProfiling.slowOpThresholdMs

  • operationProfiling.mode

  • storage.indexBuildRetry

  • storage.journal.enabled

  • storage.directoryPerDB

  • storage.syncPeriodSecs

  • storage.engine

  • storage.mmapv1.nsSize

  • storage.mmapv1.quota.enforced

  • storage.mmapv1.quota.maxFilesPerDB

  • storage.mmapv1.smallFiles

  • storage.mmapv1.journal.debugFlags

  • storage.mmapv1.journal.commitIntervalMs

  • storage.wiredTiger.engineConfig.cacheSizeGB

  • storage.wiredTiger.engineConfig.statisticsLogDelaySecs

  • storage.wiredTiger.engineConfig.journalCompressor

  • storage.wiredTiger.engineConfig.directoryForIndexes

  • storage.wiredTiger.collectionConfig.blockCompressor

  • storage.wiredTiger.indexConfig.prefixCompression

  • replication.oplogSizeMB

  • replication.secondaryIndexPrefetch

  • sharding.clusterRole

  • auditLog.format

  • auditLog.filter

  • snmp.subagent

  • snmp.master

  • replication.localPingThresholdMs

  • sharding.autoSplit

  • sharding.configDB

  • sharding.chunkSize

  • setParameter

Non-configurable properties with updated default values:

  • systemLog.path (controlled-by guestagent)

  • systemLog.destination file

  • processManagement.pidFilePath (controlled-by guestagent)

  • processManagement.fork True

  • security.keyFile (controlled-by replication)

  • security.clusterAuthMode (keyFile)

  • security.authorization True

  • storage.dbPath (controlled-by guestagent)

  • replication.replSetName (controlled-by replication)

  • sharding.archiveMovedChunks False

  • auditLog.destination file

  • auditLog.path (controlled-by guestagent)





Public API


Public API Security


Python API

None (empty section added after merging)

CLI (python-troveclient)

None (empty section added after merging)

Internal API

CLI (python-troveclient)

This work will enable the following client commands:

  • configuration-attach

  • configuration-create

  • configuration-default

  • configuration-delete

  • configuration-detach

  • configuration-instances

  • configuration-list

  • configuration-parameter-list

  • configuration-parameter-show

  • configuration-patch

  • configuration-show

  • configuration-update

Guest Agent

  • Update facilities for handling of YAML config files in the operating_system module.

  • Implement API to update_overrides in the manager and service modules.

  • The current configuration template will be updated to the default version for the target platform with changes noted in Available Configuration Properties.

The following existing files will be updated:






Petr Malik <>



Work Items

  1. Implement functionality to handle (read/write/update) MongoDB YAML configuration files.

  2. Implement configuration-related manager API calls.

    def update_overrides(self, context, overrides, remove=False)
    def apply_overrides(self, context, overrides) [no-op]

Upgrade Implications





Unit tests will be added to validate implemented functions and non-trivial codepaths. Relevant integration tests will be added.

Documentation Impact

The datastore documentation should be updated to reflect the enabled features.



Documentation on MongoDB configuration:

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

trove-specs 0.0.1.dev177