cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "venkata swamybabu budumuru (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CLOUDSTACK-4013) [PortableIP] [MultiplePhysicalNetworks] Associate portable IP is trying to insert network id as physical network id
Date Wed, 07 Aug 2013 09:46:49 GMT

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

venkata swamybabu budumuru closed CLOUDSTACK-4013.
--------------------------------------------------


Have verified it on the latest CloudStack build and it now inserts the right physical network
id in  cloud.vlan table. below is the snippet of the same. Closing the bug.

mysql> select * from vlan;
+----+--------------------------------------+----------+--------------+---------------+-----------------------------+----------------+----------------+------------+---------------------+-------------+----------+-----------+
| id | uuid                                 | vlan_id  | vlan_gateway | vlan_netmask  | description
                | vlan_type      | data_center_id | network_id | physical_network_id | ip6_gateway
| ip6_cidr | ip6_range |
+----+--------------------------------------+----------+--------------+---------------+-----------------------------+----------------+----------------+------------+---------------------+-------------+----------+-----------+
|  1 | 1f4f6834-3ba1-4d6e-b325-850e4ea31377 | 44       | 10.147.44.1  | 255.255.255.0 | 10.147.44.60-10.147.44.69
  | VirtualNetwork |              1 |        200 |                 200 | NULL        | NULL
    | NULL      |
|  2 | c5b103f2-708c-4038-9d72-6412148868b0 | untagged | 10.147.40.1  | 255.255.254.0 | 10.147.40.80-10.147.40.89
  | DirectAttached |              2 |        208 |                 201 | NULL        | NULL
    | NULL      |
|  3 | 0cf0684b-7970-47bd-aff5-d37d0d8d7bb7 | 54       | 10.147.54.1  | 255.255.255.0 | 10.147.54.60-10.147.54.69
  | VirtualNetwork |              2 |        204 |                 201 | NULL        | NULL
    | NULL      |
|  4 | 817e8bd6-0cfe-495c-911c-9343ac3a6ac7 | 48       | 10.147.48.1  | 255.255.255.0 | 10.147.48.100-10.147.48.100
| VirtualNetwork |              2 |        204 |                 201 | NULL        | NULL
    | NULL      |
+----+--------------------------------------+----------+--------------+---------------+-----------------------------+----------------+----------------+------------+---------------------+-------------+----------+-----------+
4 rows in set (0.00 sec)
                
> [PortableIP] [MultiplePhysicalNetworks] Associate portable IP is trying to insert network
id as physical network id
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-4013
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4013
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.2.0
>         Environment: commit id # 9cd4e089a5798f422961940efbf8ae33ed906b87
>            Reporter: venkata swamybabu budumuru
>            Assignee: Murali Reddy
>            Priority: Critical
>             Fix For: 4.2.0
>
>         Attachments: logs.tgz
>
>
> Steps to reproduce :
> 1. Have at least 1 zone with more than one physical network.
> 2. create at least one isolated / VPC network.
> 3. deploy at least one VM in the above network (This step doesn't matter here)
> 4. associate at least one portableIP.
> Observations:
> (i) It fails with the following error.
> 2013-08-01 21:08:22,035 DEBUG [db.Transaction.Transaction] (catalina-exec-22:null) Rolling
back the transaction: Time = 12 Name =  allocatePortableIp; called by -Transaction.rollback:896-Transaction.removeUpTo:839-Transaction.close:663-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:133-NetworkManagerImpl.allocatePortableIp:834-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125-NetworkServiceImpl.allocatePortableIP:603-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125-AssociateIPAddrCmd.create:276-ApiDispatcher.dispatchCreateCmd:104-ApiServer.queueCommand:460
> 2013-08-01 21:08:22,047 ERROR [cloud.api.ApiServer] (catalina-exec-22:null) unhandled
exception executing api command: associateIpAddress
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.jdbc.JDBC4PreparedStatement@46638fd3:
INSERT INTO vlan (vlan.vlan_id, vlan.vlan_gateway, vlan.vlan_netmask, vlan.ip6_gateway, vlan.ip6_cidr,
vlan.data_center_id, vlan.description, vlan.ip6_range, vlan.network_id, vlan.physical_network_id,
vlan.vlan_type, vlan.uuid) VALUES (_binary'48', _binary'10.147.48.1', _binary'255.255.255.0',
null, null, 2, _binary'10.147.48.103-10.147.48.103', null, 204, 204, 'VirtualNetwork', _binary'9cbcf1ce-1a1c-47a7-af48-c4d074c44bb0')
> 	at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1348)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at com.cloud.network.NetworkManagerImpl.allocatePortableIp(NetworkManagerImpl.java:834)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at com.cloud.network.NetworkServiceImpl.allocatePortableIP(NetworkServiceImpl.java:603)
> 	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:1146)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:679)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Cannot add or update a child row: a foreign key constraint fails (`cloud`.`vlan`, CONSTRAINT
`fk_vlan__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`
(`id`))
> 	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
> 2013-08-01 21:08:22,058 DEBUG [cloud.api.ApiServlet] (catalina-exec-22:null) ===END===
 10.104.255.13 -- GET  command=associateIpAddress&response=json&sessionkey=h6Mx8XmDIxmLHaEr3fH7026LeBY%3D&isportable=true&networkid=295b399b-8bd5-44e0-bad2-ee48ba38eb7e&_=1375371510963
> (iii) looks like we are by mistake inserting the network_id as physical_network_id. In
this case when 204 network id is inserted as physical_network_id then it fails because there
is no physical network with the above id.
> Attaching all the required logs along with db dump to the bug.

--
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

Mime
View raw message