Chef: Fix knife bootstrap

Created on 15 Sep 2015  路  7Comments  路  Source: chef/chef

at least:
use mixlib-install for both windows and unix
don't write a big ass command into syslog and ps and blurgh
get some real debugging and logging

knife bootstrap Tech Debt

Most helpful comment

This quite an old issue, why hasn't it been resolved? What's the status?

All 7 comments

3662 is affected by this.

3872 and #3871 are part of this

Per #3872 the way that we should fix this via using scp/winrm[*] to copy up the file should also follow the pattern of:

  1. create a tmpdir in /tmp
  2. enforce mode 600 on the tmpdir
  3. copy a file to the tmpdir
  4. fix the uploaded files perms
  5. mv the uploaded file into place

That should get it right no matter what the umask is set to on the target machine, without having to worry about getting umask over ssh right all the time (particularly with scp, using net-ssh, which might work, or might be buggy--while i can prove that the above algorithm only has a race which might expose a readable empty tmpdir)

[*] oh and lol about winrm and fixing up windows perms.... that's much worse than scp/net-ssh.

3887 too!

This quite an old issue, why hasn't it been resolved? What's the status?

The first half of this was fixed in Chef 15 in https://github.com/chef/chef/issues/3871#issuecomment-527626952. The second half will be fixed in Chef 16 in #8465

It's taken a long time mostly because there's a lot of breaking changes that have to be worked out on annual major releases.

Updating bootstrap to use mixlib-install is now being tracked in #8468

This issue is probably too wide to be useful and is at least 50-75% done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lhandl picture lhandl  路  6Comments

lamont-granquist picture lamont-granquist  路  7Comments

t0m picture t0m  路  3Comments

mistermoe picture mistermoe  路  8Comments

jblaine picture jblaine  路  4Comments