Ignore iptables-save fails
iptables-save command is used for log iptables rules in case ssh
connection error. It could not exist in tempest env, also there is
no much sense running it in isolated tempest container.
Lets ignore errors for iptables-save.
Related-PRODX: PRODX-56262
Change-Id: I9d35dd584541b4d4f7932787bce88447ea5a66fd
diff --git a/neutron_tempest_plugin/scenario/base.py b/neutron_tempest_plugin/scenario/base.py
index 70cb2dc..e78473d 100644
--- a/neutron_tempest_plugin/scenario/base.py
+++ b/neutron_tempest_plugin/scenario/base.py
@@ -384,7 +384,11 @@
local_ips = ip_utils.IPCommand(namespace=ns_name).list_addresses()
local_routes = ip_utils.IPCommand(namespace=ns_name).list_routes()
arp_table = ip_utils.arp_table(namespace=ns_name)
- iptables = ip_utils.list_iptables(namespace=ns_name)
+ iptables = None
+ try:
+ iptables = ip_utils.list_iptables(namespace=ns_name)
+ except Exception:
+ LOG.exception('Failed to fetch iptables rules.')
lsockets = ip_utils.list_listening_sockets(namespace=ns_name)
except exceptions.ShellCommandFailed:
LOG.debug('Namespace %s has been deleted synchronously during the '