Last modified: 2014-04-25 22:59:50 UTC
Captured from comments on code review at https://gerrit.wikimedia.org/r/#/c/121425/: Ori> Since we're heavily customizing Vagrant anyway, it'd be good to have Vagrant itself be smart enough to reload automatically on the basis of some signal from Puppet. This could perhaps be done via the 'postrun_command' option for puppet (which lets you register a script to be run at the conclusion of each puppet run) or via a custom Puppet reporter. Bryan> There's a really simple looking MIT licensed plugin at https://github.com/aidanns/vagrant-reload that claims to expose a `config.vm.provision :reload` setting. Maybe we could figure out a way to do something with it. We'd need some way to raise a "needs reload" signal which tied into the puppet postrun_command and fired the appropriate Vagrant methods. Ori> See <https://github.com/jamtur01/puppet-campfire/blob/master/lib/puppet/reports/campfire.rb#L34> for a sample Puppet:Reports implementation that iterates through individual log records from the just-concluded Puppet run. That'd be one solution. Ori> A simpler but potentially far uglier solution would be to use the shared folder as a means of passing messages between guest and host. That is, the guest would leave a file in /vagrant that acts as a signal for the host that a reload is required. The host would remove the file and reload the machine whenever it encounters it.
Change 127790 had a related patch set uploaded by BryanDavis: Add Vagrant plugin to perform reload action https://gerrit.wikimedia.org/r/127790
Change 127790 merged by jenkins-bot: Add Vagrant plugin to perform reload action https://gerrit.wikimedia.org/r/127790