You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Stefania Bergljot Stefansdottir (JIRA)" <ji...@apache.org> on 2017/02/17 13:19:41 UTC
[jira] [Created] (CLOUDSTACK-9793) Unnecessary conversion from
IPNetwork to list causes router slowdown when processing static Nat rules
Stefania Bergljot Stefansdottir created CLOUDSTACK-9793:
-----------------------------------------------------------
Summary: 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.9.0, 4.8.0, 4.7.0
Reporter: Stefania Bergljot Stefansdottir
Fix For: 4.10.0.0
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)