You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Abhinandan Prateek (JIRA)" <ji...@apache.org> on 2013/09/05 12:16:52 UTC

[jira] [Updated] (CLOUDSTACK-4596) CloudStack is currently allowing same ip range to be defined in different VLANs across public and portable ranges

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-4596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Abhinandan Prateek updated CLOUDSTACK-4596:
-------------------------------------------

    Priority: Critical  (was: Major)
    
> CloudStack is currently allowing same ip range to be defined in different VLANs across public and portable ranges
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-4596
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4596
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Network Controller
>    Affects Versions: 4.2.0
>            Reporter: venkata swamybabu budumuru
>            Assignee: Murali Reddy
>            Priority: Critical
>             Fix For: 4.2.0
>
>
> Steps to reproduce :
> 1. Have latest CloudStack with at least 1 advanced zone.
> 2. Have at least 1 public VLAN and a range added for advanced zone
> For ex : 
> VLAN : 44
> Startip  : 10.147.44.100
> Endip  : 10.147.44.109
> netmask : 255.255.255.0
> 3. add the same above ip range for portable IPs with a different VLAN
> Observations:
> (i) The above step (3) doesn't throw any error that the same ip range is being used in different VLAN and that is allowing it.
> (ii) Due to the above behaviour when user tries to acquire the same ip from different vlans then it throws an error saying "Entity already exists"
> Here is the snippet from mgmt server log.
> 2013-09-03 04:39:50,996 DEBUG [cloud.api.ApiServlet] (catalina-exec-7:null) ===START===  10.252.192.43 -- GET  command=associateIpAddress&response=json&sessionkey=A9SZ7jF%2Fu24xbL7DG%2BGdGT4BcyY%3D&isportable=true&networkid=24c91328-27a8-4981-a704-1efd6e5aeca8&_=1378197591134
> 2013-09-03 04:39:51,038 DEBUG [db.Transaction.Transaction] (catalina-exec-7:null) Rolling back the transaction: Time = 13 Name =  allocatePortableIp; called by -Transaction.rollback:898-Transaction.removeUpTo:841-Transaction.close:665-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:133-NetworkManagerImpl.allocatePortableIp:870-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125-NetworkServiceImpl.allocatePortableIP:589-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125-AssociateIPAddrCmd.create:276-ApiDispatcher.dispatchCreateCmd:104-ApiServer.queueCommand:460
> 2013-09-03 04:39:51,150 ERROR [cloud.api.ApiServer] (catalina-exec-7:null) unhandled exception executing api command: associateIpAddress
> javax.persistence.EntityExistsException: Entity already exists: 
> 	at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1346)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at com.cloud.network.NetworkManagerImpl.allocatePortableIp(NetworkManagerImpl.java:870)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at com.cloud.network.NetworkServiceImpl.allocatePortableIP(NetworkServiceImpl.java:589)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd.create(AssociateIPAddrCmd.java:276)
> 	at com.cloud.api.ApiDispatcher.dispatchCreateCmd(ApiDispatcher.java:104)
> 	at com.cloud.api.ApiServer.queueCommand(ApiServer.java:460)
> 	at com.cloud.api.ApiServer.handleRequest(ApiServer.java:372)
> 	at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:305)
> 	at com.cloud.api.ApiServlet.doGet(ApiServlet.java:66)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> 	at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
> 	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
> 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:679)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10.0.0.2-200' for key 'public_ip_address'
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> 	at com.mysql.jdbc.Util.getInstance(Util.java:386)
> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
> 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
> 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
> 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
> 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
> 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
> 	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
> 	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
> 	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371)
> 	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355)
> 	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
> 	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
> 	at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1311)
> 	... 40 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira