diff --git a/etc/trove/trove.conf.sample b/etc/trove/trove.conf.sample index 8df5d7dfea..e9a4376f7b 100644 --- a/etc/trove/trove.conf.sample +++ b/etc/trove/trove.conf.sample @@ -241,7 +241,7 @@ volume_support = True device_path = /dev/vdb [mongodb] -tcp_ports = 2500, 27017 +tcp_ports = 2500, 27017, 27019 volume_support = True device_path = /dev/vdb num_config_servers_per_cluster = 1 diff --git a/trove/common/cfg.py b/trove/common/cfg.py index 23e5153513..b3cc2307a9 100644 --- a/trove/common/cfg.py +++ b/trove/common/cfg.py @@ -916,7 +916,7 @@ mongodb_group = cfg.OptGroup( 'mongodb', title='MongoDB options', help="Oslo option group designed for MongoDB datastore") mongodb_opts = [ - cfg.ListOpt('tcp_ports', default=["2500", "27017"], + cfg.ListOpt('tcp_ports', default=["2500", "27017", "27019"], help='List of TCP ports and/or port ranges to open ' 'in the security group (only applicable ' 'if trove_security_groups_support is True).'), diff --git a/trove/guestagent/datastore/experimental/mongodb/service.py b/trove/guestagent/datastore/experimental/mongodb/service.py index bcaf8ad52a..f87b6ba8a0 100644 --- a/trove/guestagent/datastore/experimental/mongodb/service.py +++ b/trove/guestagent/datastore/experimental/mongodb/service.py @@ -256,7 +256,7 @@ class MongoDBApp(object): def add_config_servers(self, config_server_hosts): """Set config servers on a query router (mongos) instance. """ - config_servers_string = ','.join(['%s:27019' % host + config_servers_string = ','.join(['%s:%s' % (host, CONFIGSVR_PORT) for host in config_server_hosts]) LOG.info(_("Setting config servers: %s") % config_servers_string) self.configuration_manager.apply_system_override(