158 Commits

Author SHA1 Message Date
Anshul Gangwar
866cc41145 CLOUDSTACK-8423: [Xenserver] Improved the performance for processing of ClusterVMMetaDataSync command which can cause slowness in DB if there are huge number of VMs
this closes #204
2015-04-30 14:44:36 +05:30
Likitha Shetty
de7173a0ed CLOUDSTACK-8410. ESXi host stuck disconnects frequently.
During ping task, while scanning and updating status of all VMs on the host that are stuck in a transitional state
and are missing from the power report, do so only for VMs that are not removed.
2015-04-28 09:15:22 +05:30
Rohit Yadav
37820e15f2 CLOUDSTACK-7593: allow nic type to be fetched from vm's details
(cherry picked from commit 43db75c319b425f3b39770d556df59333921bf92)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
2015-04-13 15:47:03 +05:30
Daan Hoogland
fa56045665 findbugs: wrapper object comparison (fixed) 2015-03-25 17:12:51 +01:00
wilderrodrigues
40eb579115 TK-3135 fixes for VPC restart
* removed the "is redundant" flag form the addVpcRouterToGuestNetwork() method
* removed the "is redundant" flag from the removeVpcRouterFromGuestNetwork() method
* changed the path of the master.py file in the keepalived.conf.temp file
* the call to routerDao.addRouterToGuestNetwork() in the VpcRouterDeploymentDefinition is not needed. That step will be performed once a VM is created
  - In addition, when restarting a VPC the routers will have the guest net configured, if any exists.

* Pushing the POM.xml as well, to use the old Jetty for now. Could not fix the logging problem. Will replace the POM with master version after VPC is done.
2015-03-16 11:39:17 +01:00
wilderrodrigues
8f9f39fa39 [TK-3119] Fix NPEs and improve exception handling + error messages 2015-03-16 11:39:14 +01:00
Daan Hoogland
43a39d1eb0 findbugs: possible nullpointer 2015-02-19 10:27:51 +01:00
Daan Hoogland
0f8a055dff findbugs: equals() call on Long instead of =-comparison 2015-02-19 10:23:10 +01:00
Kishan Kavala
f767adfe71 Bug-Id: CLOUDSTACK-3439: Include dynamically created nics in Prepare for migration command in KVM 2015-01-07 14:52:42 +05:30
Kishan Kavala
42cecbb000 Network offering usage event should be logged for UserVms only 2015-01-07 12:29:11 +05:30
Likitha Shetty
15b348632d CLOUDSTACK-8129. Cold migration of VM across VMware DCs leaves the VM behind in the source host.
If VM has been cold migrated across different VMware DCs, then unregister the VM from source host.
2014-12-26 11:07:30 +05:30
Likitha Shetty
521258bafb CLOUDSTACK-8114. Ensure VM stop and then start updates the volume path correctly in the DB. 2014-12-24 09:56:06 +05:30
Likitha Shetty
33179cce56 CLOUDSTACK-8112. CS allows creation of VM's with the same Display name when vm.instancename.flag is set to true.
Before registering a VM check if a different CS VM with same name exists in vCenter.
2014-12-23 13:48:01 +05:30
Koushik Das
331e257ca0 CLOUDSTACK-8103: Vmsync marks VM as stopped even after failing to stop it in HV
During vmsync if StopCommand (issued as part of PowerOff/PowerMissing report) fails to stop VM (since VM is running on HV),
don't transition VM state to "Stopped" in CS db. Also added a check to throw ConcurrentOperationException if vm state is not
"Running" after start operation.
2014-12-22 10:52:13 +05:30
Saksham Srivastava
1df0453d27 CLOUDSTACK-8088: VM scale up is failing in vmware with Unable to execute ScaleVmCommand due to java.lang.NullPointerException 2014-12-18 14:27:55 +05:30
Prachi Damle
f5d4736c87 CLOUDSTACK-8079: If the cluster capacity threshold is reached, HA-enabled VM is not migrated on another host during HA
Changes:
-  When there is HA we try to redeploy the affected vm using regular planners and if that fails we retry using the special planner for HA (which skips checking disable threshold)
Now because of job framework the InsufficientCapacittyException gets masked and the special planners are not called. Job framework needs to be fixed to rethrow the correct exception.
- Also the VM Work Job framework is  not setting the DeploymentPlanner to the VmWorkJob.  So the HA Planner being passed by HAMgr was not getting used.
- Now the job framework sets the planner passed in by any caller of the VM Start operation, to the job
2014-12-17 11:43:07 -08:00
Rohit Yadav
f40e31e061 CLOUDSTACK-7563: Fix potential NPE in checking answer
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d42e3df9cf43b0ad46d406c6ab5b1d8c811d0239)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-02 16:46:09 +05:30
Loic Lambiel
34e8483e80 CLOUDSTACK-7404: Failed to start an instance when originating template has been deleted
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
(cherry picked from commit c1bf7eeeeeb3bd4dad384225d411e21859cce470)
2014-12-01 13:04:34 +01:00
Laszlo Hornyak
3577423da9 removed executable flags from java classes
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:49:01 +01:00
Anthony Xu
02e22dba7d CLOUDSTACK-7742:
root cause:
when vmsync reports system VM is down, CCP doesn't release the VM resource before starting it.
fix:
make sure cleanup is called for a VM when it is reported as Stopped
2014-11-19 16:30:56 -08:00
Edison Su
67113ff0b2 CLOUDSTACK-7946:
remove leftover state in volume and snapshot table in case of mgt server
shutdown during storage operation.
Reviewed-by: Min
2014-11-19 16:06:37 -08:00
Sanjay Tripathi
dda2994936 CLOUDSTACK-7940: Exception printed completely on the UI. Not in a readable format. 2014-11-19 15:59:03 +05:30
Kishan Kavala
4e896938ee BUG-ID: CLOUDSTACK-5324 when router requires upgrade throw ResourceUnavailableException with scope VirtualRouter. API willl return generic Network Unavailable error.
Reviewed-By: Damoder
2014-11-19 09:46:56 +05:30
Koushik Das
0327c2b13e CLOUDSTACK-7421
Unnecessary exception in MS logs while removing default NIC from VM. Following changes are made:
1. Changed the exception from CloudRuntimeException to InvalidParameterValueExecption.
2. Moved out validation logic to UserVMManagerImpl from VirtualMachineManagerImpl.
3. Handling InvalidParameterValueException from async API calls so that they are not logged as ERROR in MS logs.
2014-11-04 17:34:07 +05:30
Min Chen
684889f0b5 CLOUDSTACK-7833: VM Async work jobs log "Was unable to find lock for the key vm_instance" errors as warning 2014-11-03 10:52:47 -08:00
Santhosh Edukulla
1aef5cba66 Fixed Coverity Issues 2014-11-03 16:45:30 +05:30
Min Chen
94969b0654 CLOUDSTACK-7778: Start VM checkWorkItem loop should also check VM DB state before going into idle waiting to exit faster. 2014-10-23 14:28:23 -07:00
Mike Tutkowski
57dacf99a2 Changed "boolean connectVolumeToHost(VolumeInfo, Host, DataStore)" to "boolean grantAccess(DataObject, Host, DataStore)"
Changed "void disconnectVolumeFromHost(VolumeInfo, Host, DataStore)" to "void revokeAccess(DataObject, Host, DataStore)"
2014-10-21 16:01:14 -06:00
Min Chen
4b8bfe2627 CLOUDSTACK-7563: Fix potential NPE from FingBugs. 2014-10-14 11:19:39 -07:00
Santhosh Edukulla
0a9742f914 Fixed few coverity issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-10-14 17:16:50 +05:30
Edison Su
d233f39c82 disable parallel for xenserver. Also for vmware, if full.clone is enabled and migratecommand will have the behavor of start/stop command 2014-10-09 17:14:57 -07:00
Min Chen
1b15efb5f0 CLOUDSTACK-7563: ClassCastException in VirtualMachineManagerImpl in
handling various Agent command answer.
2014-09-16 12:12:17 -07:00
Nitin Mehta
0a4ab3251a CLOUDSTACK-7513: listServiceOfferings API when called with VM's id also returns offerings to which it cant be upgraded. Adding the logic that when vmid is passed it looks for compatible offerngs using the storage type (local/shares), storage tags and also compute (cpu,speed, memory) in case the vm is running.
Also changed the scaleVm API to upgrade only when the destination offering has storage tags as a subset of current offering tags.
2014-09-15 11:02:34 -07:00
Bharat Kumar
2b7b837b28 CLOUDSTACK-6099 live migration is failing for vm deployed using dynaic compute offerings with NPE 2014-09-10 13:26:24 +02:00
Kishan Kavala
6f7c4863a2 CLOUDSTACK-7473: Vm migration is not supported for LXC. When host is put in maintenance mode, stop the Vms instead of migrating 2014-09-04 20:59:19 +05:30
Anthony Xu
330c4ba578 completed the new vmsync TODOs in the code.
removed old vmsync logic
2014-07-28 12:51:37 -07:00
Hugo Trippaers
cd0ef09344 Fix typo and add the right exception to the error map. 2014-06-25 15:51:28 +02:00
Anshul Gangwar
450d890942 CLOUDSTACK-6830: Fixed during VM migration, volumes on zone wide primary store
requires storage migration resulting in failure of VM migration. This also improves
the hostsformigration api. Firstly we were trying to list all hosts and then
finding suitable storage pools for all volumes and then we were checking whether
vm migration requires storage migration to that host. Now the process is updated.
We are checking for only those volumes which are not in zone wide primary store.
We are verifying by comparing volumes->poolid->clusterid to host clusterid. If it
uses local or clusterids are different then verifying whether host has suitable
storage pools for the volume of the vm to be migrated too.
2014-06-20 16:32:19 +05:30
Kelven Yang
f529823566 Add ReflectionUse annotation for marking up *un-used* methods 2014-06-17 17:31:29 -07:00
Rajani Karuturi
b666a1f3a5 Fixed issues reported by coverity NPEs, unwritten field access and self assignment
Signed-off-by: Koushik Das <koushik@apache.org>
2014-06-10 14:34:47 +05:30
Prachi Damle
3b3f4577b0 CLOUDSTACK-6476: Basic Zone with Multiple Pods Setup: DHCP server doesnt get deployed in the pod where the VM gets deployed
Changes:
PodId in which the router should get started was not being saved to the DB due to the VO's setter method not following the setXXX format. So when planner loaded the router from DB, it always got podId as null and that would allow planner to deploy the router in any pod. If the router happens to start in a different pod than the user VM, the Vm fails to start since the Dhcp service check fails.

Fixed the VO's setPodId method, that was causing the DB save operation fail.
2014-06-06 16:15:31 -07:00
Devdeep Singh
245b7f4c39 CLOUDSTACK-6510: Fix gson serialization exception in storage migration. Gson couldn't serialize
a map with volume and storagepool objects for logging. Fixed by using volume and storage pool
ids instead of objects in the map.
2014-05-08 12:23:46 +05:30
Anthony Xu
b3491bcbac removed unused command ClusterSyncCommand 2014-05-01 11:45:19 -07:00
Harikrishna Patnala
ab39739bd8 CLOUDSTACK-6211: Xenserver - HA - SSVM fails to start due to running out of management Ip ranges when testing host down scenarios
Signed-off-by: Koushik Das <koushik@apache.org>
2014-04-18 17:52:49 +05:30
Prachi Damle
6397f1c82e CLOUDSTACK-6329 [Automation] Changing service offering of VM from medium to small failing with NPE
- The hostAllocators were not getting set
2014-04-17 17:55:17 -07:00
Ding Yuan
c031eb7d38 CLOUDSTACK-6242: exception handling improvements
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-04-15 08:07:15 +02:00
Koushik Das
5e90b75c98 CLOUDSTACK-6402: Fix StopCommand so that VMs are not removed accidentally as part of vmsync
Added a new flag 'checkBeforeCleanup' to StopCommand based on which check is done to see if VM is running in HV host.
If VM is running then in this case it is not stopped and the operation bails out.
Also modified the MS code to call the StopCommand with appropriate value for the flag based on the context.
Currently it is only set to 'true' when called from the new vmsync logic based on powerstate of VM. For rest it
is set to 'false' meaning no change in behaviour.
2014-04-14 16:52:37 +05:30
Kelven Yang
cd8801f6f7 Do app-level iteration to avoid mysql deadlocks 2014-04-02 15:46:50 -07:00
Edison Su
504a6cdee2 CLOUDSTACK-5432:sync vm and storage commands on mgt server for kvm
Conflicts:

	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
	server/src/com/cloud/hypervisor/KVMGuru.java
2014-03-28 16:24:07 -07:00
Anthony Xu
6d103e62fe use correct interval for cleanTask and transitionTask 2014-03-26 14:22:27 -07:00