Last modified: 2013-09-30 09:40:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56655, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54655 - "Cannot determine host VirtualBox version." running update-guest-additions in "vagrant ssh"
"Cannot determine host VirtualBox version." running update-guest-additions in...
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-26 17:30 UTC by Brion Vibber
Modified: 2013-09-30 09:40 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Log of output from vagrant setup. (12.16 KB, text/plain)
2013-09-26 17:33 UTC, Brion Vibber
Details

Description Brion Vibber 2013-09-26 17:30:56 UTC
Created a fresh vagrant instance (on Mac OS X 10.8.5 w/ VirtualBox 4.2.18), fired it up, and logged in:

  -bash: /etc/virtualbox-version: No such file or directory
  Your VirtualBox guest additions are out-of-date. Please run 'update-guest-additions'.
  vagrant@mediawiki-vagrant:~$ update-guest-additions
  Cannot determine host VirtualBox version.

Something seems not quite right there...
Comment 1 Brion Vibber 2013-09-26 17:33:51 UTC
Created attachment 13386 [details]
Log of output from vagrant setup.
Comment 2 Željko Filipin 2013-09-26 17:54:33 UTC
I have seen the error message on my VM too.
Comment 3 Brion Vibber 2013-09-26 22:50:57 UTC
Just checking some of the code from the functions in lib/mediawiki-vagrant/helpers.rb manually:

>> RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw32|windows/i
=> nil

(so it shouldn't be accidentally thinking it's Windows)

>> `VBoxManage -v 2>/dev/null`[/[\d\.]+/] rescue nil
=> "4.2.18"

(so it seems to return a sane value...)


and from puppet/modules/virtualbox/manifests/init.pp:

>> "4.2.18" =~ /[\d.]+/
=> 0

(so it should create /etc/virtualbox-version) Apparently 0 evaluates to "true" in Ruby. Nice. :)
Comment 4 Brion Vibber 2013-09-26 23:18:16 UTC
So the problem seems to be that VBoxManage is actually crapping out with a low-level error:

sh: line 1:  2322 Trace/BPT trap: 5       VBoxManage -v 2> /dev/null

^ so we get an empty string as output.

I can find some general references to this 'Trace/BPT trap: 5' thing happening in VBox, Postgres, and a couple other things on OS X and FreeBSD... not really sure what it actually means.

It's possible that something in the Vagrant or Puppet environment is causing libraries or config files not to load, or something, and it's crashing the program. Weeeeeeird! I haven't figured out how to repro it directly, but it happens quite consistently when rerunning 'vagrant provision'.
Comment 5 Gerrit Notification Bot 2013-09-27 01:49:37 UTC
Change 86212 had a related patch set uploaded by Ori.livneh:
Use interval Vagrant hook to determine VirtualBox version

https://gerrit.wikimedia.org/r/86212
Comment 6 Ori Livneh 2013-09-27 01:54:31 UTC
Yes, I suspect the most recent version of Vagrant sets a custom LD_LIBRARY_PATH or LIBRARY_PATH to get its embedded Ruby interpreter to work. (You know your language's package management facilities suck when people resort to bundling the entire runtime. WTF.)

The patch above uses Vagrant's internal API to get the version number. I was able to get it to work after a lot of trial-and-error and poking around in Vagrant's code. I'm not sure yet if it's a good approach, or if the APIs that it is using are stable.

I think that at minimum I'd like to have 'upgrade-guest-additions' take an optional command-line argument that lets you specify a VirtualBox version, as a fallback for this issue.
Comment 7 Gerrit Notification Bot 2013-09-27 17:32:28 UTC
Change 86212 merged by jenkins-bot:
Use interval Vagrant hook to determine VirtualBox version

https://gerrit.wikimedia.org/r/86212
Comment 8 Brion Vibber 2013-09-27 17:34:36 UTC
Confirmed that patch fixes it for me; closing fixed.
Comment 9 Željko Filipin 2013-09-30 09:40:46 UTC
(In reply to comment #3)
> Apparently 0 evaluates to
> "true"
> in Ruby. Nice. :)

As far as I know (in Ruby) only nil and false are falsy, everything else is truthy.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links