From bc3feec75f8dc1bac6691ce8cd05a37c27aa5e42 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 26 Oct 2017 22:06:50 -0500 Subject: [PATCH] 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 --- manifests/haproxy.pp | 19 +++++++++++++++++++ .../base/neutron/plugins/ml2/opendaylight.pp | 2 -- ...daylight_port_status-1ee052b299b36b83.yaml | 5 +++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/enables_opendaylight_port_status-1ee052b299b36b83.yaml diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index 9206bb439..94bc45eea 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -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', + }, + } } diff --git a/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp index cb3e817dc..8dd929647 100644 --- a/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp +++ b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp @@ -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'; } } } diff --git a/releasenotes/notes/enables_opendaylight_port_status-1ee052b299b36b83.yaml b/releasenotes/notes/enables_opendaylight_port_status-1ee052b299b36b83.yaml new file mode 100644 index 000000000..35e649703 --- /dev/null +++ b/releasenotes/notes/enables_opendaylight_port_status-1ee052b299b36b83.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes OpenDaylight port status to now work correctly via websocket + connection.