Skip to content

Commit

Permalink
Log fix (#8661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladsz83 committed Jan 15, 2021
1 parent 362e8c3 commit 243011c
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def drop_network(self, nodes=None):
nodes = self.nodes

for node in nodes:
self.logger.info("Disconnecting " + node.account.hostname + ".")
self.logger.info("Dropping ignite connections on '" + node.account.hostname + "' ...")

self.__backup_iptables(nodes)

Expand All @@ -320,12 +320,13 @@ def drop_network(self, nodes=None):

cmd = f"sudo iptables -I %s 1 -p tcp -m multiport --dport {dsc_ports},{cm_ports} -j DROP"

for node in nodes:
self.logger.debug("Activating netfilter on '%s': %s" % (node.name, self.__dump_netfilter_settings(node)))

return self.exec_on_nodes_async(nodes,
lambda n: (n.account.ssh_client.exec_command(cmd % "INPUT"),
n.account.ssh_client.exec_command(cmd % "OUTPUT")))
n.account.ssh_client.exec_command(cmd % "OUTPUT"),
self.logger.debug("Activated netfilter on '%s': %s" %
(n.name, self.__dump_netfilter_settings(n)))
)
)

def __backup_iptables(self, nodes):
# Store current network filter settings.
Expand Down

0 comments on commit 243011c

Please sign in to comment.