From 468f17c4f6afac507dba9d4783c7da6fde24f656 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 23 Mar 2016 12:14:10 -0700 Subject: [PATCH] Allow test slaves to talk to themselves Update iptables rules to allow slaves to talk to themselves over their known IP addresses. This should allow services to listen on public or private addresses in addition to the loopback address and talk to those services over these IPs. Specifically this should address a problem with rabbitmq coming up on the public IP but not being able to talk to it due to iptables. Change-Id: If851eb8ce97ca0c0c113f0a924ec0916c993cf87 --- nodepool/scripts/configure_mirror.sh | 7 +++++++ nodepool/scripts/multinode_setup.sh | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nodepool/scripts/configure_mirror.sh b/nodepool/scripts/configure_mirror.sh index 2c22bba814..004d6d99f0 100755 --- a/nodepool/scripts/configure_mirror.sh +++ b/nodepool/scripts/configure_mirror.sh @@ -16,6 +16,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Ensure that we can talk to ourselves over any of our known IPs +# and that our related nodes can talk to use from all of their +# known IPs +for ip in $(cat /etc/nodepool/primary_node /etc/nodepool/sub_nodes /etc/nodepool/primary_node_private /etc/nodepool/sub_nodes_private | sort -u); do + sudo iptables -I openstack-INPUT 1 -s $ip -j ACCEPT +done + source /etc/nodepool/provider # Generate the AFS Slug from the host system. diff --git a/nodepool/scripts/multinode_setup.sh b/nodepool/scripts/multinode_setup.sh index 704351140a..e0d654ce7b 100755 --- a/nodepool/scripts/multinode_setup.sh +++ b/nodepool/scripts/multinode_setup.sh @@ -18,10 +18,6 @@ export PATH=$PATH:/usr/local/sbin:/usr/sbin -for ip in $(cat /etc/nodepool/primary_node /etc/nodepool/sub_nodes /etc/nodepool/primary_node_private /etc/nodepool/sub_nodes_private | sort -u); do - sudo iptables -I openstack-INPUT 1 -s $ip -j ACCEPT -done - echo "" >> /home/jenkins/.ssh/authorized_keys cat /etc/nodepool/id_rsa.pub >> /home/jenkins/.ssh/authorized_keys echo "" >> /home/jenkins/.ssh/authorized_keys