From dfbfa8ced3c96ec5e2649f47d8ac9f4d5b0e168e Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 30 Oct 2019 14:35:37 +0000 Subject: [PATCH] Increase timeout when waiting for dnsmasq enablement In the reported bug, a regression was introduced in [1] when limiting the time to have a "dnsmasq" process enabled. It has been reported, as documented in the bug, that in older versions (Queens), using Python 2 [2] and older versions of "ip_lib" (not implementing most of the commands using Pyroute2), that the time needed to spawn a "dnsmasq" process exceeds the default 60 seconds defined in "common_utils.wait_until_true". This patch increases this time by a reasonable 300 seconds. [1] https://review.opendev.org/#/c/643732 [2] https://bugs.python.org/issue35757 Change-Id: I2d8693145da72825876b951f2d10afe9ca28ff6e Closes-Bug: #1849676 (cherry picked from commit aedc09917680bc77501f4b57142e73768e3d06ad) --- neutron/agent/linux/dhcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/agent/linux/dhcp.py b/neutron/agent/linux/dhcp.py index 23cdebdb5e9..4acbba38361 100644 --- a/neutron/agent/linux/dhcp.py +++ b/neutron/agent/linux/dhcp.py @@ -216,7 +216,7 @@ class DhcpLocalProcess(DhcpBase): def enable(self): """Enables DHCP for this network by spawning a local process.""" try: - common_utils.wait_until_true(self._enable) + common_utils.wait_until_true(self._enable, timeout=300) except common_utils.WaitTimeout: LOG.error("Failed to start DHCP process for network %s", self.network.id)