Merge lp:~allenap/maas/dns-timeout--bug-1672735 into lp:~maas-committers/maas/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gavin Panella | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5923 | ||||
Proposed branch: | lp:~allenap/maas/dns-timeout--bug-1672735 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
357 lines (+89/-23) 11 files modified
src/maasserver/listener.py (+2/-1) src/maasserver/regiondservices/reverse_dns.py (+6/-4) src/maasserver/regiondservices/tests/test_reverse_dns.py (+16/-0) src/maasserver/utils/async.py (+1/-5) src/provisioningserver/events.py (+2/-2) src/provisioningserver/rpc/clusterservice.py (+2/-2) src/provisioningserver/utils/services.py (+2/-2) src/provisioningserver/utils/testing.py (+20/-0) src/provisioningserver/utils/tests/test_network.py (+2/-5) src/provisioningserver/utils/tests/test_twisted.py (+24/-2) src/provisioningserver/utils/twisted.py (+12/-0) |
||||
To merge this branch: | bzr merge lp:~allenap/maas/dns-timeout--bug-1672735 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+321825@code.launchpad.net |
Commit message
Suppress/ignore DNS time-outs when consuming neighbour events.
This also creates a new suppress function that is used instead of Failure.trap to suppress exceptions in a Deferred callback chain, and adds a testing helper callWithRunning
Description of the change
This branch contains some other, related, changes:
- Makes the module-local `suppress` function into a shared util.
Previously I had used Failure.trap, but this returns the unwrapped
exception when it matches, and this is then passed to the next
callback in a Deferred. I don't think this has caused any harm, but
it's a loose end that /may/ conceivably have caused problems, and will
inevitably cause confusion some day.
- Creates a testing helper, callWithRunning
Twisted service, calls a function, then stops the service again (akin
to wrapping it in a try...finally). The result of calling the function
is returned as the result of the Deferred.
Looks good; thanks for the fix.
Minor nit: I think some of your description deserves to be in the commit message.