Last modified: 2014-08-04 19:41:44 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 T56042, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54042 - Make role::eventlogging run eventlogging-devserver on port 8100
Make role::eventlogging run eventlogging-devserver on port 8100
Status: NEW
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
: 52872 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-11 21:57 UTC by Bryan Davis
Modified: 2014-08-04 19:41 UTC (History)
4 users (show)

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


Attachments

Description Bryan Davis 2013-09-11 21:57:45 UTC
Vagrant's role::eventlogging installs the EventLogging extension but it does not run any listener to handle the event stream.

Yuvi and I think that the best bet here may be to run the python eventlogging-devserver script via upstart with output redirected to a log in /vagrant/logs.

An open question a this point is the "best" way to do this. Do we use virtualenv to sandbox the python modules required? Do we need a puppet module to help with upstart handling? What other parts are tricky?
Comment 1 Andre Klapper 2013-09-11 22:46:11 UTC
[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]
Comment 2 Ori Livneh 2013-09-12 02:21:14 UTC
(In reply to comment #0)
> What other parts are tricky?

The request to event.gif is generated in the user's browser, which is running in the host environment, not the guest. So if you want the VM to handle events, you need to forward another port. We don't have a great mechanism in place for conditionally forwarding a port on the basis of role activation, so there's that. Role activation happens in Ruby code on the guest, so you could ostensibly have roles that go beyond Puppet manifest manipulation and actually modify the VirtualBox / Vagrant container it executes in. I'm not sure this is the best use-case for it, but it is something that I'd be happy to see implemented.

There are two other things to consider. One is that it's a totally viable option for Wikimedia folks to simply set $wgEventLoggingBaseUri to the Labs endpoint (//bits.beta.wmflabs.org/event.gif) or even production (//bits.wikimedia.org/event.gif). Events generated on your dev instance will be logged, and they'll be marked as hailing from 'devwiki' (or whatever you set your wiki $wgDBname to).

Finally, remember that all that the production beacon endpoints do is log the request. There's no reason why that couldn't be done by MediaWiki -- say, in an API module. This is exactly how the old ClickTracking extension that EventLogging replaced was implemented. We had to move away from that because the application servers are slow and expect the caches to protect them from the brunt of production traffic, whereas events are unique and thus cache-busting. But what's true of Wikimedia's production environment isn't true for your dev wiki or for lots of other small- to mid-sized production wikis that could handle event pings perfectly well. Implementing this would not only obviate the need to open an additional port but also make EventLogging useful to third-parties.

There's a long-standing bug for this, bug 43601. I put some notes and code there. It should be straightforward to do, I just haven't gotten around to it. If one of you guys wants to do it: <3.
Comment 3 Ori Livneh 2013-09-14 07:36:38 UTC
*** Bug 52872 has been marked as a duplicate of this bug. ***
Comment 4 Bryan Davis 2013-09-15 00:31:29 UTC
(In reply to comment #2)
> The request to event.gif is generated in the user's browser, which is running
> in the host environment, not the guest. So if you want the VM to handle
> events, you need to forward another port.

Alternately, the vagrant apache instance could be configured to reverse proxy requests to /event.gif to the port 8100 service via mod_proxy and the ProxyPass directive.
Comment 5 Ori Livneh 2013-09-16 06:36:21 UTC
(In reply to comment #4)
> Alternately, the vagrant apache instance could be configured to reverse proxy
> requests to /event.gif to the port 8100 service via mod_proxy and the
> ProxyPass directive.

As I mentioned in person, I think this is a great idea.
Comment 6 Gerrit Notification Bot 2013-09-17 20:25:27 UTC
Change 84627 had a related patch set uploaded by BryanDavis:
Add role for EventLogging that runs a local server.

https://gerrit.wikimedia.org/r/84627
Comment 7 Gerrit Notification Bot 2013-09-19 04:01:00 UTC
Change 84627 had a related patch set uploaded by Ori.livneh:
Add role for EventLogging that runs a local server.

https://gerrit.wikimedia.org/r/84627
Comment 8 Gerrit Notification Bot 2013-09-23 07:20:20 UTC
Change 84627 abandoned by Ori.livneh:
Add role for EventLogging that runs a local server.

https://gerrit.wikimedia.org/r/84627
Comment 9 Bryan Davis 2014-08-02 17:48:49 UTC
Unlick the cookie. Proposed patch was abandoned.

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


Navigation
Links