Merge "database script refactor"
authorshuai chen <chenshuai@huawei.com>
Tue, 8 Dec 2015 11:36:59 +0000 (11:36 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Tue, 8 Dec 2015 11:36:59 +0000 (11:36 +0000)
1  2 
deploy/adapters/ansible/roles/ha/templates/haproxy.cfg

@@@ -20,11 -20,24 +20,24 @@@ default
      timeout http-request 10s
      timeout queue 1m
      timeout connect 10s
 -    timeout client 6m
 -    timeout server 6m
 +    timeout client 50s
 +    timeout server 50s
      timeout check 10s
 -    retries 5
 +    retries 3
  
+ listen  proxy-mysql
+     bind {{ internal_vip.ip }}:3306
+     option tcpka
+     option tcplog
+     balance source
+ {% for host, ip in haproxy_hosts.items() %}
+ {% if loop.index == 1 %}
+     server {{ host }} {{ ip }}:3306 weight 1 check inter 2000 rise 2 fall 5
+ {% else %}
+     server {{ host }} {{ ip }}:3306 weight 1 check inter 2000 rise 2 fall 5
+ {% endif %}
+ {% endfor %}
  listen  proxy-glance_registry_cluster
      bind {{ internal_vip.ip }}:9191
      bind {{ public_vip.ip }}:9191