فهرست منبع

[os_firewall] Add -w flag to wait for iptables xtables lock.

Andrew Butcher 8 سال پیش
والد
کامیت
86d10d3069
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      roles/os_firewall/library/os_firewall_manage_iptables.py

+ 3 - 1
roles/os_firewall/library/os_firewall_manage_iptables.py

@@ -223,7 +223,9 @@ class IpTablesManager(object):  # pylint: disable=too-many-instance-attributes
 
     def gen_cmd(self):
         cmd = 'iptables' if self.ip_version == 'ipv4' else 'ip6tables'
-        return ["/usr/sbin/%s" % cmd]
+        # Include -w (wait for xtables lock) in default arguments.
+        default_args = '-w'
+        return ["/usr/sbin/%s %s" % (cmd, default_args)]
 
     def gen_save_cmd(self):  # pylint: disable=no-self-use
         return ['/usr/libexec/iptables/iptables.init', 'save']