This commit is contained in:
Cristi P 2015-04-29 00:29:36 +03:00
parent a27b158153
commit 8ffa12e82d
2 changed files with 7 additions and 2 deletions

View file

@ -581,8 +581,9 @@ def init(name,
mode = (0o0777 ^ mask) & 0o0666
os.chmod(img_dest, mode)
except (IOError, OSError):
return False
except (IOError, OSError) as e:
raise CommandExecutionError('problem copying image. {0} - {1}'.format(image, e))
seedable = True
else:
log.error('unsupported hypervisor when handling disk image')

View file

@ -236,6 +236,10 @@ def init(
if not ret:
print('VM {0} was not initialized.'.format(name))
return 'fail'
for minion_id in ret:
if ret[minion_id]['ret'] != True:
print('VM {0} initialization failed. Returned error: {1}'.format(name, ret[minion_id]['ret']))
return 'fail'
print('VM {0} initialized on hypervisor {1}'.format(name, hyper))
return 'good'