Use prim/backup logic for HAProxy reads
Do not perform round-robin for reads but stick to the same
policy used for the writes.
This is needed because otherwise the round-robin on the read calls
would cause the instance that isn't up-to-date to render part of
the results, with the effect of an inconsistent user-experience.
Change-Id: I6c6aeba767bbb246112f40b2a242d2a15fac40d2
diff --git a/setup_local_env/haproxy-config/haproxy.cfg b/setup_local_env/haproxy-config/haproxy.cfg
index 8afce07..94b22d8 100644
--- a/setup_local_env/haproxy-config/haproxy.cfg
+++ b/setup_local_env/haproxy-config/haproxy.cfg
@@ -44,7 +44,7 @@
option httpchk GET /config/server/healthcheck~status HTTP/1.0
http-check expect status 200
server node1 $HA_GERRIT_SITE1_HOSTNAME:$HA_GERRIT_SITE1_HTTPD_PORT check inter 10s
- server node2 $HA_GERRIT_SITE2_HOSTNAME:$HA_GERRIT_SITE2_HTTPD_PORT check inter 10s
+ server node2 $HA_GERRIT_SITE2_HOSTNAME:$HA_GERRIT_SITE2_HTTPD_PORT check inter 10s backup
backend write-backendnodes
mode http