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] [Created] (CLOUDSTACK-2698) [RouterVM] In multi-cluster environment with disabled cluster fails with error "javax.persistence.EntityExistsException: Entity already exists:"
Date Mon, 27 May 2013 12:10:20 GMT
venkata swamybabu budumuru created CLOUDSTACK-2698:
------------------------------------------------------

             Summary: [RouterVM] In multi-cluster environment with disabled cluster fails
with error "javax.persistence.EntityExistsException: Entity already exists:"
                 Key: CLOUDSTACK-2698
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2698
             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
         Environment: commit 80a3c0535e0a8ad3edba3713a61d063a176191d8
            Reporter: venkata swamybabu budumuru
            Priority: Critical
             Fix For: 4.2.0


Steps to reproduce:

1. Have CloudStack with one advanced zone having 2 clusters
 - VMware cluster with 1 host
 - XenServer cluster with 1 host

2. Make sure systemvm and at least one router came up on VMware

3. Disable and unmanage VMware cluster

4. Try to deploy a VPC router 

Observations:-

(i) Even though the VMware cluster is disabled it still tried to bring up system VM template
of type VMware hypervisor and it failed to find a suitable host and failed.

Here is the snippet of management server log.

2013-05-27 11:41:50,144 DEBUG [network.router.VirtualNetworkApplianceManagerImpl] (Job-Executor-37:job-35)
Allocating the domR with the hypervisor type VMware
2013-05-27 11:41:50,150 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Allocating entries for VM: VM[DomainRouter|r-20-VM]
2013-05-27 11:41:50,156 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Allocating nics for VM[DomainRouter|r-20-VM]
2013-05-27 11:41:50,157 DEBUG [cloud.network.NetworkManagerImpl] (Job-Executor-37:job-35)
Allocating nic for vm VM[DomainRouter|r-20-VM] in network Ntwk[202|Control|3] with requested
profile null
2013-05-27 11:41:50,171 DEBUG [cloud.network.NetworkManagerImpl] (Job-Executor-37:job-35)
Allocating nic for vm VM[DomainRouter|r-20-VM] in network Ntwk[200|Public|1] with requested
profile NicProfile[0-0-null-10.147.44.68-vlan://44
2013-05-27 11:41:50,184 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Allocaing disks for VM[DomainRouter|r-20-VM]
2013-05-27 11:41:50,200 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Allocation completed for VM: VM[DomainRouter|r-20-VM] 
2013-05-27 11:41:50,200 DEBUG [network.router.VirtualNetworkApplianceManagerImpl] (Job-Executor-37:job-35)
Starting router VM[DomainRouter|r-20-VM]
2013-05-27 11:41:50,207 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-37:job-35)
VM state transitted from :Stopped to Starting with event: StartRequestedvm's original host
id: null new host id: null host id before state transition: null
2013-05-27 11:41:50,207 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Successfully transitioned to start state for VM[DomainRouter|r-20-VM] reservation id = 9963d5e7-0045-4d19-87fb-8280b0ba008c
2013-05-27 11:41:50,215 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Trying to deploy VM, vm has dcId: 1 and podId: null 
2013-05-27 11:41:50,215 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Deploy avoids pods: null, clusters: null, hosts: null
2013-05-27 11:41:50,218 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
Deploy avoids pods: null, clusters: null, hosts: null
2013-05-27 11:41:50,220 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
DeploymentPlanner allocation algorithm: com.cloud.deploy.FirstFitPlanner_EnhancerByCloudStack_10a196b5@1f54ce2a
2013-05-27 11:41:50,220 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
Trying to allocate a host and storage pools from dc:1, pod:null,cluster:null, requested cpu:
500, requested ram: 134217728
2013-05-27 11:41:50,220 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
Is ROOT volume READY (pool already allocated)?: No
2013-05-27 11:41:50,220 DEBUG [cloud.deploy.FirstFitPlanner] (Job-Executor-37:job-35) Searching
all possible resources under this Zone: 1
2013-05-27 11:41:50,221 DEBUG [cloud.deploy.FirstFitPlanner] (Job-Executor-37:job-35) Listing
clusters in order of aggregate capacity, that have (atleast one host with) enough CPU and
RAM capacity under this Zone: 1
2013-05-27 11:41:50,235 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
Checking resources in Cluster: 1 under Pod: 1
2013-05-27 11:41:50,236 DEBUG [allocator.impl.FirstFitAllocator] (Job-Executor-37:job-35 FirstFitRoutingAllocator)
Looking for hosts in dc: 1  pod:1  cluster:1
2013-05-27 11:41:50,240 DEBUG [allocator.impl.FirstFitAllocator] (Job-Executor-37:job-35 FirstFitRoutingAllocator)
FirstFitAllocator has 0 hosts to check for allocation: []
2013-05-27 11:41:50,243 DEBUG [allocator.impl.FirstFitAllocator] (Job-Executor-37:job-35 FirstFitRoutingAllocator)
Found 0 hosts for allocation after prioritization: []   
2013-05-27 11:41:50,243 DEBUG [allocator.impl.FirstFitAllocator] (Job-Executor-37:job-35 FirstFitRoutingAllocator)
Looking for speed=500Mhz, Ram=128
2013-05-27 11:41:50,243 DEBUG [allocator.impl.FirstFitAllocator] (Job-Executor-37:job-35 FirstFitRoutingAllocator)
Host Allocator returning 0 suitable hosts
2013-05-27 11:41:50,243 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
No suitable hosts found
2013-05-27 11:41:50,243 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
No suitable hosts found under this Cluster: 1
2013-05-27 11:41:50,249 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
Cluster: 2 has HyperVisorType that does not match the VM, skipping this cluster
2013-05-27 11:41:50,249 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] (Job-Executor-37:job-35)
Could not find suitable Deployment Destination for this VM under any clusters, returning.
2013-05-27 11:41:50,249 DEBUG [cloud.deploy.FirstFitPlanner] (Job-Executor-37:job-35) Searching
all possible resources under this Zone: 1
2013-05-27 11:41:50,250 DEBUG [cloud.deploy.FirstFitPlanner] (Job-Executor-37:job-35) Listing
clusters in order of aggregate capacity, that have (atleast one host with) enough CPU and
RAM capacity under this Zone: 1
2013-05-27 11:41:50,255 DEBUG [cloud.deploy.FirstFitPlanner] (Job-Executor-37:job-35) Removing
from the clusterId list these clusters from avoid set: [1, 2]
2013-05-27 11:41:50,255 DEBUG [cloud.deploy.FirstFitPlanner] (Job-Executor-37:job-35) No clusters
found after removing disabled clusters and clusters in avoid list, returning.
2013-05-27 11:41:50,270 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-37:job-35)
VM state transitted from :Starting to Stopped with event: OperationFailedvm's original host
id: null new host id: null host id before state transition: null

(iv) It tried to pick XenServer template up on above failure but, it failed saying entity
already exists.

013-05-27 11:41:50,390 DEBUG [network.router.VirtualNetworkApplianceManagerImpl] (Job-Executor-37:job-35)
Allocating the domR with the hypervisor type XenServer
2013-05-27 11:41:50,396 DEBUG [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-37:job-35)
Allocating entries for VM: VM[DomainRouter|r-20-VM]
2013-05-27 11:41:50,400 DEBUG [db.Transaction.Transaction] (Job-Executor-37:job-35) Rolling
back the transaction: Time = 3 Name =  -AsyncJobManagerImpl$1.run:401-Executors$RunnableAdapter.call:471-FutureTask$Sync.innerRun:334-FutureTask.run:166-ThreadPoolExecutor.runWorker:1146-ThreadPoolExecutor$Worker.run:615-Thread.run:679;
called by -Transaction.rollback:890-Transaction.removeUpTo:833-Transaction.close:657-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:133-VirtualNetworkApplianceManagerImpl.persist:2982-VirtualNetworkApplianceManagerImpl.persist:258-VirtualMachineManagerImpl.allocate:344-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125-VirtualMachineManagerImpl.allocate:397-VirtualNetworkApplianceManagerImpl.deployRouter:1644-VpcVirtualNetworkApplianceManagerImpl.deployVpcRouter:325
2013-05-27 11:41:50,401 WARN  [network.vpc.VpcManagerImpl] (Job-Executor-37:job-35) Failed
to start vpc [VPC [4-test] due to
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.router.VirtualNetworkApplianceManagerImpl.persist(VirtualNetworkApplianceManagerImpl.java:2982)
        at com.cloud.network.router.VirtualNetworkApplianceManagerImpl.persist(VirtualNetworkApplianceManagerImpl.java:258)
        at com.cloud.vm.VirtualMachineManagerImpl.allocate(VirtualMachineManagerImpl.java:344)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.vm.VirtualMachineManagerImpl.allocate(VirtualMachineManagerImpl.java:397)
        at com.cloud.network.router.VirtualNetworkApplianceManagerImpl.deployRouter(VirtualNetworkApplianceManagerImpl.java:1644)
        at com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl.deployVpcRouter(VpcVirtualNetworkApplianceManagerImpl.java:325)
        at com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl.findOrDeployVirtualRouterInVpc(VpcVirtualNetworkApplianceManagerImpl.java:225)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl.deployVirtualRouterInVpc(VpcVirtualNetworkApplianceManagerImpl.java:174)
        at com.cloud.network.element.VpcVirtualRouterElement.implementVpc(VpcVirtualRouterElement.java:126)
        at com.cloud.network.vpc.VpcManagerImpl.startVpc(VpcManagerImpl.java:989)
        at com.cloud.network.vpc.VpcManagerImpl.startVpc(VpcManagerImpl.java:961)
        at org.apache.cloudstack.api.command.user.vpc.CreateVPCCmd.execute(CreateVPCCmd.java:137)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155)
        at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        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: Duplicate
entry '20' for key 'PRIMARY'
        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)
        ... 36 more
2013-05-27 11:41:50,409 DEBUG [network.vpc.VpcManagerImpl] (Job-Executor-37:job-35) Destroying
vpc [VPC [4-test] that failed to start


(ii) After making the VMware template type as 'USER' in the database, it picked the XenServer
template and everything went fine.


Attaching all the required 



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