diff --git a/.pylintrc b/.pylintrc index 4cd37c328a0..dee6a85c33e 100644 --- a/.pylintrc +++ b/.pylintrc @@ -57,7 +57,6 @@ disable= arguments-renamed, broad-exception-raised, unspecified-encoding, - missing-timeout, redundant-u-string-prefix, unused-private-member, # "C" Coding convention violations diff --git a/neutron/agent/metadata/agent.py b/neutron/agent/metadata/agent.py index f2b65071941..f0c030f76db 100644 --- a/neutron/agent/metadata/agent.py +++ b/neutron/agent/metadata/agent.py @@ -256,7 +256,8 @@ class MetadataProxyHandler(object): headers=headers, data=req.body, cert=client_cert, - verify=verify_cert) + verify=verify_cert, + timeout=60) if resp.status_code == 200: req.response.content_type = resp.headers['content-type'] diff --git a/neutron/agent/ovn/metadata/server.py b/neutron/agent/ovn/metadata/server.py index 3431735dff9..75ee4c1e17a 100644 --- a/neutron/agent/ovn/metadata/server.py +++ b/neutron/agent/ovn/metadata/server.py @@ -153,7 +153,8 @@ class MetadataProxyHandler(object): headers=headers, data=req.body, cert=client_cert, - verify=verify_cert) + verify=verify_cert, + timeout=60) if resp.status_code == 200: req.response.content_type = resp.headers['content-type'] diff --git a/neutron/tests/unit/agent/metadata/test_agent.py b/neutron/tests/unit/agent/metadata/test_agent.py index 16df56491da..cc8ff95d5bc 100644 --- a/neutron/tests/unit/agent/metadata/test_agent.py +++ b/neutron/tests/unit/agent/metadata/test_agent.py @@ -434,7 +434,8 @@ class _TestMetadataProxyHandlerCacheMixin(object): data=body, cert=(self.fake_conf.nova_client_cert, self.fake_conf.nova_client_priv_key), - verify=False) + verify=False, + timeout=60) return retval diff --git a/neutron/tests/unit/agent/ovn/metadata/test_server.py b/neutron/tests/unit/agent/ovn/metadata/test_server.py index e4f30ae5600..3f2b2cea5a0 100644 --- a/neutron/tests/unit/agent/ovn/metadata/test_server.py +++ b/neutron/tests/unit/agent/ovn/metadata/test_server.py @@ -167,7 +167,8 @@ class TestMetadataProxyHandler(base.BaseTestCase): data=body, cert=(self.fake_conf.nova_client_cert, self.fake_conf.nova_client_priv_key), - verify=False) + verify=False, + timeout=60) return retval