[asterisk-dev] [Code Review] 3806: Testsuite: Ensure AMI connections are cleaned up before stopping asterisk

Matt Jordan reviewboard at asterisk.org
Wed Jul 16 12:03:30 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3806/#review12687
-----------------------------------------------------------



asterisk/trunk/lib/python/asterisk/test_case.py
<https://reviewboard.asterisk.org/r/3806/#comment22968>

    ami.logoff is not an atomic operation. That means you will be issuing the order to 'core stop ...' while the AMI action is in flight. Technically, we should be:
    
    * Telling the AMI protocol to log off
    * Once logged off, executing a stop of Asterisk
    
    I'd expect the order of operations to be:
    
    * Execute the virtual function
    * For each instance of Asterisk, issue the logoff. Gather up all of them into a deferred list
    * In the AMI deferred list success, stop asterisk
    * In the AMI deferred list error, panic with an ERROR and stop asterisk anyway
    * In the stop Asterisk routine, do the existing mechanism of calling stop() on the Asterisk instances, putting them into another deferred list, etc.


- Matt Jordan


On July 16, 2014, 10:31 a.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3806/
> -----------------------------------------------------------
> 
> (Updated July 16, 2014, 10:31 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> Clean up AMI connections just before shutting down asterisk. This prevents reference leaks related to manager sessions.
> 
> 
> Diffs
> -----
> 
>   asterisk/trunk/lib/python/asterisk/test_case.py 5223 
> 
> Diff: https://reviewboard.asterisk.org/r/3806/diff/
> 
> 
> Testing
> -------
> 
> Ensured that the reference logs did not contain manager leaks.
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140716/13b4f693/attachment.html>


More information about the asterisk-dev mailing list