salt icon indicating copy to clipboard operation
salt copied to clipboard

Conflict between script_args and bootstrap-salt.sh

Open jpic opened this issue 11 years ago • 4 comments

Using such script_args:

$ cat cloud/local/etc/cloud.profiles 
debian_container:
  provider: bigal
  image: debian
  network_profile: nic
  profile: debian
  script_args: -g https://github.com/jpic/salt.git git current

Is expected to make minions bootstrapped with my fork.

Here's the actual result:

[INFO    ] Running sh /tmp/26751fac9d4b8d92885087046d9d7581/bootstrap.sh -g https://github.com/jpic/salt.git git current -c /tmp/.c_26751fac9d4b8d92885087046d9d7581 in LXC container 'test_new3'
[DEBUG   ] Child Forked! PID: 34623  STDOUT_FD: 17  STDERR_FD: 30
[DEBUG   ] Terminal Command: /bin/sh -c lxc-attach --clear-env --set-var PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/bin:/usr/local/sbin  -n test_new3 -- sh /tmp/26751fac9d4b8d92885087046d9d7581/bootstrap.sh -g https://github.com/jpic/salt.git git current -c /tmp/.c_26751fac9d4b8d92885087046d9d7581
[INFO    ]  * ERROR: options are only allowed before install arguments
[INFO    ]   Usage :  bootstrap-salt.sh [options] <install-type> <install-type-args>

What's your take on this ?

jpic avatar May 26 '15 08:05 jpic

@jpic use a placeholder

  script_args: "-c {0} -g https://github.com/jpic/salt.git git current"

See https://github.com/saltstack/salt/blob/develop/salt/modules/lxc.py#L3129

kiorky avatar May 30 '15 00:05 kiorky

(this is a question, and not a bug)

kiorky avatar May 30 '15 00:05 kiorky

@jpic Did you try @kiorky's solution and did it work?

justinta avatar Jun 01 '15 22:06 justinta

I had the same error and the solution proposed by @kiorky solved it.

marccardinal avatar May 26 '16 01:05 marccardinal