378 Commits

Author SHA1 Message Date
Rohit Yadav
c198dfdb7a Update pom and version usage to 4.5.1-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 12:13:18 +05:30
Daan Hoogland
8ad2e309a4 CLOUDSTACK-8238 handling of retry ping improved
Fixed on 4.4 and master but not on 4.5, cherry-picked on 4.5 using commit
fbafc957dc4e9cdc83aceb2762c0b07296b1a3e6

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java
2015-02-16 11:35:41 +05:30
Santhosh Edukulla
78bfaa79cf Fixed few coverity issues like invalid boxing unboxing issues, resource leaks, null dereferences
(cherry picked from commit ef6ec7b27675ea44d45c68b30eb2f508655703be)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:50:20 +05:30
Nitin Mehta
4ea0dcda9b CLOUDSTACK-7870: When Vm deployments fail and end in error state volume count should be decremented
(cherry picked from commit a8b89bea4f37a54267694b9a49be6b5bec91f0b0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:24:06 +05:30
Hugo Trippaers
82eebab0ba CID-1241966 Fix potential null deref
(cherry picked from commit 1c94017ff693fbff51553d0095aef4d9e0552098)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 18:27:09 +05:30
Rohit Yadav
fb1069ace9 agent: don't investigate if host is null, send alert instead
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:42:56 +05:30
Rohit Yadav
419508b016 orchestration: allow storage migration
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit a2547ed827c5fbb7d43181c8d3f84b81ffbeeeda)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:39:17 +05:30
Kishan Kavala
7a397cd4ef For volumes created from template, do not log offering ID in VOLUME.CREATE in usage_event. Moved offering type to DiskOffering interface
(cherry picked from commit 9eb8d538dd196f27e5194dd2e657afffdb9347eb)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:37:59 +05:30
Rohit Yadav
e40b06e9ca AgentAttache: allow checkonhost command in maintenance, cancel if only allowed
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:29:44 +05:30
Santhosh Edukulla
c25263ba81 Fixed Coverity Issues 2015-02-05 15:59:29 +05:30
Damodar
01cc1b816d CLOUDSTACK-7792: Usage Events to be captured based on Volume State Machine
(cherry picked from commit 781648fb1003c8c32875e9ff7a6c4ef4694539f7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
2015-02-05 15:22:21 +05:30
Devdeep Singh
0e4d91aa91 CLOUDSTACK-6924. To attach a volume if a volume needs to be moved to another storage
pool, the source and destination pools cannot be local and cluster/zone and vice versa.
Cloudstack detects it and throws a exception. However, the end user only sees an
unexpected exception and not the reason for failure. Fixed it by making sure the
reason for the failure is correctly captured and shown to the end user.

(cherry picked from commit cffae8eef0b1f9bf869a5ec99befbe9ae9d9290d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/storage/VolumeApiServiceImpl.java
2015-02-02 14:36:07 +05:30
Kishan Kavala
0c1172ffe9 Network offering usage event should be logged for UserVms only
(cherry picked from commit 42cecbb000416978a7edcef5d8c664dac4b52277)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 14:27:24 +05:30
Likitha Shetty
294f5bf331 CLOUDSTACK-8114. Ensure VM stop and then start updates the volume path correctly in the DB.
(cherry picked from commit 521258bafb91e30d7bd43fba62cc47a77c078028)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 14:27:04 +05:30
Likitha Shetty
b9932a0129 CLOUDSTACK-8122. Handle NPE thrown during migration failures.
When migration fails instead of returning NULL, throw the exception.

(cherry picked from commit a5a65c7b551ee5cc32588997937267b716eff681)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:56:43 +05:30
Likitha Shetty
bcbfe3bdee 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.

(cherry picked from commit 15b348632df2049347f58c87830be2c02eee3b61)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:47 +05:30
Likitha Shetty
45d32234a6 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.

(cherry picked from commit 33179cce56b15f0632e38afa260cb829bb2a2273)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:22 +05:30
Santhosh Edukulla
737edd90dc Fixed few coverity patches
NPE in delete firewall rules observed, cherry-picking fix from master.

(cherry picked from commit 31a42d2b7a5a9d3dbf10dc680d7e8877ed4e40c6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 12:48:38 +05:30
Rohit Yadav
debfcdef78 CLOUDSTACK-8160: use preferable protocols
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-21 18:02:58 +05:30
Harikrishna Patnala
9cf05dc842 CLOUDSTACK-7534: ResetVM for VM with attached datadisk fails when enable.ha.storage.migration is false
Separate global config to enable/disable Storage Migration during normal deployment
Introduced a configuration parameter named enable.storage.migration

(cherry picked from commit c55bc0b2d11be4820a24af426e23da3db54a0cb1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 14:43:10 +05:30
Sanjay Tripathi
8790b84b20 CLOUDSTACK-7940: Exception printed completely on the UI. Not in a readable format.
(cherry picked from commit dda29949366f16c06445dde9161c3b1151ed3f36)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:34:48 +05:30
Likitha Shetty
fd0eb6c29e CLOUDSTACK-3439. [VMWARE] While preparing for migration, include dynamically created nics in case of VMware too.
(cherry picked from commit 4b67a48144402a3a43d51c869456d9268873b1b1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 18:19:30 +05:30
Kishan Kavala
1e87f3b80b Bug-Id: CLOUDSTACK-3439: Include dynamically created nics in Prepare for migration command in KVM
(cherry picked from commit f767adfe71dda82c45cf376ba71518e2ad84cc98)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 18:19:24 +05:30
Sanjay Tripathi
466e6d15a4 CLOUDSTACK-8097: Failed to create volume snapshot after vm live migration across clusters.
(cherry picked from commit 0c4128e024b519f24625ad8cd6b53ddf0137728e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:59:31 +05:30
Saksham Srivastava
a1791cb4a8 CLOUDSTACK-8088: VM scale up is failing in vmware with Unable to execute ScaleVmCommand due to java.lang.NullPointerException
(cherry picked from commit 1df0453d27e8378065c15878067fc9d2dc961e30)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:28:17 +05:30
Koushik Das
788fe5a273 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 12:31:34 +05:30
Prachi Damle
a7861aa5fa 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 13:48:24 -08:00
Jayapal
8278d88f76 CLOUDSTACK-8030: Updated router to come up egress default ALLOW
On default iptables rules are updated to add ACCEPT egress traffic.
    If the network egress default policy is false, CS remove ACCEPT and adds the DROP rule which
    is egress default rule when there are no other egress rules.

    If the CS network egress default policy is true, CS won't configure any default rule for egress because
    router already came up to accept egress traffic. If there are already egress rules for network then the
    egress rules get applied on VR.

    For isolated network with out firewall service, VR default allows egress traffic (guestnetwork --> public network)
2014-12-10 10:13:41 +05:30
Rohit Yadav
d42e3df9cf CLOUDSTACK-7563: Fix potential NPE in checking answer
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-02 16:14:29 +05:30
Loic Lambiel
99cb19787e 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:05:12 +01:00
Anthony Xu
ab19edf09d 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:27:51 -08:00
Edison Su
d856a2acad 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:08:27 -08:00
Koushik Das
6d268db217 CLOUDSTACK-7880: Creating shared network results in exception
This is due to event publish being wrapped in a transaction, moved it outside of transaction scope.
2014-11-11 16:32:20 +05:30
Koushik Das
4d08bb8935 CLOUDSTACK-7867: Delete network resulting in exception
Publish event was getting called from within a DB transaction which is not allowed.
2014-11-08 13:50:31 +05:30
Koushik Das
e25de54b4c 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-08 13:50:15 +05:30
Min Chen
07ba078ee6 CLOUDSTACK-7833: VM Async work jobs log "Was unable to find lock for the key vm_instance" errors as warning 2014-11-03 11:19:06 -08:00
Min Chen
0d6f69b536 CLOUDSTACK-7778: Start VM checkWorkItem loop should also check VM DB state before going into idle waiting to exit faster. 2014-10-23 14:38:56 -07:00
Anthony Xu
c52e14730e when host is pingtimeout and CCP can not determine the host status, put the host to Alert status , no VM HA. 2014-10-22 15:07:40 -07:00
Anthony Xu
0141b37784 CLOUDSTACK-7761:
Revert "when system VM ping times out, stop system VM"

This reverts commit ee23be1942001ab732cfb3ad50fa24163cb88a48.
2014-10-21 17:21:17 -07:00
Min Chen
e7fa3a2959 CLOUDSTACK-7563: Fix potential NPE from FingBugs. 2014-10-14 11:21:01 -07:00
Edison Su
1c1485e0f0 disable parallel for xenserver. Also for vmware, if full.clone is enabled and migratecommand will have the behavor of start/stop command
(cherry picked from commit d233f39c82908f81ba90f51d7bc445cc83ef5691)
2014-10-13 00:39:33 -04:00
Anthony Xu
ee23be1942 when system VM ping times out, stop system VM
(cherry picked from commit 847e1e47aee6b4edeb0265a1a4d3d9a12ffde11d)
2014-10-13 00:11:21 -04:00
Devdeep Singh
43a9bbf509 CLOUDSTACK-7598: When a vm deployed by cloudstack is stopped on the hypervisor
(outside cloudstack), the state of the vm is not updated in cloudstack db. The
ping task was not checking for resource (host) status by default. The power
state of the vms is returned as part of the resource status. Fixed the issue by
making sure ping task atleast tries once to get the resource status.

(cherry picked from commit 55b4ead49594212ba55bfcf7007b0cae11bf68ba)
2014-10-12 23:55:17 -04:00
Jayapal
7a4a0d7aaa CLOUDSTACK-7622: Fixed deleting network when provider is disable 2014-10-12 23:54:20 -04:00
Hugo Trippaers
8a13f44b44 Remove duplicate field in constructor 2014-09-18 16:02:26 +02:00
Daan Hoogland
7f440854f7 CLOUDSTACK-7184 retry-wait loop config to deal with network glitches
(cherry picked from commit a29f954a269c992307f0410df88ca4ac7a0b82a0)

Conflicts:
	engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java
2014-09-18 12:55:05 +02:00
Rohit Yadav
2cd99e3e72 CID-1116245: Lock for getting answers from SynchronousListener
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-18 11:56:29 +02:00
Rohit Yadav
3640c61207 CID-1116248: Synchornize method in SynchronousListener
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-18 11:54:31 +02:00
Anthony Xu
e5a91e40dd in tagCommand, AsyncJobExecutionContext doesn't need to be created if it doesn't exist 2014-09-17 18:15:41 -07:00
Min Chen
1b15efb5f0 CLOUDSTACK-7563: ClassCastException in VirtualMachineManagerImpl in
handling various Agent command answer.
2014-09-16 12:12:17 -07:00