Merge "Early die if on image gets killed"
This commit is contained in:
commit
432769935f
@ -81,6 +81,10 @@ class BuildErrorException(TempestException):
|
||||
message = "Server %(server_id)s failed to build and is in ERROR status"
|
||||
|
||||
|
||||
class ImageKilledException(TempestException):
|
||||
message = "Image %(image_id)s 'killed' while waiting for %(status)s"
|
||||
|
||||
|
||||
class AddImageException(TempestException):
|
||||
message = "Image %(image_id)s failed to become ACTIVE in the allotted time"
|
||||
|
||||
|
@ -265,9 +265,12 @@ class ImageClientJSON(RestClient):
|
||||
LOG.info('Value transition from "%s" to "%s"'
|
||||
'in %d second(s).', old_value,
|
||||
value, dtime)
|
||||
if (value == status):
|
||||
if value == status:
|
||||
return value
|
||||
|
||||
if value == 'killed':
|
||||
raise exceptions.ImageKilledException(image_id=image_id,
|
||||
status=value)
|
||||
if dtime > self.build_timeout:
|
||||
message = ('Time Limit Exceeded! (%ds)'
|
||||
'while waiting for %s, '
|
||||
|
Loading…
x
Reference in New Issue
Block a user