Closed conor123 closed 7 years ago
Hi @conor123 - Could you provide a link to a gist containing the full debug output when you try to vagrant up? That'll give us a better idea of where the error is coming from...thanks!
@briancain hiya, yes sure here you go. Thanks: https://gist.github.com/conor123/7c1c2efc42aaf834458cc005a327625f
@conor123 hmm, can you run vagrant provision
with the --debug
flag? (i.e. vagrant provision --debug
). Thanks!
@briancain yes thanks there you go: https://gist.github.com/conor123/f7c89df4a19a238a9993eaf52cdeab9e
Alright thanks @conor123! From what I can tell this is a configuration issue with chef, and not a vagrant bug. You might be able to gain more insight from this link: https://docs.chef.io/config_rb_client.html#ohai-settings
I recommend emailing the vagrant mailing list as you should be able to find some help there if you are still stuck after looking at those docs. https://groups.google.com/forum/#!forum/vagrant-up Thanks!
@conor123 Were you able to find a solution to this problem? Thanks
@Andy2K11 I actually disabled/removed the ohai-vagrant plugin as a work around cause I didn't really need it. The bug may have been in a file I uploaded from another developer but I didn't deep dive the issue. Did you run into same issue? The affected code in my case came from a Udemy Chef course.
Hi @conor123 it sounds like we took the same Udemy course lol. Having looked through your debug logs it looks like the exact same issue. I've tried various versions of VirtualBox, Vagrant, and plugins without much luck. I might try starting from scratch with a fresh install and setting up a minimal example as I seem to be running into lots of other errors now. If I get anywhere I'll post back.
@Andy2K11 my next move will be to remove all the ohai code from my chef server/local cookbooks as that's most likely the issue. Not likely to be a vagrant issue and less so a Chef SDK one so clean installs probably won't help - though if you find that works let me know. It's something about an interaction between the our ohai code on our chef server(or local cookbook possibly) and the vagrant plugin
@conor123 That took a while! Vagrant 2.0.0 causes an rsync error on Windows 10 hosts, although I believe a fix is coming out in the next version. Virtualbox 5.2 isn't compatible with older versions of Vagrant. Anyway, have got a simple example working now. Will come back to it and try finding out exactly what caused the problem when I have time.
https://github.com/Andy2K11/vmbox
Of note is that the nodes folder is correctly populated with a json file during provisioning which wasn't happening before (It's been added to my .gitignore because I don't want all the system info in the public domain). You might be right about ohai as I don't have the vagrant-ohai plugin installed anymore.
@Andy2K11 cool, for what it's worth I'm on a Mac, and I had updated both VB and Vagrant but that didn't affect the particular bug I was having.
@coner123 Yeah the problem I've been having with versions just seems to be a Windows thing and not related to this issue.
After checking that my main project now works (which it does 👍 ) I installed vagrant-ohai and was able to reproduce the error. The fix then is to run
vagrant plugin uninstall vagrant-ohai
and remove any code in the Vagrantfile which requires this plugin (like the one from that Udemy course). I had (erroneously) thought that vagrant-ohai was needed to create the nodes json file, but at least in the case of provisioning with chef_zero it clearly isn't.
Thanks for your help.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Vagrant version
2.0.0
Host operating system
Mac El capitan
Guest operating system
various including bento/centos-7.2
Vagrantfile
Debug output
Expected behavior
chef should have been provisioneed
Actual behavior
Error: Chef never successfully completed!
Steps to reproduce
References
Notes
The client.rb:
Chef::Config.from_file "/etc/chef/custom-config.rb"
which is:
Ohai::Config[:plugin_path] << "/etc/chef/ohai_plugins"
Anyone who uses Vagrant to provision chef and may have an insight here your comments would be much appreciated.
Possibly related to:
Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is:
Unable to resolve dependency: user requested 'vbguest (> 0)'
Possible issue?
For anyone who had the same it looks like a vagrant issue. Install or upgrade virtualbox, vagrant and vagrant-manager. Plugins will need to be expunged and reinstalled and one plugin was troublesome - remove it.
vagrant plugin expunge --reinstall
vagrant plugin uninstall vagrant-vbguest
Actually looking at the vagrant-ohai plugin, maybe I have some misconfigured ohai code somewhere?