1654 Commits

Author SHA1 Message Date
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
Koushik Das
6ff8752fd0 volume-upload: gc thread to clean partially uploaded files
Fixed multiple issues in the template code path
2015-01-31 17:25:19 +05:30
Koushik Das
ae21f44c7b volume-upload: Volume uploaded using new POST based upload goes to inconsistent state on destroying SSVM
Added a check not to cleanup volume related entries when SSVM is destroyed for volumes upload using the POST based upload feature
2015-01-31 17:19:58 +05:30
Koushik Das
6598a65dfb volume-upload: gc thread to clean partially uploaded files
Fixed the following:
- Destroying volume in 'UploadAbandoned' state resulted in NPE
- Existing upload volume functionality interfered with this, added proper checks to prevent that
2015-01-31 17:13:22 +05:30
Mike Tutkowski
31f67c2b3c If the HypervisorType of a storage pool is Any, we need to retrieve hosts in the given zone for each HypervisorType. 2015-01-29 19:18:04 -07:00
Mike Tutkowski
bd6a89939d Adding/updating comments around the volume's hypervisor snapshot reserve field 2015-01-29 15:50:42 -07:00
Mike Tutkowski
1b51bbbf74 Update hypervisor snapshot reserve for the root volume earlier than when it is currently being set 2015-01-29 13:01:51 -07:00
Rajani Karuturi
a710743871 volume upload: persisting into volume store ref only when SSVM is found 2015-01-29 16:55:24 +05:30
Rajani Karuturi
b343fb79e3 volume upload: fixed NPE if SSVM is not up 2015-01-29 16:55:16 +05:30
Mike Tutkowski
c2330f48dd Replace synchronized with the use of database locking 2015-01-27 17:36:21 -07:00
Wei Zhou
e9ce0df5d8 CLOUDSTACK-7316: usage server cannot start due to missing key in /etc/cloudstack/usage/ in Ubuntu setup
(cherry picked from commit 6fb9746e5eeacadc10b7d0977b03959683058b33)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-27 17:39:22 +05:30
Mike Tutkowski
c847831662 Do not allow deletion of the snapshot if the snapshot is being copied 2015-01-26 14:57:28 -07:00
Nitin Mehta
abf4e5c646 CLOUDSTACK-8181: Introducing a new allocator called firstfitleastconsumed. The purpose of this allocator is to find hosts/pools with least capacity usage (in terms of percentage) within the cluster and use those resources first before others. This allocator can be used changing vm.allocation.algorithm. For hosts it would decide the least consumed host through the setting host.capacityType.to.order.clusters to base the usage on cpu or ram.
Reviewed-by: Prachi
2015-01-26 10:48:06 -08:00
Daan Hoogland
e474454c91 CLOUDSTACK-6485 prevent ipaddress asignment of gateway to gateway-interface on vpc router by setting vpcid to null in network 2015-01-26 16:57:46 +01:00
Daan Hoogland
29aeed71fc CLOUDSTACK-6485 prevent ipaddress asignment of gateway to gateway-interface on vpc router by setting vpcid to null in network 2015-01-26 16:54:53 +01:00
Mike Tutkowski
8204a44890 When creating a template from a managed-storage snapshot, put the snapshot in the Copying state before performing the copy (don't want to do anything with the snapshot until this process has completed) 2015-01-25 23:29:27 -07:00
Rohit Yadav
f9a8111e17 CLOUDSTACK-8151: Add removeRawUsageRecords API to cleanup old cloud_usage data
Call removeRawUsageRecords with interval (> 0) and it will clean up cloud_usage
table by removing records older than interval no. of days from today (current date)
and in case it runs when the job exec time is near, it will fail alerting
user to try again after a 15 min window.

There is an issue with async job scheduler, if this API were async it tries
to search and remove job from cloud_usage.async_job table and fails which is
why this API is sync and extends BaseCmd.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-23 19:38:32 +05:30
Mike Tutkowski
2094286c8a Adding support for creating a volume from a snapshot when the snapshot is on managed storage 2015-01-21 13:06:05 -07:00
Rohit Yadav
664186f483 CLOUDSTACK-8160: use preferable protocols
(cherry picked from commit debfcdef788ce0d51be06db0ef10f6815f9b563b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-21 18:04:45 +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
Mike Tutkowski
0f84e042b9 Adding support for creating a volume from a snapshot when the snapshot is on managed storage 2015-01-20 15:24:33 -07:00
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
Bharat Kumar
bf8db0c743 CLOUDSTACK-7571 changing value of cpu/mem.overprovisioning.factor for xen cluster is not affecting total memory at zone level
(cherry picked from commit 476733cb92634c8494fe64762d7fbc178292a754)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 14:39:21 +05:30
Saksham Srivastava
45108fdbad CLOUDSTACK-7582: Update Storage Pool API does not update tags correctly
(cherry picked from commit fc4dceaa991ecacf0d248725decd5370622ea0ed)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 14:38:03 +05:30
Rohit Yadav
4e01d61f87 engine: remove redundant import
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:45:34 +05:30
Min Chen
ff70ef797c CLOUDSTACK-8101: volume sync not working as expected - MS restart during upload volume leaves volume in hung state.
(cherry picked from commit e559b15b6a166e2eb5f9b044338295fe8c9d219d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
2015-01-20 11:43:36 +05:30
Nitin Mehta
1aeaf4dcc9 CLOUDSTACK-7920: NPE in the payload was causing the ssvm agent to not connect, fix it and also make sure that template/volume sync are robust that exceptions do not cause ssvm agent disconnect issues.
(cherry picked from commit 5213401ace08f4a5247a325e9d99a4a66bd7df11)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
2015-01-20 11:39:34 +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
Rajani Karuturi
ad6b7b30cb Volume upload: sending the nfsstore url in the metadata
decoding the metadata and deserialising it on receiving it
2015-01-19 18:04:14 +05:30
Abhinandan Prateek
d8def3dc0b CLOUDSTACK-8164: Look for all host to avoid NPE
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit a1a601be5a08a42739c3ef999f551db1b7bd7749)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-19 11:30:49 +05:30
Abhinandan Prateek
a1a601be5a CLOUDSTACK-8164: Look for all host to avoid NPE
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-19 11:29:51 +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
Likitha Shetty
d807bf0a4e CLOUDSTACK-8107. Failed to create snapshot from volume when the task is performed repeatedly in zone wide primary Storage.
While taking a snapshot of a volume, CS chooses the endpoint to perform backup snapshot operation by selecting any host that has the storage containing the volume mounted on it.
Instead, if the volume is attached to a VM, the endpoint chosen by CS should be the host that contains the VM.

(cherry picked from commit a75a43137316a60b20760aa5015d97f55520fd16)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:51:19 +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
Sanjay Tripathi
8676ff26e0 CLOUDSTACK-8066: There is not way to know the size of the snapshot created.
(cherry picked from commit 9153b8bede3350750cb7a78891e0479cc72aa2ec)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:25:41 +05:30
Rohit Yadav
d9bd235bf6 engine/storage: add NPE check, break if parent snapshot is null
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit c06ca09b54b053b37db9d4fc47226558bf15c6ba)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:20:56 +05:30
Rohit Yadav
c06ca09b54 engine/storage: add NPE check, break if parent snapshot is null
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:20:09 +05:30
Koushik Das
053c160b0f volume upload: management server polling and upload status from agent
MS polling logic to query status for templates that are uploaded
2015-01-16 18:03:36 +05:30
Anshul Gangwar
91e1881be8 CLOUDSTACK-6900: This fixes volume migration failing after that volume is downloaded.
When we download volume then we create entry in volume_store_ref table.
We mark the volume entry to ready state once download_url gets generated.
When we migrate that volume, then again one more entry is created with same volume id.
Its state is marked as allocated. Later we try to list only one dataobject in datastore
for state transition during volume migration. If the listed volume's state is allocated
then migration passes otherwise it fails.

Below fix will remove the randomness and give priority to volume entry which is made for
migration (download_url/extracturl will be null in case of migration). Giving priority to
download volume case is not needed as there will be only one entry in that case so no randomness.
2015-01-16 15:15:14 +05:30
Koushik Das
627f5a62dc volume upload: management server polling and upload status from agent
MS polling logic to query status for volumes that are uploaded
2015-01-14 10:19:12 +05:30
Daan Hoogland
94e6b7587d CID-1256275 regression: resource leak in systemvm update code
(cherry picked from commit 06d4458d0a9de5be7a7bf590678eb4b03989e9a1)

Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
2015-01-12 20:51:51 +01:00
Daan Hoogland
06d4458d0a CID-1256275 regression: resource leak in systemvm update code 2015-01-12 20:40:01 +01:00
Wei Zhou
2720a1b49f CLOUDSTACK-8146: Resource count of primary storage does not consider the detached volumes
(cherry picked from commit b528047fb6f1c199e5e1cfe991a10b72a2b32a49)
2015-01-12 12:30:09 +01:00
Wei Zhou
b528047fb6 CLOUDSTACK-8146: Resource count of primary storage does not consider the detached volumes 2015-01-12 12:25:28 +01:00