Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ducktape log fix #8661

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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