Actions
Bug #9519
closedteuthology-lock: if downburst list-json fails, error is confusing
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
% Done:
0%
Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):
Description
I had updated teuthology but not updated-and-rebootstrapped downburst; as a result, downburst simply didn't have the list-json command that teuthology-lock wants to see for vps locking. The error, however, was not caught correctly, and reported with a Python traceback that looked a lot like "the os version isn't available", so I spent a while debugging it until I found that it was easier; the missing list-json meant there was no output, which was not trapped.
This code fixes it, in a kind of a cheap way; probably some other exception is more appropriate:
--- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -54,6 +54,9 @@ def get_distro_from_downburst(): p = subprocess.Popen([executable_cmd, 'list-json'], stdout=subprocess.PIPE, stderr=subprocess.PIPE,) output, err = p.communicate() + if p.returncode != 0: + log.info('downburst list-json failed') + raise OSError downburst_data = json.loads(output) return downburst_data
Actions