From 84a9a5ec57421718192427bac79b968729edeb3c Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 31 Oct 2018 17:01:48 +0000 Subject: [PATCH] iptables-restore wait period cannot be zero In case --wait (-w) parameter is zero, iptables-restore returns an error. Correct: [root@dev02 iptables]# iptables-restore -w 1 -W 20000 ipt Incorrect: [root@dev02 iptables]# iptables-restore -w 0 -W 20000 ipt Option --wait-interval requires option --wait Change-Id: I431fe6f637b963d61d81afed30a4fb1ec112d66c Closes-Bug: #1800884 --- neutron/agent/linux/iptables_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/agent/linux/iptables_manager.py b/neutron/agent/linux/iptables_manager.py index 93de4e35fda..4dab06e6cc7 100644 --- a/neutron/agent/linux/iptables_manager.py +++ b/neutron/agent/linux/iptables_manager.py @@ -475,7 +475,7 @@ class IptablesManager(object): @property def xlock_wait_time(self): # give agent some time to report back to server - return str(int(cfg.CONF.AGENT.report_interval / 3.0)) + return str(max(int(cfg.CONF.AGENT.report_interval / 3.0), 1)) def _do_run_restore(self, args, commands, lock=False): args = args[:]