Open holms opened 10 years ago
My assumption is that an old Chef version is installed on the node either via distro package or more probably via rubygems directly. And then PATH picks up that version before the omnibus package. What do sudo which chef
and sudo chef-solo --version
print?
If /opt/chef already existed but then vanished that would probably mean that the omnibus "chef" package has been replaced with other (distro's?) chef package.
I'm sorry but I think there is some key information missing here. You can get the debug output of the knife commands by adding -VV
option to them.
I have this same issue.
knife solo prepare knife solo prepare root@IPADDRESS
to ensure Chef is installed and up to date.
"
Then:
knife solo bootstrap
@stevemcquaid providing the -VV
output should help clear up the source of the issue.
This issue is quite hilarious, but I believe it's producible. And I'm not sure if it's knife-solo fault, or it's chef-solo itself..
So first of all, I've forgot to add cookbooks to Berksfile, and I've ran
knife solo prepare myhost
, chef-client installed smoothly. Then I've ranknife solo cook myhost
and of course it's failed with message that my cookbook is not found (that one which I've specified in role, and forgot to add in Berksfile).Now try to re-run
knife solo prepare myhost && knife solo cook myhost
and you'll get a really strange behavior. First of all my /opt/chef directory is gone, although links to chef-client binary is left in /usr/bin/. Second, even if you'd add cookbooks to Berksfile, cookbooks are not updated (when you run prepare command) anymore. And after you run cook command, it will crash with message that no chef-client is found.Not sure if this supposed to happen like this and is it knife-solo fault, or chef-solo itself. Would be nice if somebody would reproduce this on CentOs. It's only affecting centos. Hadn't had any issues with ubuntu for 2 weeks, while I've been reinstalling my chef-server zillion of times. Or maybe I've never had Berksfile empty, who knows..
After I've rebuilded vm, and with added cookbook to Berksfile, problem is gone.
Update: oh no, i've trying to reinstall chef-server, and I have this problem again =(
UPDATE: This seems to be fixed an issue
rpm -ev
rpm -q chef`