Add timeout to requests.get() in kolla/cmd/build.py

Bug #1548614 reported by Vikram Hosakote on 2016-02-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
High
Vikram Hosakote

Bug Description

When kolla-build is running, if there are network issues or if the source's location (http://tarballs.openstack.org) fails to respond due to high number of concurrent requests, kolla-build just hangs/blocks indefinitely.

The requests Python library supports timeout for "get" operations.

Hence, a timeout of 120 seconds must be added to the following line in kolla/cmd/build.py so that kolla-build does not hang/block.

            r = requests.get(source['source'])

Vikram Hosakote (vhosakot) wrote :

Fixing this bug.

Changed in kolla:
assignee: nobody → Vikram Hosakote (vhosakot)
status: New → In Progress
Steven Dake (sdake) on 2016-02-28
Changed in kolla:
importance: Undecided → High
milestone: none → mitaka-3

Reviewed: https://review.openstack.org/283844
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=320c1f92724d6c7bce45398dd783c4334969d23d
Submitter: Jenkins
Branch: master

commit 320c1f92724d6c7bce45398dd783c4334969d23d
Author: Vikram Hosakote <email address hidden>
Date: Tue Feb 23 21:04:04 2016 +0000

    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

Changed in kolla:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers