mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix bootstrap delay kwarg exchange
Signed-off-by: Mathieu Le Marec - Pasquet <kiorky@cryptelium.net>
This commit is contained in:
parent
ac85cfdbd0
commit
7ec08cd41c
2 changed files with 5 additions and 2 deletions
|
@ -291,6 +291,8 @@ def cloud_init_interface(name, vm_=None, **kwargs):
|
|||
autostart the container at boot time
|
||||
password
|
||||
administrative password for the container
|
||||
bootstrap_delay
|
||||
delay before launching bootstrap script at Container init
|
||||
|
||||
|
||||
.. warning::
|
||||
|
@ -521,6 +523,7 @@ def cloud_init_interface(name, vm_=None, **kwargs):
|
|||
lxc_init_interface['bootstrap_url'] = script
|
||||
lxc_init_interface['bootstrap_args'] = script_args
|
||||
lxc_init_interface['bootstrap_shell'] = _cloud_get('bootstrap_shell', 'sh')
|
||||
lxc_init_interface['bootstrap_delay'] = _cloud_get('bootstrap_delay', None)
|
||||
lxc_init_interface['autostart'] = autostart
|
||||
lxc_init_interface['users'] = users
|
||||
lxc_init_interface['password'] = password
|
||||
|
@ -3470,6 +3473,8 @@ def bootstrap(name,
|
|||
wait_started(name, path=path, uses_systemd=uses_systemd)
|
||||
if bootstrap_delay is not None:
|
||||
try:
|
||||
log.info('LXC {0}: bootstrap_delay: {1}'.format(
|
||||
name, bootstrap_delay))
|
||||
time.sleep(bootstrap_delay)
|
||||
except TypeError:
|
||||
# Bad input, but assume since a value was passed that
|
||||
|
|
|
@ -313,8 +313,6 @@ def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs):
|
|||
kw = copy.deepcopy(kw)
|
||||
kw['name'] = name
|
||||
saved_kwargs = {}
|
||||
if 'bootstrap_delay' in kw:
|
||||
saved_kwargs['bootstrap_delay'] = kw['bootstrap_delay']
|
||||
if 'uses_systemd' in kw:
|
||||
saved_kwargs['uses_systemd'] = kw['uses_systemd']
|
||||
kw = client.cmd(
|
||||
|
|
Loading…
Add table
Reference in a new issue