Closed codereflection closed 7 years ago
Any chance this can be incorporated in the next build? Encountered this issue this week but it was working previously. I think it was after I updated to chefDK 0.19.6 from an older 0.12 version. I have temporarily instructed my windows admins to use this fix for our currently rollout.
I have the same issue but that 0.15.16 was my working version before update.
I just realized that this fix will probably break the process on Mac / *nix systems. Needs to be tested out. I'll try and do that today.
Confirmed that the fix works on Mac, because gsub is looking for backslashes, which PathHelper.escape_glob
only returns on Windows machines. So the fix using .gsub('\\','/')
seems good on both OS's.
Thanks for all this !! This will likely get pulled in faster if submitted via PR. No obligation of course but it helps move it along more quickly.
Can do, but wouldn't this require the CLA have to been signed? If not, you'll have a PR for this today.
We've moved away from CLA to to DCO: https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/
Sweet, PR incoming today. Thanks @mwrock!
I started hacking on this yesterday when I discovered it independent of this issue. I think I have PR ready code I can throw up if it's welcome.
it is absolutely welcome!
It's in the hands of the build queue gods now. Let me know if there's anything I need to change or anything I can do to help get this pushed through. I work at a windows shop and this is confusing all of our employees on relatively new ChefDK versions (after around 0.15.x I believe)
I'm generally available to respond business hours US Eastern, but I'll be up a little late tonight. 😪 💤
Awesome! I meant to do this yesterday, but work happened.
Just released v1.7.1 with the fix. Thanks everyone for reporting and helping with a fix!
Just installed it at work and couldn't be happier. Thanks for the quick turn around everybody!
When bootstrapping a node from a Windows workstation, using knife-windows 1.7.0, the contents of the workstation's
trusted_certs
folder are not copied to thetrusted_certs
folder on the node due to a bug in thetrusted_certs_content
method. I have verified that this does work properly on a Mac. The issue is that Dir.glob does not take backslashes, yetPathHelper.escape_glob(@chef_config[:trusted_certs_dir])
returns double backslashes on a Windows machine.The existing
trusted_certs_content
method: https://github.com/chef/knife-windows/blob/master/lib/chef/knife/core/windows_bootstrap_context.rbThe fix is simple. Just add
.gsub('\\','/')
so we do this instead: