rtyler / vagrant-plugin

An experimental Vagrant plugin for Jenkins
https://wiki.jenkins-ci.org/display/JENKINS/Vagrant+Plugin
103 stars 44 forks source link

Implement locking to prevent import errors #21

Closed darthsteven closed 11 years ago

darthsteven commented 11 years ago

Hi, this is my first ever bit of ruby code, so go easy on me :)

I described in an issue against Vagrant: mitchellh/vagrant#1075 basically it's easy with the Vagrant plugin for Jenkins to import two VMs at once, which VBoxManage seemingly can't handle. Seeing as how in that issue the Vagrant maintainer says he'll get around to fixing this at some point, I've implemented a workaround in the vagrant-plugin here.

Not sure this is the best way to implement locking in JRuby, but it seems to work.

darthsteven commented 11 years ago

Hmm...this doesn't actually seem to solve the problem, seems like matrix builds must fundamentally be incompatible with the Vagrant plugin, because it gets seriously confused, even after the VM has proceeded. Sorry for the noise.

darthsteven commented 11 years ago

Actually, you know, this doesn't work with Matrix builds, but it does prevent concurrent normal builds from dying.