anchor.diff:    stats realm Haproxy\ Statistics
     stats auth <%="#{get_config('haproxy-stats-user')}"%>:<%="#{get_config('haproxy-stats-password')}"%>
   
  +listen stats-vip <%="#{node[:bcpc][:management][:vip]}"%>:1936
  +  mode http
  +  server myself <%="#{node[:bcpc][:management][:ip]}"%>:1936
  +
   listen mysql-galera <%="#{node[:bcpc][:management][:vip]}"%>:3306
  +  timeout  client 1h
  +  timeout  server 1h
     mode tcp
     balance leastconn
     option  tcplog
     option tcpka
     option httpchk
   <% @servers.each do |server| -%>
  -  <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:3306 check port 3307 inter 2s rise 2 fall 1 observe layer4" %>
  +  <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:3306 check port 3307 inter 1s rise 1 fall 1 observe layer4" %>
   <% end -%>
   
   listen rabbitmq-amqp <%="#{node[:bcpc][:management][:vip]}"%>:5672
  
positive.code:   balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:55672 check" %>
  <% end -%>
  
  listen elasticsearch <%="#{node[:bcpc][:management][:vip]}"%>:9200
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:9200 check" %>
  <% end -%>
  
  listen kibana <%="#{node[:bcpc][:management][:vip]}"%>:5601
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:5601 check" %>
  <% end -%>
  
  listen keystone-api <%="#{node[:bcpc][:management][:vip]}"%>:5000
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:5000 check" %>
  <% end -%>
  
  listen keystone-admin <%="#{node[:bcpc][:management][:vip]}"%>:35357
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:35357 check" %>
  <% end -%>
  
  listen nova-ec2 <%="#{node[:bcpc][:management][:vip]}"%>:8773
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:8773 check" %>
  <% end -%>
  
  listen nova-compute <%="#{node[:bcpc][:management][:vip]}"%>:8774
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:8774 check" %>
  <% end -%>
  
  listen cinder-api <%="#{node[:bcpc][:management][:vip]}"%>:8776
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:8776 check" %>
  <% end -%>
  
  listen glance-api <%="#{node[:bcpc][:management][:vip]}"%>:9292
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:9292 check" %>
  <% end -%>
  
  listen glance-registry <%="#{node[:bcpc][:management][:vip]}"%>:9191
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:9191 check" %>
  <% end -%>
  
  listen horizon-http <%="#{node[:bcpc][:management][:vip]}"%>:80
    balance  source
    option  tcplog
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:80 check" %>
  <% end -%>
  
  listen horizon-https <%="#{node[:bcpc][:management][:vip]}"%>:443
  
negative.code: defaults
    log  global
    maxconn  8000
    source <%="#{node[:bcpc][:management][:vip]}"%>
    mode  http
    option tcplog
    option dontlognull
    option nolinger
    option  redispatch
    retries  3
    timeout  http-request 10s
    timeout  queue 1m
    timeout  connect 5s
  