Enables websocket based port status for OpenDaylight

Port Status in ODL was previously disabled due to bugs which have now
been resolved.  This patch enables it via Neutron ML2 conf.  Port status
is communicated by ODL through a websocket connection on port 8185.
Therefore we need to enable haproxy to load balance across that port.

Related-Bug: 1718508

Change-Id: Iebdcc6404f5503eeb45b39380b3f198be175514b
Signed-off-by: Tim Rozet <trozet@redhat.com>
This commit is contained in:
Tim Rozet 2017-10-26 22:06:50 -05:00
parent 9b3ff05900
commit bc3feec75f
3 changed files with 24 additions and 2 deletions

View File

@ -738,6 +738,7 @@ class tripleo::haproxy (
nova_novnc_port => 6080,
nova_novnc_ssl_port => 13080,
opendaylight_api_port => 8081,
opendaylight_ws_port => 8185,
panko_api_port => 8977,
panko_api_ssl_port => 13977,
ovn_nbdb_port => 6641,
@ -1487,6 +1488,24 @@ class tripleo::haproxy (
'balance' => 'source',
},
}
::tripleo::haproxy::endpoint { 'opendaylight_ws':
internal_ip => unique([hiera('opendaylight_api_vip', $controller_virtual_ip), $controller_virtual_ip]),
service_port => $ports[opendaylight_ws_port],
ip_addresses => hiera('opendaylight_api_node_ips', $controller_hosts_real),
server_names => hiera('opendaylight_api_node_names', $controller_hosts_names_real),
mode => 'http',
listen_options => {
# NOTE(jaosorior): Websockets have more overhead in establishing
# connections than regular HTTP connections. Also, since it begins
# as an HTTP connection and then "upgrades" to a TCP connection, some
# timeouts get overridden by others at certain times of the connection.
# The following values were taken from the following site:
# http://blog.haproxy.com/2012/11/07/websockets-load-balancing-with-haproxy/
'timeout' => ['connect 5s', 'client 25s', 'server 25s', 'tunnel 3600s'],
'balance' => 'source',
},
}
}

View File

@ -55,12 +55,10 @@ class tripleo::profile::base::neutron::plugins::ml2::opendaylight (
if $step >= 4 {
if ! $odl_url_ip { fail('OpenDaylight API VIP is Empty') }
# TODO(trozet) remove odl_features once ODL BZ: 9256, 9147 are fixed
class { '::neutron::plugins::ml2::opendaylight':
odl_username => $odl_username,
odl_password => $odl_password,
odl_url => "${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron",
odl_features => 'False';
}
}
}

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes OpenDaylight port status to now work correctly via websocket
connection.