← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~flacoste/launchpad/bug-889025 into lp:launchpad

 

Francis J. Lacoste has proposed merging lp:~flacoste/launchpad/bug-889025 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #889025 in Launchpad itself: "Launchpad mailing lists suffer delays"
  https://bugs.launchpad.net/launchpad/+bug/889025
  Bug #889283 in Launchpad itself: "XML-RPC timeout is lower than LP time out"
  https://bugs.launchpad.net/launchpad/+bug/889283

For more details, see:
https://code.launchpad.net/~flacoste/launchpad/bug-889025/+merge/82030

Space is nice.
-- 
https://code.launchpad.net/~flacoste/launchpad/bug-889025/+merge/82030
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~flacoste/launchpad/bug-889025 into lp:launchpad.
=== modified file 'lib/canonical/config/schema-lazr.conf'
--- lib/canonical/config/schema-lazr.conf	2011-10-26 02:14:52 +0000
+++ lib/canonical/config/schema-lazr.conf	2011-11-11 22:05:45 +0000
@@ -1382,8 +1382,10 @@
 # datatype: integer
 xmlrpc_runner_sleep: 10
 
+# Socket timeout on XML-RPC connections made by Mailman.
+# This should at least be higher than the LP request timeout.
 # datatype: integer
-xmlrpc_timeout: 5
+xmlrpc_timeout:10
 
 # How often do we run the bounce processor?  For production, the default 15
 # minutes is fine, for testing we want to run it more often.
@@ -1394,6 +1396,19 @@
 # datatype: string
 smtp: localhost:25
 
+# Ceiling on the number of recipients that can be specified in a single SMTP
+# transaction.  Set to 0 to submit the entire recipient list in one
+# transaction.
+# WARNING: Make sure that this matches the limits on the SMTP host!
+# datatype: integer
+smtp_max_rcpts: 50
+
+# Ceiling on the number of SMTP sessions to perform on a single socket
+# connection.
+# WARNING: Make sure that this matches the limits on the SMTP host!
+# datatype: integer
+smtp_max_sesions_per_connection: 200
+
 # The list owner header is a template URL that may contain
 # $team_name in it.
 # datatype: string

=== modified file 'lib/lp/services/mailman/monkeypatches/__init__.py'
--- lib/lp/services/mailman/monkeypatches/__init__.py	2011-07-27 15:25:32 +0000
+++ lib/lp/services/mailman/monkeypatches/__init__.py	2011-11-11 22:05:45 +0000
@@ -61,6 +61,9 @@
             launchpad_top=launchpad_top,
             smtp_host=host,
             smtp_port=port,
+            smtp_max_rcpts=config.mailman.smtp_max_rcpts,
+            smtp_max_sesions_per_connection
+                =config.mailman.smtp_max_sesions_per_connection,
             xmlrpc_url=config.mailman.xmlrpc_url,
             xmlrpc_sleeptime=config.mailman.xmlrpc_runner_sleep,
             xmlrpc_timeout=config.mailman.xmlrpc_timeout,

=== modified file 'lib/lp/services/mailman/monkeypatches/mm_cfg.py.in'
--- lib/lp/services/mailman/monkeypatches/mm_cfg.py.in	2011-07-27 15:25:32 +0000
+++ lib/lp/services/mailman/monkeypatches/mm_cfg.py.in	2011-11-11 22:05:45 +0000
@@ -22,6 +22,8 @@
 # Our dynamic overrides of all the static defaults.
 SMTPHOST = '%(smtp_host)s'
 SMTPPORT = %(smtp_port)d
+SMTP_MAX_RCPTS = %(smtp_max_rcpts)d
+SMTP_MAX_SESSIONS_PER_CONNECTION = %(smtp_max_sesions_per_connection)d
 
 # Configuration options for the XMLRPCRunner.
 XMLRPC_URL = '%(xmlrpc_url)s'

=== modified file 'lib/lp/services/mailman/tests/test_mm_cfg.py'
--- lib/lp/services/mailman/tests/test_mm_cfg.py	2011-03-31 14:19:28 +0000
+++ lib/lp/services/mailman/tests/test_mm_cfg.py	2011-11-11 22:05:45 +0000
@@ -85,6 +85,15 @@
         self.assertEqual(host, mm_cfg.SMTPHOST)
         self.assertEqual(int(port), mm_cfg.SMTPPORT)
 
+    def test_smtp_max_config(self):
+        # Mailman SMTP max limits are configured from the LP config.
+        self.assertEqual(
+            config.mailman.smtp_max_rcpts,
+            mm_cfg.SMTP_MAX_RCPTS)
+        self.assertEqual(
+            config.mailman.smtp_max_sesions_per_connection,
+            mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION)
+
     def test_xmlrpc_server(self):
         # Launchpad's smtp config values.
         self.assertEqual(


Follow ups