= Summary =
Enforce timeouts for jobs running under Twisted.
== Proposed fix ==
Use Ampoule's timeout handling.
== Pre-implementation notes ==
This was discussed a bit with mwhudson.
== Implementation details ==
Use Job.getTimeout to determine the job's timeout and run it with that timeout.
Ideally, timeouts should cause the subprocess to oops, so subclass ProcessPool
as HUPProcessPool, and override _handleTimeout to use HUP instead. Install a
signal handler for HUP in the child process that raises TimeoutError.
The lease must be acquired before the job is run in order to determine the
timeout, so move acquireLease to JobRunner.runAll and
TwistedJobRunner.runJobInSubprocess.
Extract most of the bootstrap code to lp.services.job.runner.bootstrap()
= Summary =
Enforce timeouts for jobs running under Twisted.
== Proposed fix ==
Use Ampoule's timeout handling.
== Pre-implementation notes ==
This was discussed a bit with mwhudson.
== Implementation details ==
Use Job.getTimeout to determine the job's timeout and run it with that timeout.
Ideally, timeouts should cause the subprocess to oops, so subclass ProcessPool
as HUPProcessPool, and override _handleTimeout to use HUP instead. Install a
signal handler for HUP in the child process that raises TimeoutError.
The lease must be acquired before the job is run in order to determine the r.runJobInSubpr ocess.
timeout, so move acquireLease to JobRunner.runAll and
TwistedJobRunne
Extract most of the bootstrap code to lp.services. job.runner. bootstrap( )
== Tests == preview_ diffs -t test_runner
bin/test -t update_
== Demo and Q/A ==
None, really. We don't have any jobs that exceed timeouts at present.