-
Notifications
You must be signed in to change notification settings - Fork 213
Ohai cookbook doesn't like the default relative solo_path #212
Comments
I think a better approach would be to expand the path on the node. But all this will still probable change quite a bit before 0.3.0 is released. At least #199 has some ideas about it. Anyway thanks for an excellent report! This has to be fixed of course. |
Awesome, I figured it was still in flux. :) Expanding the path would be nice, for sure. I'll keep an eye on #199 for discussion. |
👍 for expanding the path when we run the command. And 👍 for bug reports with headers. Way to be @jdsiegel |
Changing the path to "~/chef-solo" fixed it for me! Way more secure to run knife solo under a sudo user, any plans to highly suggest it in the README once all the quirks are sorted out? The necessity to use root user means you must at least have PermitRootLogin without-password in your SSH config, unless I'm wrong? Thanks! |
#199 is my latest attempt to fix this. Haven't quite settled on code that Thanks for the report. If you're up for some experimentation feel free to On Mar 2, 2013, at 15:44, Mathieu Allaire notifications@github.com wrote: Changing the path to "~/chef-solo" fixed it for me! Way more secure to run Thanks! — |
Will do, thank you! |
NOTE: This is redundant after matschaffer#199 is merged rel matschaffer#212. Ohai doesn't like relative reference to solo.rb Currently this is unix only. Not sure if this issue is still valid on windows. Need to adjust fix to return original path on windows boxes.
Just to clarify, this means changing your local ~/.chef/knife.rb. princess$ cat ~/.chef/knife.rb
knife[:solo_path] = "~/chef-solo" I had to create the file since it wasn't there for me. |
@algesten You seem to have an earlier 0.3.0 prerelease, as the option name changed to |
So did it change in pre3 or after?
|
My quick search from the history hinted that it should have been changed in pre3. I haven't had enough coffee yet though, so I might be wrong. =) |
When using knife-solo against a server with a normal account that has sudo, the ohai cookbook will converge successfully on the initial chef-solo run, but subsequent runs result in an error:
This is due to chef-solo's config file being specified as
./chef-solo
, which can't be found during the converge step.Steps to replicate
This was tested using the master branch (SHA: 0b5c88a) against an Ubuntu 12.04 LTS server
nginx
cookbook via Berkshelf or LibrarianWorkaround
The ohai cookbook is happy with an absolute path. Add the following line to your knife.rb file:
Changing the default solo_path from
./chef-solo
to~/chef-solo
would address this, too.The text was updated successfully, but these errors were encountered: