Increase timeout and Update deckhand_load_yaml Script
We are getting the following errors in [0] when executing the shipyard CLI due to timeout issue. We will be increasing the timeout from 30 seconds to 60 seconds to allow more time for site validations. There is another problem with the deckhand_load_yaml script as the environment variables were defined but not exported. This p.s. is meant to address these 2 issues. [0] Error messages root@genesis:~# shipyard commit configdocs Error: Validations failed Reason: Validation - Error: Drydock unable to validate configdocs - Error: HTTPConnectionPool(host='drydock-api.ucp.svc.cluster.local', port=9000): Read timed out. (read timeout=30) - Error: Armada unable to validate configdocs - Error: HTTPConnectionPool(host='armada-api.ucp.svc.cluster.local', port=8000): Read timed out. (read timeout=30) root@genesis:~# Change-Id: Ia04d244077c9f809e19aca1b47ce178eb5984b0c
This commit is contained in:
@@ -437,8 +437,13 @@ class ConfigdocsHelper(object):
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
|
||||
# TODO: We will need to make timeout a configurable value as it
|
||||
# will differ from site to site based on the size of the rendered
|
||||
# document
|
||||
# Note that 30 seconds is not sufficient to complete validations.
|
||||
# Hence we are increaing the default timeout to 60 seconds.
|
||||
http_resp = requests.post(
|
||||
url, headers=headers, data=design_reference, timeout=(5, 30))
|
||||
url, headers=headers, data=design_reference, timeout=(5, 60))
|
||||
# 400 response is "valid" failure to validate. > 400 is a problem.
|
||||
if http_resp.status_code > 400:
|
||||
http_resp.raise_for_status()
|
||||
|
||||
Reference in New Issue
Block a user