acorn-io / mongodb-atlas

0 stars 2 forks source link

Deploying multiple Atlas MongoDB services with no service args results in only 1 DB instance to be created. #13

Closed sangee2004 closed 11 months ago

sangee2004 commented 11 months ago

Steps to reproduce the problem:

  1. Deploy Atlas MongoDB services (and consuming app) without overriding any service args - acorn run -n mytest1 . This results in a new DB cluster created.
  2. Deploy another Atlas MongoDB services (and consuming app) without overriding any service args - - acorn run -n mytest2 This results in a the DB cluster created in step1 being used for this service.

Expected Behavior: Deploying Atlas MongoDB services with no service args should always result in a new DB cluster being created with unique cluster name.

Note - Deleting one of the services (say mytest1) results in deleting the Mongo DB cluster resulting in consuming apps of other services ( mytest2) getting DB access errors.

pymongo.errors.ServerSelectionTimeoutError: ac-erzkk2t-shard-00-00.tnkadwr.mongodb.net:27017: [Errno -2] Name or service not known,ac-erzkk2t-shard-00-02.tnkadwr.mongodb.net:27017: [Errno -2] Name or service not known,ac-erzkk2t-shard-00-01.tnkadwr.mongodb.net:27017: [Errno -2] Name or service not known, Timeout: 30s, Topology Description: <TopologyDescription id: 6578a6d26c4429854473be5d, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('ac-erzkk2t-shard-00-00.tnkadwr.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('ac-erzkk2t-shard-00-00.tnkadwr.mongodb.net:27017: [Errno -2] Name or service not known')>, <ServerDescription ('ac-erzkk2t-shard-00-01.tnkadwr.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('ac-erzkk2t-shard-00-01.tnkadwr.mongodb.net:27017: [Errno -2] Name or service not known')>, <ServerDescription ('ac-erzkk2t-shard-00-02.tnkadwr.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('ac-erzkk2t-shard-00-02.tnkadwr.mongodb.net:27017: [Errno -2] Name or service not known')>]>
cloudnautique commented 11 months ago

Should be resolved. Please retest off main.

sangee2004 commented 11 months ago

We are able to deploy multiple MongoDB service with no service args. Every service deployment gets a new cluster gets a unique cluster Name .