From bf933ecc22ed3801f8f80e313a9b4270f776ffef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 17 May 2018 10:04:00 +0300 Subject: [PATCH] Open all ports by default The test now flushes the INPUT chain of iptables at the start of the test. This should open all ports even if the OS by default defines some rules that block ports. --- maxscale-system-test/cdc_client.cpp | 5 ++--- maxscale-system-test/testconnections.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/maxscale-system-test/cdc_client.cpp b/maxscale-system-test/cdc_client.cpp index 264210f35..07cfd80e4 100644 --- a/maxscale-system-test/cdc_client.cpp +++ b/maxscale-system-test/cdc_client.cpp @@ -185,9 +185,8 @@ int main(int argc, char *argv[]) Test->set_timeout(600); Test->maxscales->stop_maxscale(0); - // Remove old data files and make sure that port 4001 is open - Test->maxscales->ssh_node_f(0, true, "rm -rf /var/lib/maxscale/avro;" - "iptables -n -L INPUT|grep 4001 || iptables -I INPUT -p tcp --dport 4001 -j ACCEPT;"); + // Remove old data files + Test->maxscales->ssh_node_f(0, true, "rm -rf /var/lib/maxscale/avro;"); Test->repl->connect(); execute_query(Test->repl->nodes[0], "DROP TABLE IF EXISTS t1;"); diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/testconnections.cpp index be1c7e794..a2d6f908b 100644 --- a/maxscale-system-test/testconnections.cpp +++ b/maxscale-system-test/testconnections.cpp @@ -641,7 +641,7 @@ void TestConnections::init_maxscale(int m) "chmod 664 %s/certs/*.pem;" "chmod a+x %s;" "%s" - "iptables -I INPUT -p tcp --dport 4001 -j ACCEPT;" + "iptables -F INPUT;" "rm -f %s/maxscale.log;" "rm -f %s/maxscale1.log;" "rm -rf /tmp/core* /dev/shm/* /var/lib/maxscale/maxscale.cnf.d/ /var/lib/maxscale/*;"