c13fb6f93e
When a primary MongoDB node fails over to a secondary, pymongo raises an AutoReconnect error. Let's catch that and retry the operation so that we truly are Highly Available (in the sense that the user will never notice the few ms of "downtime" caused by a failover). This is particularly important when hosting backend with a DBaaS that routinely fails over the master as a way of compacting shards. NOTE: In order to get all MongoDB tests green, a tiny unrelated bug in test_shards was fixed as part of this patch. Closes-Bug: 1214973 Change-Id: Ibf172e30ec6e7fa0bbb8fdcebda9e985d1e49714
16 lines
257 B
Plaintext
16 lines
257 B
Plaintext
[DEFAULT]
|
|
debug = False
|
|
verbose = False
|
|
|
|
[drivers]
|
|
transport = wsgi
|
|
storage = mongodb
|
|
|
|
[drivers:transport:wsgi]
|
|
port = 8888
|
|
|
|
[drivers:storage:mongodb]
|
|
uri = mongodb://127.0.0.1:27017
|
|
database = marconi_test
|
|
max_reconnect_attempts = 3
|
|
reconnect_sleep = 0.001 |