Use ports websocket URI for haproxy healthcheck 29/77229/6
authorJamo Luhrsen <jluhrsen@redhat.com>
Tue, 23 Oct 2018 18:36:21 +0000 (11:36 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Thu, 25 Oct 2018 18:30:39 +0000 (11:30 -0700)
port 8185 is up and listening even before the neutron
data path is registered, so just checking on the port
is not enough.

reducing timeouts and retry counts/intervals to detect
failures faster to enable quicker switchovers

also, checking on /diagstatus from port 8181 is not
helping much either, since that also will tell us
nothing about whether the websocket is going to work
for networking_odl.

JIRA:NETVIRT-1460
Change-Id: Ie37f7a68f1d4785a7037f1490293bfb618de7bab
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
jjb/integration/integration-deploy-openstack-run-test.sh

index d9d9c3dbe3c03f86c6d83a6ead695789890f072f..c76232214c69016563e15e66d5d256c06ec03a40 100644 (file)
@@ -476,15 +476,13 @@ defaults
   retries  3
   timeout  http-request 10s
   timeout  queue 2m
-  timeout  connect 10s
-  timeout  client 2m
-  timeout  server 2m
-  timeout  check 10s
+  timeout  connect 5s
+  timeout  client 5s
+  timeout  server 5s
 
 listen opendaylight
   bind ${haproxy_ip}:8181 transparent
   mode http
-  balance source
   http-request set-header X-Forwarded-Proto https if { ssl_fc }
   http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
   option httpchk GET /diagstatus
@@ -502,17 +500,14 @@ EOF
 listen opendaylight_ws
   bind ${haproxy_ip}:8185 transparent
   mode http
-  balance source
-  timeout connect 5s
-  timeout client 25s
-  timeout server 25s
   timeout tunnel 3600s
-  option httpchk GET /diagstatus
+  option httpchk GET /data-change-event-subscription/neutron:neutron/neutron:ports/datastore=OPERATIONAL/scope=SUBTREE HTTP/1.1\r\nHost:\ ws.opendaylight.org\r\nConnection:\ Upgrade\r\nUpgrade:\ websocket\r\nSec-WebSocket-Key:\ haproxy\r\nSec-WebSocket-Version:\ 13\r\nSec-WebSocket-Protocol:\ echo-protocol
+  http-check expect status 101
 EOF
 
     odlindex=1
     for odlip in ${odl_ips[*]}; do
-        echo "  server opendaylight-ws-${odlindex} ${odlip}:8185 check port 8181 fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg
+        echo "  server opendaylight-ws-${odlindex} ${odlip}:8185 check fall 3 inter 1000 rise 2" >> ${WORKSPACE}/haproxy.cfg
         odlindex=$((odlindex+1))
     done