<div dir="ltr">Thanks, those directions fixed my instance!<div><br></div><div>-- brion</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 15, 2014 at 2:21 PM, Bryan Davis <span dir="ltr"><<a href="mailto:bd808@wikimedia.org" target="_blank">bd808@wikimedia.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I made a patch to migrate the MediaWiki-Vagrant clone used by<br>
role::labs::vagrant from /mnt/vagrant to /srv/vagrant [0] that was<br>
merged into operations/puppet.git today. Unfortunately, this patch has<br>
a bug that leads to non-deterministic behavior. The outcome in the<br>
crap-bryan-why-did-you-break-that case is that the contents of the old<br>
/mnt/vagrant directory were copied to /srv/vagrant *before* the new<br>
disk partition was mounted. This happened to at least 2 labs-vagrant<br>
hosts that I know of. When it does happen, all is not lost!<br>
<br>
== Recovering old /mnt/vagrant contents ==<br>
# Becoming root just makes typing the rest of this easier<br>
$ su -i<br>
<br>
# Make a temporary mount point<br>
$ mkdir /mnt/bd808-is-a-dork<br>
<br>
# Re-mount the root disk at the temporary mount point<br>
$ mount --bind / /mnt/bd808-is-a-dork<br>
<br>
# Chdir to the shadowed /srv directory<br>
$ cd /mnt/bd808-is-a-dork/srv<br>
<br>
# Move the "new" copy of MediaWiki-Vagrant out of the way<br>
$ mv /srv/vagrant /srv/vagrant-that-bd808-messed-up<br>
<br>
# Copy the prior vagrant directory to /srv/vagrant<br>
$ tar cf - vagrant | (cd /srv; tar xvf -)<br>
<br>
# Re-provision via labs-vagrant<br>
$ cd /vagrant<br>
$ labs-vagrant provision<br>
<br>
# Check to make sure things are ok again.<br>
# Your instance may have had other content in /srv that you wish to restore.<br>
<br>
# Clean up the mess.<br>
$ rm -rf /mnt/bd808-is-a-dork/srv/vagrant<br>
$ umount /mnt/bd808-is-a-dork<br>
$ rm -rf /srv/vagrant-that-bd808-messed-up<br>
<br>
<br>
[0]: <a href="https://gerrit.wikimedia.org/r/#/c/145974" target="_blank">https://gerrit.wikimedia.org/r/#/c/145974</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Bryan<br>
--<br>
Bryan Davis              Wikimedia Foundation    <<a href="mailto:bd808@wikimedia.org">bd808@wikimedia.org</a>><br>
[[m:User:BDavis_(WMF)]]  Sr Software Engineer            Boise, ID USA<br>
irc: bd808                                        v:415.839.6885 x6855<br>
<br>
_______________________________________________<br>
Labs-l mailing list<br>
<a href="mailto:Labs-l@lists.wikimedia.org">Labs-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/labs-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/labs-l</a><br>
</font></span></blockquote></div><br></div>