[ https://issues.apache.org/jira/browse/CLOUDSTACK-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sailaja Mada updated CLOUDSTACK-2560: ------------------------------------- Description: Setup:Advanced Networking Zone Steps: 1. Add ASA 1000v device 2. Try to add same entity again. Observation: 1. It failed saying Entity already exists with exception as below. 2013-05-17 13:49:23,283 DEBUG [cloud.api.ApiServlet] (catalina-exec-10:null) ===START=== 10.144.6.19 -- GET command=addCiscoAsa1000vResource&response=json&sessionkey=rf7k7E4lG9JkweBU1X6hJXm2%2F%2BE%3D&physicalnetworkid=ce0f6c1d-1fe8-47bb-b491-aa5d12cca822&hostname=10.102.192.73&insideportprofile=asa-in&clusterid=1aadb1b3-2217-46e8-8475-4bd82576c04f&_=1368778913053 2013-05-17 13:49:23,332 DEBUG [db.Transaction.Transaction] (catalina-exec-10:null) Rolling back the transaction: Time = 36 Name = persist; called by -Transaction.rollback:890-Transaction.removeUpTo:833-Transaction.close:657-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:133-CiscoVnmcElement.addCiscoAsa1000vResource:863-AddCiscoAsa1000vResourceCmd.execute:91-ApiDispatcher.dispatch:155-ApiServer.queueCommand:519-ApiServer.handleRequest:369-ApiServlet.processRequest:304-ApiServlet.doGet:66 2013-05-17 13:49:23,337 ERROR [cloud.api.ApiServer] (catalina-exec-10:null) unhandled exception executing api command: addCiscoAsa1000vResource javax.persistence.EntityExistsException: Entity already exists: at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1340) at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) at com.cloud.network.element.CiscoVnmcElement.addCiscoAsa1000vResource(CiscoVnmcElement.java:863) at com.cloud.api.commands.AddCiscoAsa1000vResourceCmd.execute(AddCiscoAsa1000vResourceCmd.java:91) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155) at com.cloud.api.ApiServer.queueCommand(ApiServer.java:519) at com.cloud.api.ApiServer.handleRequest(ApiServer.java:369) at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:304) 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.102.192.73' for key 'management_ip' 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:1305) ... 29 more 2013-05-17 13:49:23,341 DEBUG [cloud.api.ApiServlet] (catalina-exec-10:null) ===END=== 10.144.6.19 -- GET command=addCiscoAsa1000vResource&response=json&sessionkey=rf7k7E4lG9JkweBU1X6hJXm2%2F%2BE%3D&physicalnetworkid=ce0f6c1d-1fe8-47bb-b491-aa5d12cca822&hostname=10.102.192.73&insideportprofile=asa-in&clusterid=1aadb1b3-2217-46e8-8475-4bd82576c04f&_=1368778913053 2013-05-17 13:49:41,088 DEBUG [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null) Zone 1 is ready to launch secondary storage VM > Adding duplicate ASA device entity failure should be handled with API > ---------------------------------------------------------------------- > > Key: CLOUDSTACK-2560 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2560 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Sailaja Mada > > Setup:Advanced Networking Zone > Steps: > 1. Add ASA 1000v device > 2. Try to add same entity again. > Observation: > 1. It failed saying Entity already exists with exception as below. > 2013-05-17 13:49:23,283 DEBUG [cloud.api.ApiServlet] (catalina-exec-10:null) > ===START=== 10.144.6.19 -- GET > command=addCiscoAsa1000vResource&response=json&sessionkey=rf7k7E4lG9JkweBU1X6hJXm2%2F%2BE%3D&physicalnetworkid=ce0f6c1d-1fe8-47bb-b491-aa5d12cca822&hostname=10.102.192.73&insideportprofile=asa-in&clusterid=1aadb1b3-2217-46e8-8475-4bd82576c04f&_=1368778913053 > 2013-05-17 13:49:23,332 DEBUG [db.Transaction.Transaction] > (catalina-exec-10:null) Rolling back the transaction: Time = 36 Name = > persist; called by > -Transaction.rollback:890-Transaction.removeUpTo:833-Transaction.close:657-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:133-CiscoVnmcElement.addCiscoAsa1000vResource:863-AddCiscoAsa1000vResourceCmd.execute:91-ApiDispatcher.dispatch:155-ApiServer.queueCommand:519-ApiServer.handleRequest:369-ApiServlet.processRequest:304-ApiServlet.doGet:66 > 2013-05-17 13:49:23,337 ERROR [cloud.api.ApiServer] (catalina-exec-10:null) > unhandled exception executing api command: addCiscoAsa1000vResource > javax.persistence.EntityExistsException: Entity already exists: > at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1340) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > com.cloud.network.element.CiscoVnmcElement.addCiscoAsa1000vResource(CiscoVnmcElement.java:863) > at > com.cloud.api.commands.AddCiscoAsa1000vResourceCmd.execute(AddCiscoAsa1000vResourceCmd.java:91) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155) > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:519) > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:369) > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:304) > 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.102.192.73' for key 'management_ip' > 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:1305) > ... 29 more > 2013-05-17 13:49:23,341 DEBUG [cloud.api.ApiServlet] (catalina-exec-10:null) > ===END=== 10.144.6.19 -- GET > command=addCiscoAsa1000vResource&response=json&sessionkey=rf7k7E4lG9JkweBU1X6hJXm2%2F%2BE%3D&physicalnetworkid=ce0f6c1d-1fe8-47bb-b491-aa5d12cca822&hostname=10.102.192.73&insideportprofile=asa-in&clusterid=1aadb1b3-2217-46e8-8475-4bd82576c04f&_=1368778913053 > 2013-05-17 13:49:41,088 DEBUG [storage.secondary.SecondaryStorageManagerImpl] > (secstorage-1:null) Zone 1 is ready to launch secondary storage VM -- 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