cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9793) Unnecessary conversion from IPNetwork to list causes router slowdown when processing static Nat rules
Date Tue, 28 Feb 2017 00:04:45 GMT

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

ASF subversion and git services commented on CLOUDSTACK-9793:
-------------------------------------------------------------

Commit d5c5eb10f8a4fb80aa8b9182290948755cdd6026 in cloudstack's branch refs/heads/master from
[~stefaniab]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=d5c5eb1 ]

CLOUDSTACK-9793: Faster ip in subnet check

This change removes an unnecessary conversion from IPNetwork
to list in one of the router scripts. This makes the router
faster at processing static NAT rules, which can prevent
timeouts when attaching or detaching IPs.


> Unnecessary conversion from IPNetwork to list causes router slowdown when processing
static Nat rules
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9793
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9793
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Virtual Router
>    Affects Versions: 4.7.0, 4.8.0, 4.9.0
>            Reporter: Stefania Bergljot Stefansdottir
>             Fix For: 4.10.0.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In the CsInterface class in CsAddress.py on the virtual router there's a function
> {code:java}
> def ip_in_subnet(self, ip):
>     ipo = IPAddress(ip)
>     net = IPNetwork("%s/%s" % (self.get_ip(), self.get_size()))
>     return ipo in list(net)
> {code}
> Skipping the list conversion and using "return ipo in net" is much faster and the functionality
is the same. It can prevent a router timeout when attaching or detaching multiple IPs.



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

Mime
View raw message