Specify readPreferences in connection url to allow reading from a secondary
when the primary becomes unavailable.
This commit is contained in:
@@ -17,12 +17,12 @@ os_tenant_name = {{ admin_tenant_name }}
|
||||
os_username = {{ admin_user }}
|
||||
os_password = {{ admin_password }}
|
||||
[database]
|
||||
{% if db_replset: %}
|
||||
connection = mongodb://{{ db_host }}/{{ db_name }}
|
||||
{% if db_replset: -%}
|
||||
connection = mongodb://{{ db_host }}/{{ db_name }}?readPreference=primaryPreferred
|
||||
mongodb_replica_set = {{ db_replset }}
|
||||
{% else %}
|
||||
{% else -%}
|
||||
connection = mongodb://{{ db_host }}:{{ db_port }}/{{ db_name }}
|
||||
{% endif %}
|
||||
{% endif -%}
|
||||
[publisher_rpc]
|
||||
metering_secret = {{ metering_secret }}
|
||||
[keystone_authtoken]
|
||||
|
||||
Reference in New Issue
Block a user