Last modified: 2014-09-09 20:23:21 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 T71720, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69720 - Ram and port forwarding broken again
Ram and port forwarding broken again
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Dan Duvall
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-18 21:37 UTC by Nik Everett
Modified: 2014-09-09 20:23 UTC (History)
4 users (show)

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


Attachments
Hacky debug logging patch for lib/mediawiki-vagrant/settings.rb (1.91 KB, patch)
2014-08-18 23:34 UTC, Bryan Davis
Details

Description Nik Everett 2014-08-18 21:37:42 UTC
Ram and port forwarding broke again for me this afternoon so I decided to do a from scratch setup - clone mediawiki-vagrant and follow the instructions and everything.  I created the machine, added the cirrus role, reprovisioned it, and the port forward and ram change are not taking effect no matter how many times I `vagrant provision` or `vagrant reload`.
Comment 1 Bryan Davis 2014-08-18 21:59:12 UTC
Nik clarified on irc that the settings he's not seeing take effect are the ones set by the cirrussearch role.
Comment 2 Bryan Davis 2014-08-18 23:28:28 UTC
I added a bunch of logging to my mediawiki-vagrant plugin to try and debug this. Unfortunately I can't recreate the problem.

For me, settings in .settings.yaml made with `vagrant configure vagrant_ram N` work. Settings in vagrant.d/10-cirrussearch.yaml also work.

Note that `vagrant config --get vagrant_ram` will not show values which are set via vagrant.d/*.yaml as it only reads data from .settings.yaml.
Comment 3 Bryan Davis 2014-08-18 23:34:37 UTC
Created attachment 16232 [details]
Hacky debug logging patch for lib/mediawiki-vagrant/settings.rb

Apply patch and run `./setup.sh` to activate. You should get a lot of messages to stdout describing the activity of settings resolution.
Comment 4 Dan Duvall 2014-08-18 23:52:08 UTC
Looking at the coercion of vagrant_ram and the order in which settings files are loaded (vagrant.d/*.yaml then .settings.yaml), a setting in the latter will always take precedence.

We can either: 1) change the order so that entries from vagrant.d override those from .settings.yaml; or 2) change the coercion for vagrant_ram to take the greater of the old or new value—currently, it takes the greater of the new and _default_ value. Keep in mind that option 2 introduces the side effect that one can't lower vagrant_ram; it can only go up!

I'm not sure why forward_ports would break in this same way but I'll take a closer look.
Comment 5 Bryan Davis 2014-08-18 23:54:39 UTC
(In reply to Dan Duvall from comment #4)
> 2) change the coercion for vagrant_ram to take the greater of the old 
> or new value—currently, it takes the greater of the new and _default_ 
> value. Keep in mind that option 2 introduces the side
> effect that one can't lower vagrant_ram; it can only go up!

I'm pretty sure that this was my original logic (take the largest value found anywhere). Who wants less ram? :)
Comment 6 Dan Duvall 2014-08-19 00:07:16 UTC
Easy enough! I'll submit a patch.

FWICT, foward_ports in .settings.yaml _is_ being merged correctly with the hash in vagrant.d/10-cirrussearch.yaml.
Comment 7 Gerrit Notification Bot 2014-08-19 00:17:36 UTC
Change 154975 had a related patch set uploaded by Dduvall:
Use the largest of all configured vagrant_ram values

https://gerrit.wikimedia.org/r/154975
Comment 8 Nik Everett 2014-08-19 02:33:01 UTC
So I just checked .settings.yml and now it has the right stuff in it - 2GB of ram and the port forwarding.  I don't know what it had before but _something_ put the right stuff in it now.  And reloading the vm added the ram and set up the port forwarding.  I really have no idea why it wasn't taking before.
Comment 9 Gerrit Notification Bot 2014-08-19 02:34:42 UTC
Change 154975 merged by jenkins-bot:
Use the largest of all configured vagrant_ram values

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

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


Navigation
Links