qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DISPATCH-749) unmapping all link-routing addresses leaves half of addresses mapped
Date Mon, 24 Apr 2017 15:24:04 GMT

    [ https://issues.apache.org/jira/browse/DISPATCH-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981350#comment-15981350
] 

ASF GitHub Bot commented on DISPATCH-749:
-----------------------------------------

Github user ganeshmurthy commented on the issue:

    https://github.com/apache/qpid-dispatch/pull/160
  
    Can we do this instead
    
    `while self.mobile_addresses: 
        self.unmap_address(self.mobile_addresses.pop(0))
    `


> unmapping all link-routing addresses leaves half of addresses mapped
> --------------------------------------------------------------------
>
>                 Key: DISPATCH-749
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-749
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Router Node
>            Reporter: Pavel Moravec
>            Assignee: Pavel Moravec
>
> Setup:
> qpidd < - > qdrouterd(S) < - > qdrouterd(C) < - clients
> where clients are link-routing via the qdrouterd network to qpidd.
> Under specific situations (see https://bugzilla.redhat.com/show_bug.cgi?id=1426242 for
details), when qdrouterd(S) is not available for some time, qdrouterd(C) returns "qd:no-route-to-dest"
to its clients - so far so good.
> But the error persists even after qdrouterd(S) is up, connected from qdrouterd(C), all
links established and addresses mapped.
> The cause is, https://github.com/apache/qpid-dispatch/blob/master/python/qpid_dispatch_internal/router/node.py#L536-L537
does _not_ unmap all  addresses:
> {code}
>     $ python
>     Python 2.7.5 (default, Aug  2 2016, 04:20:16) 
>     [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
>     Type "help", "copyright", "credits" or "license" for more information.
>     >>> mobile_addresses = ['a.', 'b.', 'c.', 'd.']
>     >>> for addr in mobile_addresses:
>     ...   mobile_addresses.remove(addr)
>     ... 
>     >>> print mobile_addresses
>     ['b.', 'd.']
>     >>> 
> {code}
> We can't iterate a list that way while removing items from it.
> Trivial fix allows so:
> {code}
>     for addr in mobile_addresses[:]:
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message