Merge lp:~julian-edwards/launchpad/disable-failures-bm-bug-676479 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Jelmer Vernooij |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11938 |
Proposed branch: | lp:~julian-edwards/launchpad/disable-failures-bm-bug-676479 |
Merge into: | lp:launchpad |
Diff against target: |
194 lines (+101/-7) 4 files modified
lib/lp/buildmaster/manager.py (+5/-3) lib/lp/buildmaster/model/builder.py (+39/-3) lib/lp/buildmaster/tests/test_builder.py (+54/-0) lib/lp/code/model/recipebuilder.py (+3/-1) |
To merge this branch: | bzr merge lp:~julian-edwards/launchpad/disable-failures-bm-bug-676479 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij (community) | code | Approve | |
Review via email: mp+41068@code.launchpad.net |
Commit message
Make XMLRPC connections to builder slaves respect the config's timeout value.
Description of the change
This branch tries to fix an issue with the buildd-manager where it's disabling a lot of builders en-masse.
It appears to be a problem when dispatching a lot of recipe builds at once. These are known to take the builder into swap as the bzr checkout process is quite heavyweight. This makes the builder quite unresponsive.
The default Twisted TCP connection timeout is 30 seconds, which appears to not be enough to allow a heavily loaded builder slave to respond to an xmlrpc request. Twisted also does not allow you to override this timeout, so to fix this I've basically copied some chunks from the Proxy class and altered parts to supply the timeout value to reactor.
The new test relies on the fact that connectTCP() is never actually called, so we don't need to worry about getting other types of connection errors.
It's a pity that we need this, both because xmlrpc.Proxy should have its own timeout argument and because the slave really shouldn't take that long to respond. This seems like a reasonable way to deal with it for the moment though. Also, yay for more logging.
Two minor stylistic issues: the "from twisted.internet import ssl" on line 39 could be in the head of the file, and the 'd' variable should be longer according to our style guide.