From 5ed628f3534718dd61b66d4438fd8b33fa1362f8 Mon Sep 17 00:00:00 2001 From: Numan Siddique Date: Tue, 17 Jul 2018 23:47:17 +0530 Subject: [PATCH] OVN: Set sysctl value 'net.ipv4.ip_nonlocal_bind' to 1 When OVN DBs pacemaker bundle is started on the controller nodes, all the ovsdb-servers are configured to listen on the virtual ip (on ports 6641/6642). But only master node is configured with virtual ip. On the other nodes, we see the below error messages ovsdb_jsonrpc_server|ERR|ptcp:6641:172.17.1.18: listen failed: Cannot assign requested address. The commit [1] addressed this issue in puppet-tripleo by setting the sysctl value 'net.ipv4.ip_nonlocal_bind' to 1 using puppet's sysctl::value. But the ovn-dbs.yaml service file is missing this puppet tag when the container 'ovn_dbs_init_bundle' is started. We can fix the issue by defining this tag, but this also requires setting 'privileged=true' when starting the docker container. Instead, this patch makes use of the t-h-t param 'KernelIpNonLocalBind' which was introduced in this commit [2]. [1] - I6f762534350a3f96696c87ccd2d14545dccc8a0b [2] - Idd3d432b8f7eb573d94cd56be8e05614510ebddf Change-Id: I5ae8cd368bcd58810b18e172ee685fdbf0e48d98 Closes-bug: #1781585 --- environments/neutron-ml2-ovn-dvr-ha.yaml | 1 + environments/neutron-ml2-ovn-ha.yaml | 2 +- environments/services/neutron-ovn-dvr-ha.yaml | 1 + environments/services/neutron-ovn-ha.yaml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/environments/neutron-ml2-ovn-dvr-ha.yaml b/environments/neutron-ml2-ovn-dvr-ha.yaml index b550f0615d..b3c6d8ea2a 100644 --- a/environments/neutron-ml2-ovn-dvr-ha.yaml +++ b/environments/neutron-ml2-ovn-dvr-ha.yaml @@ -26,4 +26,5 @@ parameter_defaults: NeutronServicePlugins: 'qos,ovn-router,trunk' NeutronVniRanges: ['1:65536', ] NeutronEnableDVR: true + KernelIpNonLocalBind: 1 diff --git a/environments/neutron-ml2-ovn-ha.yaml b/environments/neutron-ml2-ovn-ha.yaml index a57d0fbf76..dcf79765d0 100644 --- a/environments/neutron-ml2-ovn-ha.yaml +++ b/environments/neutron-ml2-ovn-ha.yaml @@ -29,4 +29,4 @@ parameter_defaults: NeutronBridgeMappings: "" NetworkerParameters: OVNCMSOptions: "enable-chassis-as-gw" - + KernelIpNonLocalBind: 1 diff --git a/environments/services/neutron-ovn-dvr-ha.yaml b/environments/services/neutron-ovn-dvr-ha.yaml index b75cc83f95..cc50ddd58a 100644 --- a/environments/services/neutron-ovn-dvr-ha.yaml +++ b/environments/services/neutron-ovn-dvr-ha.yaml @@ -30,3 +30,4 @@ parameter_defaults: ControllerParameters: OVNCMSOptions: "enable-chassis-as-gw" OVNDnsServers: [] + KernelIpNonLocalBind: 1 diff --git a/environments/services/neutron-ovn-ha.yaml b/environments/services/neutron-ovn-ha.yaml index aebf73bf0c..1224277476 100644 --- a/environments/services/neutron-ovn-ha.yaml +++ b/environments/services/neutron-ovn-ha.yaml @@ -32,3 +32,4 @@ parameter_defaults: NetworkerParameters: OVNCMSOptions: "enable-chassis-as-gw" OVNDnsServers: [] + KernelIpNonLocalBind: 1