mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Report failure when failed to create/clone LXC container
This commit is contained in:
parent
2d9aa2bb97
commit
fb24f0cf02
1 changed files with 2 additions and 0 deletions
|
@ -879,6 +879,7 @@ def init(name,
|
|||
__salt__['lxc.clone'](name, clone_from,
|
||||
profile=profile, **kwargs))
|
||||
if not ret.get('cloned', False):
|
||||
ret['result'] = False
|
||||
return ret
|
||||
cfg = _LXCConfig(name=name, nic=nic, nic_opts=nic_opts,
|
||||
bridge=bridge, gateway=gateway,
|
||||
|
@ -900,6 +901,7 @@ def init(name,
|
|||
__salt__['lxc.create'](name, config=cfile.name,
|
||||
profile=profile, **kwargs))
|
||||
if not ret.get('created', False):
|
||||
ret['result'] = False
|
||||
return ret
|
||||
path = '/var/lib/lxc/{0}/config'.format(name)
|
||||
old_chunks = []
|
||||
|
|
Loading…
Add table
Reference in a new issue