[TestRail] Sometimes API returns 503 Server Error: Service Unavailable

Bug #1588793 reported by Artem Panchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Artem Panchenko

Bug Description

Sometimes our reporting scripts fail with 503 error from Testrail API:

Traceback (most recent call last):
  File "fuelweb_test/testrail/upload_cases_description.py", line 433, in <module>
    main()
  File "fuelweb_test/testrail/upload_cases_description.py", line 388, in main
    project=TestRailSettings.project
  File "/home/jenkins/workspace/9.0.system_test.test-reports/fuelweb_test/testrail/testrail_client.py", line 29, in __init__
    self.project = self._get_project(project)
  File "/home/jenkins/workspace/9.0.system_test.test-reports/fuelweb_test/testrail/testrail_client.py", line 33, in _get_project
    projects = self.client.send_get(uri=projects_uri)
  File "/home/jenkins/workspace/9.0.system_test.test-reports/fuelweb_test/testrail/testrail.py", line 80, in send_get
    return self.__send_request('GET', uri, None)
  File "/home/jenkins/workspace/9.0.system_test.test-reports/fuelweb_test/testrail/testrail.py", line 110, in __send_request
    e.response.status_code, error))
fuelweb_test.testrail.testrail.APIError: TestRail API returned HTTP 503: "503 Server Error: Service Unavailable for url: https://mirantis.testrail.com/index.php?/api/v2/get_projects"

Similar issue we resolved earlier: bug #1514797

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-qa (master)

Fix proposed to branch: master
Review: https://review.openstack.org/325241

Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Artem Panchenko (apanchenko-8)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-qa (master)

Reviewed: https://review.openstack.org/325241
Committed: https://git.openstack.org/cgit/openstack/fuel-qa/commit/?id=b5333c09ab7f7811200360f0a314f47f14f0f3bf
Submitter: Jenkins
Branch: master

commit b5333c09ab7f7811200360f0a314f47f14f0f3bf
Author: Artem Panchenko <email address hidden>
Date: Fri Jun 3 14:44:27 2016 +0300

    [TestRail] Wait up to 10 min for API is up

    Since time to time TestRail goes down (service
    unavailable error is recieved on all requests),
    added 503 code to known errors and 10 retries w/
    60 seconds sleep for such cases.

    Default sleep value was increased from 5 to 60
    seconds, because 429 error is always returned
    w/ 'retry-after' header, so it will be used
    for handling 503 error only.

    Change-Id: I87cf4b422d992267d39623d552de19664f000af9
    Closes-bug: #1588793

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.