Last modified: 2014-07-14 20:06:10 UTC
Performing a destroy and recreate when using an extension that has db changes seems to have a bug of some sort, not really sure how to fix this: Reproduction steps: # create a vanilla instance vagrant up # enable and provision flow vagrant enable-role flow vagrant provision # at this point flow works vagrant destroy vagrant up # now flow errors out because it cant find its database tables rm settings.d/puppet-managed/10-Flow.php vagrant provision # now everything works again
This happens because the Exec['update database'] puppet step only happens when the contents of the extension specific settings file change. In the given workflow, the puppet run triggered by the second `vagrant up` command will check settings.d/puppet-managed/10-Flow.php and find that the current file on disk has the correct sha1 and thus not fire the notify event that triggers the database update. It should be possible to use the vagrant plugin API's `action_hook` call as part of the MediaWiki-Vagrant plugin to install a routine to run following `vagrant destroy` that would clean up the various puppet-managed settings files in settings.d. This would mimic the manual `rm` of the extension settings. I have a `dist-clean.sh` script that I use to reset the Vagrant environment that I use for testing pending gerrit commits which does something similar: #!/usr/bin/env bash set -e vagrant destroy -f rm settings.d/puppet-managed/* git checkout -- settings.d/puppet-managed/README rm -rf settings.d/multiwiki/ rm -rf puppet/manifests/manifests.d/vagrant-managed.pp rm -rf .settings.yaml
Change 146002 had a related patch set uploaded by BryanDavis: Purge puppet created files on host when destroying https://gerrit.wikimedia.org/r/146002
Change 146002 merged by jenkins-bot: Purge puppet created files on host when destroying https://gerrit.wikimedia.org/r/146002