317 Commits

Author SHA1 Message Date
Santhosh Edukulla
e4d6cd8e6a Fixed coverity reported concurrency issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-08-05 12:16:08 +05:30
Santhosh Edukulla
b7d3f1bd30 Fixed few coverity issues for resource synchronization 2014-08-04 16:09:26 +05:30
Alena Prokharchyk
ffeca8bbd2 CLOUDSTACK-7209: handle the case when network fails to implement NoTransitionException, and null is returned to the caller stack. All caller methods should verify if the return value is null before processing it further. 2014-08-01 09:47:28 -07:00
Saksham Srivastava
3d6c64d262 CLOUDSTACK-7206: Update vm_network_map table correctly 2014-08-01 13:58:06 +05:30
Santhosh Edukulla
bd3d8286d3 Fixed a simple coverity issue 2014-07-31 16:00:42 +05:30
Sheng Yang
f47cfc6eb1 CLOUDSTACK-7186: Revert "CLOUDSTACK-7182: NPE while trying to deploy VMs in parallel in isolated network"
This reverts commit 47d6a64b319ab064c4b855346f2bfdb250fb9ad8, which broke VPC
completely.
2014-07-28 16:02:21 -07:00
Anthony Xu
330c4ba578 completed the new vmsync TODOs in the code.
removed old vmsync logic
2014-07-28 12:51:37 -07:00
Murali Reddy
67876b215e CLOUDSTACK-7191:On restartNetwork destroy the VR immediatley, instead of
cleanup the rules then destroy

fix adds a provision to specify if cleanup is needed on network on
shutdown. VR is marked as to not to require network rules clean up on
network shutdown as the VR is destroyed and recreated.

ran the simulator tests that test network life cycle
2014-07-28 17:09:42 +05:30
Koushik Das
47d6a64b31 CLOUDSTACK-7182: NPE while trying to deploy VMs in parallel in isolated network
The following changes are made:
- Check to see if network is implemented changed from 'state == Implementing||Implemented' to 'state == Implemented'.
The earlier check was a hack to prevent the issue described below.
- At the time of implementing network (using implementNetwork() method), if the VR needs to be deployed then
it follows the same path of regular VM deployment. This leads to a nested call to implementNetwork() while
preparing VR nics. This flow creates issues in dealing with network state transitions. The original call
puts network in "Implementing" state and then the nested call again tries to put it into same state resulting
in issues. In order to avoid it, implementNetwork() call for VR is replaced with below code.
2014-07-25 15:17:35 +05:30
Hugo Trippaers
676b2d1569 Fix overflow before widening issues reported by Coverity 2014-07-24 13:22:14 +02:00
Hugo Trippaers
e78bb1d225 Switch the catch to Throwable. Uncaught exceptions in a scheduled
threadpool executor will not report or log uncaught exceptions but will
kill the thread causing unexplained timeouts in CS.
2014-07-16 16:24:55 +02:00
Koushik Das
aacf8ef77b Findbugs fixes in cloud-utils project and a few other places 2014-07-15 14:23:17 +05:30
Santhosh Edukulla
97d296bfbd Fixed Coverity reported performance issues like inefficient string concatenations, wrong boxing or unboxing types, inefficent map element retrievals
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-07-01 22:06:25 +02:00
Hugo Trippaers
ab0dca0385 Catch possible exceptions in finally so they won't shadow the original exception. 2014-06-25 15:51:29 +02:00
Hugo Trippaers
cd0ef09344 Fix typo and add the right exception to the error map. 2014-06-25 15:51:28 +02:00
Kelven Yang
f756d4aa33 Make job info universally available across management server and resource agents 2014-06-24 16:28:22 -07:00
Mike Tutkowski
3d9eaf0753 Fixed some spacing issues from 4d6c682f18d9bca50c145b55d8fa61ea1ab71755 2014-06-24 15:27:06 -06:00
punith-cloudbyte
4d6c682f18 supporting nfs protocol and resize feature for managed storage for xenserver
resize feature refactored

Signed-off-by: Mike Tutkowski <mike.tutkowski@solidfire.com>
2014-06-24 15:16:45 -06: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
Alena Prokharchyk
3312394154 CLOUDSTACK-6934: don't try to detach volume from host when volume was never allocated to a primary storage 2014-06-18 12:39:36 -07:00
Kelven Yang
f529823566 Add ReflectionUse annotation for marking up *un-used* methods 2014-06-17 17:31:29 -07:00
Anshul Gangwar
aa21cdcd49 CLOUDSTACK-6897: when we try to attach the uploaded/allocated volume to a VM on zwps, then we were passing the podId of VM instead of storage pool to storage allocator. This resulting in use of Clusterscope storage allocator, allocating a storage pool for VM on zwps beacuse of pod id not null. This was resulting in scope conflict later 2014-06-13 14:47:00 +05:30
Anshul Gangwar
66d1eb92f0 CLOUDSTACK-6865 , CLOUDSTACK-6868: [hyperv] while attaching the volume we were changing the volume's Image format to hypervisor's default Image format, hence it was failing to find the volume with vhdx format. Now changed the behavior to set Image Format for volume only when it is not set 2014-06-13 13:26:02 +05:30
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
Marcus Sorensen
7ce3034299 CLOUDSTACK-6790: Disable PXE ROM for system vm nics 2014-05-27 16:52:26 -06:00
Koushik Das
d5754d9101 CLOUDSTACK-6740: Direct agent command throttling improvements
List of changes:
1. Created a separate thread pool for handling cron and ping tasks. The size of the pool is based on direct.agent.pool.size. The existing direct agent pool will run all commands other than cron and ping.
2. For normal tasks (generated as part of user/admin API calls), if throttle limit is reached then tasks get queued up for subsequent execution once threads are available.
3. For cron and ping tasks (internally generated by MS like ping, VM sync etc.), if throttle limit is reached then these gets rejected. Since these are internally generated these can be rejected without any issues.
2014-05-22 14:15:42 +05:30
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
root
4b89a45e57 CLOUDSTACK-3272 Latest changes to add global configuration parameters to control the publishing of events on the message bus 2014-05-07 10:09:03 +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
Marcus Sorensen
11f5bdd78d CLOUDSTACK-6191 Add support for specifying volume provisioning
type (thin, sparse, fat) in disk/compute offerings.

Submitted-by: Yoshikazu Nojima <mail@ynojima.net>
Reviewed-by: Marcus Sorensen, Mike Tutowski
2014-04-10 09:23:04 -06:00
Koushik Das
54e9a98e8b CLOUDSTACK-6362: Parallel VM deployment - direct.agent.thread.cap needs to default to 1.0 (currently 0.1) to allow for parallel Vm deployments. 2014-04-09 12:28:01 +05:30
Alena Prokharchyk
3a889aa217 CLOUDSTACK-3886: Volume attach/detach implementation for ROOT disk
Implemented for Xen hypervisor only by now
Unittests are included
2014-04-03 11:39:56 -07:00
Kelven Yang
cd8801f6f7 Do app-level iteration to avoid mysql deadlocks 2014-04-02 15:46:50 -07:00
Anshul Gangwar
24820d20d3 CLOUDSTACK-6288: Changing default ImageFormat to vhdx for hyper-v and allowing registration of vhdx format templates.
Signed-off-by: Devdeep Singh <devdeep@gmail.com>
2014-04-01 14:00:24 +05:30
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
Daan Hoogland
8b62b2cb92 findbugs: exclude known spiffy hacks a.k.a. false positives 2014-03-28 14:28:10 +01:00
Anthony Xu
6d103e62fe use correct interval for cleanTask and transitionTask 2014-03-26 14:22:27 -07:00
Alex Huang
4ebb92c492 Fixed some warnings about using a deprecated constructor 2014-03-25 16:48:27 -07:00
Alex Huang
f445274ed3 Added a config to enable checking whether a db transaction is wrapped around communications with the agent. If it is, an exception is thrown. This assert has actually been there because it is part of CloudStack's design principle to not use db transactions as a way to enforce atomicity in executing things on hardware resources. However, the assert has been ignored since the move to maven which is not good with enabling asserts. Since then, there's been a lot of commands added that actually runs within db transaction. This is a big no no as the problem is that the remote operation may take a long time and the db can actually close the connection, causing a rollback of the transaction. We should not depend on transactions to enforce the atomicity anyways. 2014-03-25 16:35:49 -07:00
Anthony Xu
e3fc5a4d46 vm meta sync sync xstoolsversion as well 2014-03-24 15:48:21 -07:00
Laszlo Hornyak
2c4ac5e4d3 removed some redundant Boolean isntantiations
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-03-22 18:34:45 +01:00
Mike Tutkowski
7629d6f129 CLOUDSTACK-6170 2014-03-20 23:54:53 -06:00
Min Chen
a1831bc864 Revert "CLOUDSTACK-6170" due to unit test failure.
This reverts commit 50b5e2e247ebff54fda8c8c2cd4957ffd47bcf12.
2014-03-20 16:40:45 -07:00
Mike Tutkowski
50b5e2e247 CLOUDSTACK-6170 2014-03-20 16:52:52 -06:00
Murali Reddy
2b51207510 persist fact that network can span multiple zones, if network offering
has strechedL2Subnet capability and return the zones in which
network spans in the networkreponse object
2014-03-20 17:01:33 +05:30