634 Commits

Author SHA1 Message Date
Rohit Yadav
43cf1da865 CLOUDSTACK-5238: password checks, NPE fixes and minor fixes
- insecure authenticators excluded in configuration
- snapshot response should have zone
- remove vmsnapshots when removing accounts

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

Conflicts:
	api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/storage/download/DownloadActiveState.java
2015-02-27 18:24:46 +05:30
Rohit Yadav
1a6df6f978 CLOUDSTACK-7908: Add user_id column to vm_instance table
Design Document:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Allow+VM+listing+by+User+ID

- Adds column to VMInstance DAO
- Adds column in vm_instance table
- Adds column in the UserVMJoinVO
- Adds default admin user which has UID = 2
- Adds migration path that sets user_id to first user of the accountId that
  owns the vm in vm_instance table
- Add arg on list VMs API to query by userId, add support in query layer
- Refactor VMInstanceVO and child classes to accept userId
- Add code to let service layer pass userId if loggedIn user belongs to same
  account as the owner executing an API call or use first user from owner account
- In case of CPVM and SSVM use system user ID
- Fix unit tests and spring injections

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 15:02:38 +05:30
Rohit Yadav
a8f9233377 CLOUDSTACK-8146: close search builder using done()
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit a4d24adfb889291bfb3b888555603e66aeee51a1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 18:06:15 +05:30
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
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
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
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
Daan Hoogland
06d4458d0a CID-1256275 regression: resource leak in systemvm update code 2015-01-12 20:40:01 +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
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
438f90a262 Close transaction while fetching recent events 2015-01-07 14:14:44 +05:30
Kishan Kavala
9eb8d538dd For volumes created from template, do not log offering ID in VOLUME.CREATE in usage_event. Moved offering type to DiskOffering interface 2015-01-07 12:31:41 +05:30
Daan Hoogland
251e88c401 CID-1261671 added null check 2015-01-05 15:55:33 +01:00
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
5f9e4fddf3 CLOUDSTACK-8112. CS allows creation of VM's with the same Display name when vm.instancename.flag is set to true.
During VM creation, if vm.instancename.flag is set to true and hypervisor type is VMware, check if VM with the same hostname already exists in the zone.
2014-12-23 14:00:32 +05:30
Koushik Das
106ec718fc Revert "CLOUDSTACK-7872: network getting shutdown inspite of running VM's in the network"
This reverts commit 709bf074de9f8f22e6a71362551c4867be884e4b.

Network GC is broken with out-of-band VM movements due to the original commit, so reverting.
2014-12-23 12:13:51 +05:30
Sanjay Tripathi
0c4128e024 CLOUDSTACK-8097: Failed to create volume snapshot after vm live migration across clusters. 2014-12-19 14:26:48 +05:30
Prachi Damle
141a71b518 CLOUDSTACK-8022: [Automation] Deletion of Domain with Cleanup set to "true" fails
Changes:

-  This is a race condition between the deleteDomain thread and AccountChecker thread. DeleteDomain thread marks the domain as inactive and proceeds for cleanup, AccountChecker thread that runs at the same time cleans up any domains marked as inactive.
-  When the DeleteDomain thread finds that domain is already removed, it need not error out since the domain deletion has already happened
2014-12-17 11:43:03 -08:00
Wei Zhou
6fb9746e5e CLOUDSTACK-7316: usage server cannot start due to missing key in /etc/cloudstack/usage/ in Ubuntu setup 2014-12-15 09:22:52 +01:00
Rohit Yadav
1a66b3b5c6 CLOUDSTACK-8070: Upgrade router.ram.size using encryption util
Upgrade fails if value is set using plain text encoding, the value needs to
be encrypted (if a key was provided during db was setup).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 6321a29e4336de9ffe96e27968f896ec5a8bf37d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-13 00:18:05 +05:30
Wei Zhou
fec31d53c3 CLOUDSTACK-8064: UpdatePortForwardingRuleCmd implementation 2014-12-12 10:19:06 +01:00
Daan Hoogland
6dd30eaf14 CID-1256273/CID-1256274/CID-1256275 leaky resources plus switch
statement warning

reviewed by Wilder Rodrigues
2014-12-02 16:14:34 +01:00
Wei Zhou
0407fb334f CLOUDSTACK-7847: add max.domain.* in global setting and display domain resources in listDomainsCmd response 2014-12-02 11:52:10 +01:00
Harikrishna Patnala
488c17858f CLOUDSTACK-6075: Increase the ram size for router service offering
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-11-27 16:04:59 +05:30
Daan Hoogland
3cb78fc742 4.4.2 upgrade schema
remove 441to450 ddl
(cherry picked from commit 5578616143f2eb1aded26b86101c73858a67fa35)
(cherry picked from commit f18d6238b0219061e5ad81dc8852de6290da9e55)

Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java

schema: Add upgrade paths from 4.3.2 to 4.4.0

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

Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
	engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
	setup/db/db/schema-441to450.sql

merged new work from schema-441to450.sql into schema-442to450.sql
2014-11-24 16:25:44 +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
Rohit Yadav
d2d448c401 schema: Add upgrade path from 4.3.2 to 4.5.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 91d448ff4576086b875436a6a002e0be32352657)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-11-20 14:30:54 +05:30
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
Nitin Mehta
5213401ace 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. 2014-11-14 16:19:10 -08:00
Saksham Srivastava
fc4dceaa99 CLOUDSTACK-7582: Update Storage Pool API does not update tags correctly 2014-11-13 17:01:06 +05:30
Prachi Damle
52bc084231 CLOUDSTACK-7590 Deletion of Account is not deleting the account from the database
Revert "CLOUDSTACK-7073: Added domainId field to the user table in order to restrict duplicated users creation on the db level"

This reverts commit 5a96d8ef5cbc88df366016ae9dd7ee46e4ca417a.

Conflicts:
	setup/db/db/schema-440to450.sql
2014-11-12 11:01:36 -08:00
Santhosh Edukulla
b6621428a9 CLOUDSTACK-7873 Fixed the user vm details length issue for higher key lengths 2014-11-10 20:51:46 +05:30
Jayapal
709bf074de CLOUDSTACK-7872: network getting shutdown inspite of running VM's in the network 2014-11-10 16:06:58 +05:30
Damodar
781648fb10 CLOUDSTACK-7792: Usage Events to be captured based on Volume State Machine 2014-11-10 15:19:02 +05:30
Rajani Karuturi
55b6e3431b Merge branch '4.5' 2014-11-10 15:06:22 +05:30
Derrick Schneider
de3eb88b33 Normalize some error message strings to make maintenance (i.e., changing said error messages) a bit easier.
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2014-11-10 15:00:28 +05:30
Sanjay Tripathi
1c9775b0df CLOUDSTACK-7859: Host tags are not getting removed in cloud.host_tags table when a Host is deleted from CS. 2014-11-07 17:34:16 +05:30
Sanjay Tripathi
330bd2748e CLOUDSTACK-7859: Host tags are not getting removed in cloud.host_tags table when a Host is deleted from CS. 2014-11-07 17:32:25 +05:30
Edison Su
885bba926c should not duplicate vm instance id, during the volume migration
Conflicts:
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
2014-11-06 15:36:58 -08:00
Nitin Mehta
723aedf9b1 CLOUDSTACK-7820: Don't consider disabled hosts for calculating disable threshold. 2014-10-30 17:05:11 -07:00
Nitin Mehta
c30d4ed1c2 CLOUDSTACK-7820: Don't consider disabled hosts for calculating disable threshold. 2014-10-30 16:54:00 -07:00
Edison Su
6b5c874fe9 should not duplicate vm instance id, during the volume migration 2014-10-30 21:27:51 -07:00
Hugo Trippaers
cf5b56d617 Add database upgrade from 4.5.0 to 4.6.0 2014-10-29 15:03:19 +01:00
Hugo Trippaers
4ebaf0a583 Bump master version to 4.6.0-SNAPSHOT after branching 4.5.0-SNAPSHOT 2014-10-29 14:54:23 +01:00
Santhosh Edukulla
efe1e0a544 Fixed coverity and other resource leak issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-10-16 12:19:51 +05:30
Sanjay Tripathi
176e0d47bb CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect
GPU enabled hosts from non-GPU VM deployment.
Cluster reordering is based on the number of unique host tags in a cluster,
cluster with most number of unique host tags will put at the end of list.
Hosts with GPU capability will get tagged with implicit tags defined by
global config param 'implicit.host.tags' at the time os host discovery.

Also added FirstFitPlannerTest unit test file.
2014-10-14 17:55:37 +05:30
Sanjay Tripathi
e4a8bbcdf4 CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect
GPU enabled hosts from non-GPU VM deployment.
Cluster reordering is based on the number of unique host tags in a cluster,
cluster with most number of unique host tags will put at the end of list.
Hosts with GPU capability will get tagged with implicit tags defined by
global config param 'implicit.host.tags' at the time os host discovery.

Also added FirstFitPlannerTest unit test file.
2014-10-14 17:53:50 +05:30
Santhosh Edukulla
350ac4c4b0 Fixed Resource Leaks
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-10-13 17:51:02 +05:30
Nitin Mehta
50ee9810a8 CLOUDSTACK-6826: Improving the download url expiration where the expiration work would be handled by the ssvm that has the corresponding symlink created on it. In case it doesnt exist, then would be any one of the ssvm in the zone.
Also when the ssvm is destroyed all the download urls are expired to be cleaned up in the next run by the new ssvm.

(cherry picked from commit ce908373573757372a3a09e46f835c3e269f3d02)
2014-10-13 00:40:03 -04:00