openstack: fail immediately if VM creation fails
Fixes:
Conflicts:
teuthology/openstack/__init__.py
@@ -82,6 +82,11 @@ class OpenStackInstance(object):
self.set_info()
else:
self.info = dict(map(lambda (k,v): (k.lower(), v), info.items()))
+ if self.info['status'] == 'ERROR':
+ errmsg = 'VM creation failed'
+ if 'message' in self.info:
+ errmsg = '{}: {}'.format(errmsg, self.info['message'])
+ raise Exception(errmsg)
def set_info(self):
try:
