From: Zack Cerza Date: Fri, 26 Feb 2016 00:59:51 +0000 (-0700) Subject: Add a warning when gitbuilder 404s X-Git-Tag: 1.1.0~672^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3cfdef7f52416fbe68f37ad7f37f39c55d7901ad;p=teuthology.git Add a warning when gitbuilder 404s When determining the ceph hash, we usually ask gitbuilder. When that fails, the error is misleading but it would take a bit of refactoring to truly fix it. Let's at least put a useful warning before the confusing error message. Signed-off-by: Zack Cerza --- diff --git a/teuthology/suite.py b/teuthology/suite.py index 66d17979e..87d924687 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -446,6 +446,16 @@ def get_hash(project='ceph', branch='master', flavor='basic', log.debug("Gitbuilder URL: %s", url) resp = requests.get(url) if not resp.ok: + msg = "Got a {0} trying to get hash for project '{1}' " + \ + "and branch '{2}' from URL: {3}" + log.warn( + msg.format( + resp.status_code, + project, + branch, + url + ) + ) return None return str(resp.text.strip())