Last modified: 2014-07-14 20:06:10 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 T64550, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62550 - vagrant destroy && vagrant up doesn't trigger the needs_update field of mediawiki::extension
vagrant destroy && vagrant up doesn't trigger the needs_update field of media...
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: 2014-03-11 21:54 UTC by Erik Bernhardson
Modified: 2014-07-14 20:06 UTC (History)
3 users (show)

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


Attachments

Description Erik Bernhardson 2014-03-11 21:54:56 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
Comment 1 Bryan Davis 2014-07-13 19:32:31 UTC
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
Comment 2 Gerrit Notification Bot 2014-07-14 00:39:51 UTC
Change 146002 had a related patch set uploaded by BryanDavis:
Purge puppet created files on host when destroying

https://gerrit.wikimedia.org/r/146002
Comment 3 Gerrit Notification Bot 2014-07-14 20:04:27 UTC
Change 146002 merged by jenkins-bot:
Purge puppet created files on host when destroying

https://gerrit.wikimedia.org/r/146002

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


Navigation
Links