Last modified: 2014-02-27 12:42:16 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 T53936, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51936 - Set up a server for query relaying
Set up a server for query relaying
Status: RESOLVED WONTFIX
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks: 51935
  Show dependency treegraph
 
Reported: 2013-07-24 08:47 UTC by Peter Bena
Modified: 2014-02-27 12:42 UTC (History)
3 users (show)

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


Attachments

Description Peter Bena 2013-07-24 08:47:14 UTC
For example you may want to host a tool that listen on some port, but if you run it on grid the hostname is random.

For this reason you need to have a static hostname (server) that relay the tcp connections to that hostname which the bot is running at.
Comment 1 Peter Bena 2013-07-24 08:52:52 UTC
For example bot A is listening on port 26242

you always need to be able to connect to somehost:26242

This is not possible now when the bot is running on grid
Comment 2 Tim Landscheidt 2013-07-24 14:58:08 UTC
You can write the hostname the server is running on to a publicly readable file so this isn't a problem.  I fear that solving this with ad-hoc iptables would be very complex overkill :-).
Comment 3 Peter Bena 2013-07-24 15:10:05 UTC
where such a file would be hosted, how can you ensure that people would be able to read it from foreign projects and send the query to execution host through firewall?
Comment 4 Tim Landscheidt 2013-07-24 19:02:37 UTC
(In reply to comment #3)
> where such a file would be hosted, how can you ensure that people would be
> able
> to read it from foreign projects and send the query to execution host through
> firewall?

You want users to run arbitrary services on ports available from the InterNet?  I think that's outside the scope of Tools and should be solved in dedicated Labs projects.
Comment 5 Marc A. Pelletier 2013-07-24 19:24:24 UTC
Not only is this outside the scope of tool labs, but it's going to be specifically prohibited; in order to allow the general Wikimedia privacy policy to apply, tools are not allowed to gather IP addresses from their users (which allowing connections from outside would allow).

Tools that need to host publicly-accessible network services must do so from their own project (and subject to the general Labs TOU, including the necessity of posting disclaimers and a lesser privacy policy).
Comment 6 Yuvi Panda 2013-07-24 19:25:49 UTC
I talked to Ryan_Lane about hipache, and when we implement that (+ similar IP scrubbing, etc), we can have this.
Comment 7 Peter Bena 2013-07-25 07:09:24 UTC
Ok I think that this effectively kills the migration of wm-bot then...
Comment 8 Yuvi Panda 2013-07-25 07:19:27 UTC
Why does this kill wm-bot migration?
Comment 9 Tim Landscheidt 2013-08-04 04:35:28 UTC
(In reply to comment #8)
> Why does this kill wm-bot migration?

Looking at https://wikitech.wikimedia.org/wiki/Nova_Resource:Bots/Documentation/wm-bot, it seems to be fairly easy to translate it to Tools without external access.  Just replace the "local sysadmin console" with calls to "jstart wm-bot3" and "jstop wm-bot3" with the added benefit that you don't need to manage a password, but can rely on Tools' users group.  For convenience, you can add scripts that start or stop all bot instances.

I don't see a reason why you would need a bouncer because when the bot instance does not have network access, the bouncer will not have either; but if that is a must, you can start one in the start-up script ("wm-bot3" in the above example).  This will then be on the localhost.
Comment 10 Peter Bena 2014-02-27 12:36:19 UTC
(In reply to Yuvi Panda from comment #8)
> Why does this kill wm-bot migration?

because it requires this feature for it to works. No query relaying, no wm-bot. It's that simple.

If this isn't possible in tools and separate project needs to exist for it, then wm-bot can't be hosted in tools and it needs to be hosted in separate project.
Comment 11 Peter Bena 2014-02-27 12:39:43 UTC
(In reply to Tim Landscheidt from comment #9)
> (In reply to comment #8)
> > Why does this kill wm-bot migration?
> 
> Looking at
> https://wikitech.wikimedia.org/wiki/Nova_Resource:Bots/Documentation/wm-bot,
> it seems to be fairly easy to translate it to Tools without external access.
> Just replace the "local sysadmin console" with calls to "jstart wm-bot3" and
> "jstop wm-bot3" with the added benefit that you don't need to manage a
> password, but can rely on Tools' users group.  For convenience, you can add
> scripts that start or stop all bot instances.
> 
> I don't see a reason why you would need a bouncer because when the bot
> instance does not have network access, the bouncer will not have either; but
> if that is a must, you can start one in the start-up script ("wm-bot3" in
> the above example).  This will then be on the localhost.

The reason why bot is using bouncers isn't better stability from network point of view, but because its core is frequently patched and restarted.

Because I don't want wm-bot to reconnect to freenode and rejoin these 180 channels everytime (putting heavy load on freenode as well) I am using bouncers. It has nothing to do with network connectivity, it just prevents annoying quit / joins as well as holes in channel logs.
Comment 12 Peter Bena 2014-02-27 12:42:16 UTC
By the way, this query relaying isn't required for bouncers (it has nothing to do with connection bouncing). It is required for NetCat plugin to work, which is being used in a huge number of channels and is one of best features this bot provides - it actively relay any TCP text messages sent from anything, including simple shell script like

#!/bin/sh

echo "#wm-bot hello world" | nc bots-labs 64834 -w0

loosing this feature just by migrating to tool labs isn't really worth of any migration

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


Navigation
Links