mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixes #23148
This commit is contained in:
parent
a27b158153
commit
8ffa12e82d
2 changed files with 7 additions and 2 deletions
|
@ -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')
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue