From 8775e2d5aa3e29137aadd2419ca89fbec4beb499 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 1 Jul 2019 14:52:21 +0200 Subject: [PATCH] Fix ovn dbs control port When an OCF bundle is managed by pacemaker it runs pacemaker-remote inside the container. The communication between the pacemaker cluster and the remote happens through a so-called control port. In the case of ovn-dbs, this port is set to 3125 by default: https://github.com/openstack/puppet-tripleo/blob/master/manifests/profile/pacemaker/ovn_dbs_bundle.pp#L62 We need to make sure that the cluster is always able to connect to said port as the connection might come from a cluster node that is not the same node where the ovn bundle is running. This has worked so far only by pure luck because pacemaker will retry the connection from each controller node and eventually when the connection comes from the same host as the one where the bundle is running it succeeds (INPUT rules do not apply to same-host connections). Tested and correctly observed port 3125/tcp being open in iptables: * Before [root@controller-0]# iptables -nvL INPUT |grep 3125 [root@controller-0]# * After [root@controller-0]# iptables -nvL INPUT |grep 3125 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 3125,6641,6642 state NEW /* 121 OVN DB server ports ipv4 */ Closes-Bug: #1834856 Change-Id: Ia455702d75a450f1c3ac88ed69853e9b98b98644 --- deployment/ovn/ovn-dbs-pacemaker-puppet.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml index 690f0b7cf8..7223f4f717 100644 --- a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml +++ b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml @@ -105,6 +105,14 @@ outputs: - tripleo::profile::pacemaker::ovn_dbs_bundle::sb_db_port: {get_param: OVNSouthboundServerPort} - tripleo::profile::pacemaker::ovn_dbs_bundle::container_backend: {get_param: ContainerCli} - tripleo::haproxy::ovn_dbs_manage_lb: false + - tripleo::ovn_dbs::firewall_rules: + '121 OVN DB server ports': + proto: 'tcp' + dport: + # Control port for pcmk remote bundle + - 3125 + - {get_param: OVNNorthboundServerPort} + - {get_param: OVNSouthboundServerPort} service_config_settings: {} # BEGIN DOCKER SETTINGS puppet_config: