1491 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Likitha Shetty
4b67a48144 CLOUDSTACK-3439. [VMWARE] While preparing for migration, include dynamically created nics in case of VMware too. 2015-01-08 09:50:19 +05:30
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
Kishan Kavala
42cecbb000 Network offering usage event should be logged for UserVms only 2015-01-07 12:29:11 +05:30
Daan Hoogland
5251fb2dc3 CID-1261670 added null check 2015-01-05 16:01:13 +01:00
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
7b32b8a268 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.
2014-12-24 14:33:51 +05:30
Likitha Shetty
a5a65c7b55 CLOUDSTACK-8122. Handle NPE thrown during migration failures.
When migration fails instead of returning NULL, throw the exception.
2014-12-24 13:33:11 +05:30
Likitha Shetty
521258bafb CLOUDSTACK-8114. Ensure VM stop and then start updates the volume path correctly in the DB. 2014-12-24 09:56:06 +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
Likitha Shetty
33179cce56 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.
2014-12-23 13:48:01 +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
Likitha Shetty
a75a431373 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.
2014-12-23 09:48:35 +05:30
Koushik Das
331e257ca0 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 10:52:13 +05:30
Min Chen
e559b15b6a CLOUDSTACK-8101: volume sync not working as expected - MS restart during upload volume leaves volume in hung state. 2014-12-19 16:51:41 -08:00
Min Chen
ea634550fc CLOUDSTACK-8101: volume sync not working as expected - MS restart during upload volume leaves volume in hung state. 2014-12-19 15:51:52 -08:00
Sanjay Tripathi
0c4128e024 CLOUDSTACK-8097: Failed to create volume snapshot after vm live migration across clusters. 2014-12-19 14:26:48 +05:30
Saksham Srivastava
1df0453d27 CLOUDSTACK-8088: VM scale up is failing in vmware with Unable to execute ScaleVmCommand due to java.lang.NullPointerException 2014-12-18 14:27:55 +05:30
Prachi Damle
f5d4736c87 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 11:43:07 -08:00
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
Sanjay Tripathi
9153b8bede CLOUDSTACK-8066: There is not way to know the size of the snapshot created. 2014-12-17 16:00:19 +05:30
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
Min Chen
528bc80b4c CLOUDSTACK-8061: Extracting volume when it is in migrating state causes
both the operations to fail.
2014-12-11 09:53:33 -08:00
Jayapal
8f8e311110 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-08 11:32:01 +05:30
Rohit Yadav
fac7bfc5d5 CLOUDSTACK-8011: Upgrade maven dependencies
Changes;
- Upgrades maven-war plugin to 4.5 (faster war packaging)
- Upgrade spring framework to latest minor release
- Upgrade ehcache, jasypt, httpclient, httpcore and other core dependencies
- Upgrade to latest ipv6 library, fix unit test NetUtilsTest
- httpcore and httpclient are sharing same version variable
- commons-httpclient is different that httpclient, the fix gives it a separate var
- Apidocs failed to generate and get stuck with new reflections version, for now
  we will continue using 0.9.8

Newer dependencies can be listed using:
mvn versions:display-dependency-updates -Dnoredist -Dsimulator -P developer,systemvm

Testing;
- Tested using Maven 3.2.1
- Local noredist build with unit tests succeeds
- CloudStack mgmt server started, basic business layer tests work
- Observed 10-15% build time improvement using new maven-war plugin

Branch: bugfix/4.5-8011 (commits are squashed in favour of a linear history)

Pull request:
https://github.com/apache/cloudstack/pull/50

This closes #50

TravisCI build summary:
https://travis-ci.org/shapeblue/cloudstack/builds/42902172

- Build passes with unit tests
- Apidocs generates successfully
- Most integration tests pass, some fail due to timeout errors, second re-run
  passes some of them

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-04 02:12:51 +05:30
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
Rohit Yadav
f40e31e061 CLOUDSTACK-7563: Fix potential NPE in checking answer
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d42e3df9cf43b0ad46d406c6ab5b1d8c811d0239)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-02 16:46:09 +05:30
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
Loic Lambiel
34e8483e80 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:04:34 +01:00
Hiroki Ohashi
9d31e59d5b CLOUDSTACK-7412: Can't create proper template from VM on S3 secondary storage environment
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2014-11-27 17:07:27 +05:30
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