aboutsummaryrefslogtreecommitdiff
path: root/kolla/common
diff options
context:
space:
mode:
authorVikram Hosakote <vhosakot@cisco.com>2016-02-23 21:04:04 +0000
committerVikram Hosakote <vhosakot@cisco.com>2016-02-28 00:54:47 +0000
commit320c1f92724d6c7bce45398dd783c4334969d23d (patch)
tree36285aba495642f437eadc936cff1f38f2e02041 /kolla/common
parentc81097df8b0525bcff9df875f38bbfe2ab83be3f (diff)
downloadkolla-320c1f92724d6c7bce45398dd783c4334969d23d.tar.gz
kolla-320c1f92724d6c7bce45398dd783c4334969d23d.zip
Add timeout to requests.get() in kolla/cmd/build.py
When kolla-build is running, if there are network issues or if the source's location (like http://tarballs.openstack.org) fails to respond due to high number of concurrent requests, kolla-build just hangs/blocks indefinitely. This patch set resolves this issue by adding a timeout of 120 seconds for requests.get() in kolla/cmd/build.py, adds a unit test for it in kolla/tests/test_build.py and also the "timeout" argument in kolla/common/config.py. Change-Id: I7c8745a20b9bd1c3f5d6a55c72a794f16fd7e513 Closes-Bug: #1548614
Diffstat (limited to 'kolla/common')
-rw-r--r--kolla/common/config.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/kolla/common/config.py b/kolla/common/config.py
index f8629e438..2eeb8c9ca 100644
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -131,6 +131,8 @@ _CLI_OPTS = [
cfg.BoolOpt('template-only', default=False,
deprecated_group='kolla-build',
help=("Don't build images. Generate Dockerfile only")),
+ cfg.IntOpt('timeout', default=120,
+ help='Time in seconds after which any operation times out'),
]
_BASE_OPTS = [