Last modified: 2013-07-25 07:06:01 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 T49275, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47275 - morebots goes into an infinite loop of doing nothing after a connection reset
morebots goes into an infinite loop of doing nothing after a connection reset
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Kunal Mehta (Legoktm)
:
Depends on:
Blocks: 47228
  Show dependency treegraph
 
Reported: 2013-04-16 03:56 UTC by Tim Starling
Modified: 2013-07-25 07:06 UTC (History)
7 users (show)

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


Attachments

Description Tim Starling 2013-04-16 03:56:36 UTC
irclib.ServerConnection represents a single low-level connection to a server, it doesn't restart the connection if it is reset for whatever reason. The caller in adminlogbot.py doesn't restart the connection either, it just continues in an infinite loop of calling bot.irc.process_once(), which does nothing after the connection is closed.

The version of irclib available on wikitech-static (0.4.8) also has an "ircbot" library, which provides a higher level interface including automatic reconnection. Using this library instead would hopefully give us a morebots service which doesn't need constant manual restarts.
Comment 1 Tim Starling 2013-04-22 06:41:34 UTC
Added some relevant developers to the CC list.
Comment 2 Gerrit Notification Bot 2013-04-22 07:57:02 UTC
Related URL: https://gerrit.wikimedia.org/r/60240 (Gerrit Change Id39158c68a5a2df1e601cf4a7a616ba046853ba6)
Comment 3 Ori Livneh 2013-04-23 09:24:30 UTC
(In reply to comment #1)
> Added some relevant developers to the CC list.

Is this urgent? If not, I'd like to continue working with Legoktm on his patch, which is coming along well.

Some notes to help with testing changes:

* irc 0.4.8-1 is available in Ubuntu Precise as 'python-irclib'
* Argument parsing is faulty at the moment, which means you *have* to specify a config file by passing --config=/path/to/mybot.py
* There's a sample configuration file in the repo: 'config.py'
Comment 4 Ryan Lane 2013-04-23 20:01:04 UTC
I'd really like the config file to be something other than a python file. YAML would be a good option. It should allow the config option, but should default to /etc/adminbot/config.yaml. It sucks to have to munge the include path to add the config file.
Comment 5 Tim Starling 2013-04-23 23:43:38 UTC
(In reply to comment #3)
> Is this urgent? If not, I'd like to continue working with Legoktm on his
> patch, which is coming along well.

It's not urgent.
Comment 6 Andrew Bogott 2013-05-13 22:02:15 UTC
The non-production bots (labs, e3, analytics) are now using new code which should survive a netsplit.  Version 1.7.3, using this patch:  https://gerrit.wikimedia.org/r/#/c/60240/7

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


Navigation
Links