710 Commits

Author SHA1 Message Date
Daan Hoogland
bcc8182f2f findbugs: write to static from instance these are the trivial cases of ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD as reported by findbugs
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #539
2015-07-09 15:01:58 +02:00
Daan Hoogland
4ad178e4b1 rats: licenses added
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #535
2015-07-07 13:48:20 +02:00
Daan Hoogland
d8ab5f3ab8 findbugs: equals unit tests
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-07 13:48:19 +02:00
Daan Hoogland
34629446b6 findbugs equals(obj) implementations go against the contract these are removed from the call into separate calls
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-07 13:48:19 +02:00
Likitha Shetty
299c07c3e1 CLOUDSTACK-8597. Failed to migrate volume from zone-wide to cluster-wide storage. While live migrating a volume, CS chooses the endpoint to perform the migration by selecting any host that has the storage containing the volume mounted on it. Instead, if the volume is attached to a running VM, the endpoint chosen by CS should be the host that contains the VM.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #541
2015-07-01 12:33:26 +02:00
Daan Hoogland
8a8849354c findbugs: masking fields removed 2015-06-24 12:24:12 +02:00
Sanjay Tripathi
84d4c9bf4c Recurring snapshot issue post upgrade from 3.0.7 to 4.5
This closes #486
2015-06-19 16:03:42 +05:30
Rajani Karuturi
b31b8425df CLOUDSTACK-8525: NPE while updating the state of the volume after deletion
The volume is already deleted (may be by the cleanup thread) and hence
the NPE. Added a not null check for the volumevo and returning false
from the state transition

This closes #321
2015-06-03 11:45:02 +05:30
Devdeep Singh
a99c9d0e68 Implementation for the ability to disable a storage pool for provisioning
... of new volumes. Following changes are implemented 1. Disable or enable a pool with the
updateStoragePool api. A new 'enabled' parameter added for the same. 2. When a
pool is disabled the state of the pool is updated to 'Disabled' in the db. On
enabling it is updated back to 'Up'. Alert is raised when a pool is disabled or
enabled. 3. Updated other storage providers to also honour the disabled state.
4. A disabled pool is skipped by allocators for provisioing of new volumes. 5.
Since the allocators skip a disabled pool for provisioning of volumes, the
volumes are also not listed as a destination for volume migration.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Disabling+Storage+Pool+for+Provisioning

This closes #257

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-19 11:16:49 +01:00
Mike Tutkowski
ac2bccd2a2 Removing unused imports 2015-05-07 13:52:25 -06:00
Daan Hoogland
1c408dec37 Merge branch '4.5' after 4.5.1 vote passes 2015-05-07 16:03:26 +02:00
Rohit Yadav
4ba72a877c Updating pom.xml version numbers for release 4.5.2-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-07 15:33:01 +02:00
Rohit Yadav
069aa4e5f3 CLOUDSTACK-8433: remove awsapi db usage and add upgrade cleanup path
- Removes awsapi db properties usage across codebase
- Removes references from spring xmls, test cases and TransactionLegacy
- Adds sql command to drop database cloudbridge in schema-451to460-cleanup.sql

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-06 15:22:04 +02:00
Rohit Yadav
0eb4eb2370 Updating pom.xml version numbers for release 4.5.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-04 12:17:03 +02:00
Likitha Shetty
6c649ce3ae CLOUDSTACK-8411. Unable to delete an uploaded volume after CCP fails to attach the volume to a VM.
Correctly update the status of an uploaded volume upon failure to attach it to a VM.

(cherry picked from commit 10a106f5d86a7f6786b94a7298a5c63c32eab66b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Likitha Shetty
10a106f5d8 CLOUDSTACK-8411. Unable to delete an uploaded volume after CCP fails to attach the volume to a VM.
Correctly update the status of an uploaded volume upon failure to attach it to a VM.
2015-04-28 09:52:06 +05:30
Santhosh Edukulla
86943da26e Fixed few coverity issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
(cherry picked from commit 0a9742f91462867cc9d5f9321a13a73483fcf149)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-27 14:43:48 +02:00
Koushik Das
bc399b981f volume-upload: If SSVM is destroyed and started, then partially uploaded volumes/templates remain in
inconsistent state (NotUploaded or UploadInProgress) and doesn't transition to any terminal
state (Uploaded, Uploaded). As a result these volumes/templates cannot be removed. Fix is to handle such
volume/template entries correctly.
2015-04-22 19:28:51 +05:30
Likitha Shetty
326bb3e0a4 CLOUDSTACK-8320. Upon a failed migration, a dummy volume is created which remains in 'Expunging' state.
Set destination volume path as NULL while duplicating volume during migration.
If migration fails, destination volume will be marked as removed. And if migration succeeds, volume path will be rightly updated.

(cherry picked from commit d30d5644bb59898ac60884280bd0767bf429ede8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:42:02 +02:00
Likitha Shetty
55f2e45d14 CLOUDSTACK-8319. For both 'MigrateVolume' and 'MigrateVMWithVolumes, ensure VM's vconfiguration files are migrated along with VM's root volume.
(cherry picked from commit bdd28a45ed1cc8046c63d0e840e54975e5b74ab5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:42:02 +02:00
Sanjay Tripathi
30604e973a CLOUDSTACK-8386: CS is returning sec. storage even if it is full and there are other sec. storage with free space. 2015-04-14 16:10:40 +05:30
Rohit Yadav
694b723899 CLOUDSTACK-8312: Fix NPE regression, copy template can have NULL volume size
The copy command reply can have null size returned, so check and set values

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 53ca0b1861c743caf61ec04f776c87eac334f185)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-20 17:27:14 +05:30
Rohit Yadav
53ca0b1861 CLOUDSTACK-8312: Fix NPE regression, copy template can have NULL volume size
The copy command reply can have null size returned, so check and set values

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-20 17:25:52 +05:30
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
Likitha Shetty
d30d5644bb CLOUDSTACK-8320. Upon a failed migration, a dummy volume is created which remains in 'Expunging' state.
Set destination volume path as NULL while duplicating volume during migration.
If migration fails, destination volume will be marked as removed. And if migration succeeds, volume path will be rightly updated.
2015-03-12 11:57:02 +05:30
Likitha Shetty
bdd28a45ed CLOUDSTACK-8319. For both 'MigrateVolume' and 'MigrateVMWithVolumes, ensure VM's vconfiguration files are migrated along with VM's root volume. 2015-03-12 11:57:02 +05:30
Sanjay Tripathi
5aedeb74f9 CLOUDSTACK-8312: The storage usage of "Primary Storage Allocated" is incorrect.
(cherry picked from commit 520d96724ac437aa0a9ed391066f4f0879eaef7e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-11 13:07:47 +05:30
Sanjay Tripathi
520d96724a CLOUDSTACK-8312: The storage usage of "Primary Storage Allocated" is incorrect. 2015-03-10 16:52:25 +05:30
Rohit Yadav
ef99f01e59 Merge remote-tracking branch 'anshul/CLOUDSTACK-6900'
This closes #68

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-02 16:40:44 +05:30
Rohit Yadav
8cfd374f04 CLOUDSTACK-8224: Don't try to unlock if template is not locked
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 17:43:12 +05:30
Likitha Shetty
7de7885a54 CLOUDSTACK-8125. VM fails to start on the first attempt after a cold migration.
Update volume chain_info to NULL during cold migration.
Otherwise during VM start, CCP will configure and try to power-on the VM with wrong disk information.

(cherry picked from commit 7b32b8a26808a546d1dbfdf4728c6228a41852b6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 15:30:49 +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
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
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
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
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
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
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
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
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