228 Commits

Author SHA1 Message Date
Nitin Mehta
2aafc39f3d CLOUDSTACK-2957
deployVm API size attribute should be capped by the storage.max.volume.size as it is in createVolume.
2013-06-12 17:01:41 +05:30
Harikrishna Patnala
a30f9fa64a Fix for CLOUDSTACK-1704 and CLOUDSTACK-1622
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-12 15:01:59 +05:30
Nitin Mehta
07e5cbe813 CLOUDSTACK-2932
Allow deleting of snapshots that have errored out. Simply mark the removed column as there is no physiocal clean up required
2013-06-11 16:23:21 +05:30
Min Chen
40982ccef2 drop all alert indice on column last_sent created up to 4.1 version 2013-06-10 11:04:50 -07:00
Nitin Mehta
5b48ec24d8 CLOUDSTACK-2924
Recurring snapshot schedule not showing up in UI
For some of the volumes Recurring snapshot schedule was not showing up in UI because the active column was set to false. Since we dont use this column anymore I am removing the active=true check in the listSnapshotPolicies call.
2013-06-10 20:00:16 +05:30
Wei Zhou
76ce304411 CLOUDSTACK-2707: use executeBatch instead of persist in Usage Server 2013-06-10 15:00:08 +02:00
Jayapal
c8d607eae5 CLOUDSTACK-2650 setting vm ip null in user_ip_address when static nat ip
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-10 12:14:34 +05:30
Jayapal
c1ad3b7974 CLOUDSTACK-2604 Fixed deleting secondary ip when no PF rules set
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-10 12:13:08 +05:30
Sanjay Tripathi
da5c4619c3 CLOUDSTACK-2286: Volume created from snapshot state is in allocated state instead of Ready state which is letting Primary storage not to increment the resources. 2013-06-07 17:17:54 +05:30
Murali Reddy
c0d894346a CLOUDSTACK-2874: fix the upgrade for the deployment with F5/SRX
combination prior to 3.0 release

Fix does following:

- add F5 network service provider into a physical network if there if F5
  deployed in the zone

- add instance of F5 network service provider

- add SRX network service provider into a physical network if there if
  SRX deployed in the zone

- add instance of SRX network service provider

- upgrade all the guest networks to network offering '"Isolated with
      external providers"
2013-06-06 17:49:47 +05:30
Alena Prokharchyk
54481d0b7b listLoadBalancingRules: when list by networkId, no need to pass the dataCenterId to the call 2013-06-05 10:25:25 -07:00
Harikrishna Patnala
9fe7846d72 CLOUDSTACK-2728: 41-42 DB upgrade: add step to upgrade system templates 2013-06-05 15:14:04 +05:30
Sanjay Tripathi
52a901099c CLOUDSTACK-2824: API:MS:Ability to delete events and alerts-Auto Purge for Alerts doesn't work 2013-06-05 14:37:11 +05:30
Alena Prokharchyk
90df4e4df0 CLOUDSTACK-2840: get the latest information from the DB about the number of rules in non-revoked state for the ip address when figuring out if the internal lb vm needs to be destroyed. Instead of relying on the information passed down by the NetworkManager as the network manager might pass only rules in transition state omitting the Active rules 2013-06-04 14:41:23 -07:00
Wei Zhou
f714d26039 Revert "CLOUDSTACK-1301: Add VM Disk I/O Throttling"
This reverts commit 6dad8adf8fc22417f0242126b8f52ee081f74f49.
2013-06-03 07:48:03 +02:00
Wei Zhou
6dad8adf8f CLOUDSTACK-1301: Add VM Disk I/O Throttling 2013-06-01 08:03:02 +02:00
Wei Zhou
b9b0168da4 CLOUDSTACK-1192: Add Disk I/O Statistics 2013-06-01 08:00:48 +02:00
Sateesh Chodapuneedi
7998413f48 CLOUDSTACK-2029 zone wide primary storage support for cloudstack over vmware deployments
Added hypervisor type to CreateStoragePoolCmd & Storage pool responses.
DatastoreLifeCycle would consider hypervisor type while attaching datastore to zone.
ZoneWideStoragePoolAllocator would filter zone wide primary storage pools by hypervisor type along with tags in disk profile.
hypervisor type is mandatory parameter if scope is specified as ZONE while creating primary storage pool.
As of now KVM, VMware are allowed to use ZoneWideStoragePoolAllocator.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-06-01 00:05:27 +05:30
Sateesh Chodapuneedi
e7d468e221 CLOUDSTACK-2029 zone wide primary storage support for cloudstack over vmware deployments
DB changes to support hypervisor specific zone wide storage pool.
Added method findZoneWideStoragePoolsByHypervisor to PrimaryStorageDaoImpl to find suitable zone wide storage pool of specific hypervisor type.
Added column 'hypervisor' to table storage_pool. This column can be NULL. Used/populated only for zone wide primary storage pools.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-06-01 00:05:27 +05:30
Murali Reddy
9c0f9aceb8 CLOUDSTACK-2332:[GSLB] deleteAccount is not cleaning the gslb rules
created by the account

revoking GSLB rules of account on delete
2013-05-31 19:08:40 +05:30
Sateesh Chodapuneedi
2b0ca781d8 CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter
Upgrade handling.
Detect legacy zones during db upgrade and perform data migration.
If legacy zone is detected the table 'cloud'.'legacy_zones' is populated.
If an existing zone which has resources that belong to single VMware datacenter then such zone would not be marked as legacy zone. Such zone would be automatically associated with the specific Vmware datacenter of the clusters inside the zone.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-31 13:33:46 +05:30
Laszlo Hornyak
bc98d8ab46 just an organize import
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-31 11:32:02 +05:30
Saksham Srivastava
17267794ad CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host. <Patch1>
This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.

1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
   Implemented 12 new APIs to dedicate/list/release resources:
   - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
   - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
   - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
   - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain)
5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
6. A VM can be deployed with the above affinity group parameter as an input.
7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
   This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or
   domain.
10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
11. To modify the dedication, the resource has to be released first.
12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
14. Added the right permissions in commands.properties
15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
16. Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
2013-05-30 01:07:01 -07:00
Wei Zhou
2e8d1264a2 CLOUDSTACK-2707: use executeBatch instead of persist when Usage Server createNetworkHelperEntry 2013-05-28 09:43:23 +02:00
Nitin Mehta
08ac8fb468 CLOUDSTACK-2688
Add DB index to Alert.last_sent column to speed up listAlertsCmd.
2013-05-27 14:02:17 +05:30
Wido den Hollander
bef3a2edb7 CLOUDSTACK-1191: rbd: Use cloning for deploying templates instead of a copy
RBD format 2 supports cloning (aka layering) where one base image can serve
as a parent image for multiple child images.

This enables fast deployment of a large amount of virtual machines, but it also
saves spaces on the Ceph cluster and improves performance due to better caching.

Qemu-img doesn't support RBD format 2 (yet), so to enable these functions the
RADOS/RBD Java bindings are required.

This patch also enables deployment of System VMs on RBD storage pools. Since we
no longer require a patchdisk for passing the boot arguments we are able to deploy
these VMs on RBD.
2013-05-24 16:00:08 +02:00
Kishan Kavala
a23f151df5 KVM snapshots backUp path in 22 had entire path, instead of relative path. Fix modifies the path to make it relative during upgrade 2013-05-24 14:41:28 +05:30
Kishan Kavala
3b48299a03 CLOUDSTACK-2664: Fixed delete query. Added log message when CloudRuntimeException is thrown during upgrade 2013-05-24 12:37:18 +05:30
Kishan Kavala
3e02a76f00 CLOUDSTACK-528: Config value has to be encrypted for Hidden category configs 2013-05-24 12:37:18 +05:30
Anthony Xu
e8fbee0e18 firewall service is not supported in shared SG enabled network offering , remove it 2013-05-23 14:19:43 -07:00
Prachi Damle
dce4258171 CLOUDSTACK-2568: ACS41 regression in storage subsystem (seen with local storage and 2 or more hosts)
Changes:
- In VolumeReservationVO, the  getter method of a column had a typo, causing us to create a wrong searchbuilder. It was searching over the 'id' column instead of 'vm_reservation_id' causing
- This bug was causing the vm deployment to choose a wrong pool during deployment since the search was choosing incorrectly
- This bug in the GenericSearchBuilder is also fixed - if the getter method does not use the standard 'get' or 'is' prefix, one should annotate that method using
 @Column(name = "<column_name>") and indicate which column this method refers to. This will cause the GenericSearchBuilder to identify the field correctly.
2013-05-21 16:06:29 -07:00
Dave Brosius
49faa002e2 code compares Long values with == which will work for Long cached values
Fixed by switch to use .equals

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-21 11:45:10 +05:30
Dave Brosius
45d2e60656 Nop assignment due to missing 'this.'
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-21 11:43:25 +05:30
Murali Reddy
d6452be861 CLOUDSTACK-652: meging 'portable public ip' feature
Squashed commit of the following:

commit f244f9ce7982db16984dd87c31545f1c0240c704
Merge: 993cbb0 f5c8e38
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 20 18:54:05 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java

commit 993cbb0df9fa6e64b96b18ed775b73cdf4a8f5d7
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 20 18:49:54 2013 +0530

    introduce 'transferPortableIP' interface method in network manger. This
    method will transfer association of portable ip from one network to
    another network.

commit 0c1c2652c1b39e9a81ca35464360e11ed9ef23f1
Merge: a718d35 a29e393
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Fri May 17 02:48:54 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	utils/src/com/cloud/utils/net/NetUtils.java

commit a718d353f7acf0328d928673df6f22de1abc0acb
Merge: ecca117 c211818
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 21:22:19 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	api/src/org/apache/cloudstack/api/ResponseGenerator.java
    	server/src/com/cloud/api/ApiResponseHelper.java
    	server/src/com/cloud/network/NetworkServiceImpl.java
    	server/src/com/cloud/network/addr/PublicIp.java
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/com/cloud/network/MockNetworkManagerImpl.java
    	server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
    	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
    	setup/db/db/schema-410to420.sql

commit ecca117e345224059297f5c1ffa0f442209b3160
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 20:05:29 2013 +0530

    added integration tests for testing portable ip ranges

commit 895a27c2771dbb497ecc6fe0d212589f012a48d8
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 15:12:19 2013 +0530

    - establish model for transferring portable IP association from a network
      with which it is associated to another network.

    - enabling static nat api, extended to transfer potrtable IP across the
      networks if the VM/network is different from the current associate
      network of the portable ip

commit 51509751b290c0e51cbdd104a9aebff189cbe806
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 12:05:33 2013 +0530

    seperate out associate/disassociate with guest network operations from
    alloc and release of portable ip

commit bd058f58c2d8d36ec25e31ed9de4cd414e0ca051
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sun May 12 21:14:48 2013 +0530

    enhance disasociateIPAddr API to release protable IP associated with a
    guest network or VPC

commit 27504d9098729e8c3ac3b33f053f2d66ac2c4401
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sun May 12 16:53:45 2013 +0530

    enhance asociateIPAddr API to acquire a protable IP and associate with a
    guest network or VPC

commit f82c6a8431647114462665c1306c6215cb92afd3
Merge: 3dbfb44 0749013
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 23:32:13 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	api/src/com/cloud/network/IpAddress.java
    	api/src/org/apache/cloudstack/api/ResponseGenerator.java
    	client/tomcatconf/commands.properties.in
    	server/src/com/cloud/api/ApiResponseHelper.java
    	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
    	server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
    	setup/db/db/schema-410to420.sql

commit 3dbfb44eb5b888367375a96b8ae0ac9cf54309a6
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 20:33:19 2013 +0530

    - add 'portable' boolean as property of IpAddress, persist the property in
    IPAddressVO, return the property in IpAddressResponse

    - add ability to request portable IP in associateIpAddress api

commit bf3cb274cfeb1ef41c63794ced83c7c6940f34cc
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 16:08:40 2013 +0530

    add the status of each portable IP (its state, details of associated data
    center/VPC/guest network etc) in the PortableIpRangeResponse returned by
    listPortableIpRanges API

commit e7b2fb22557cb4ef0ce9c8dde3ed1b9c857038bf
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 14:36:01 2013 +0530

    Introdcues notion of 'portable IP' pool at region level.

    Introduces root admin only API's to provision portable ip to a region
       - createPortableIpRange
       - deletePortableIpRange
       - listPortableIpRanges
2013-05-20 20:05:47 +05:30
Sanjay Tripathi
a2fea4d449 CLOUDSTACK-2297 : Delete Account/Domain is not updating the resources usage of the parent domain 2013-05-20 14:08:31 +05:30
Sanjay Tripathi
e7332b7c04 CLOUDSTACK-1901 : API:MS: DeleteEvents deletes Archived events as well 2013-05-20 11:58:19 +05:30
Prachi Damle
31a67706e4 CLOUDSTACK-2070: Anti-Affinity - When Vm deployment fails because of not being able to satisfy the anti-affinity rule , user should be provided with more informative message.
Changes:
- There is no good mechanism currently to figure out if the  deployment failed due to affinity groups only
- We can just hint the user that the deployment might have failed due to the affinity groups and ask to review the input
2013-05-17 14:36:23 -07:00
Rajesh Battala
107f492475 Fixed CLOUDSTACK-2081 Volume which is added thru upload volume is failed to attach to the instance saying Volume state must be in Allocated, Ready or in Uploaded state( Though uploaded Volume state is uploaded) 2013-05-17 14:58:25 +05:30
Devdeep Singh
adbebc1892 Changes for implicitly dedicating a resource. It includes a following:
1. A new implicit planner which extends the functionality provided by FirstFitPlanner.
2. Implicit planner can be used in either strict or preferred mode. In strict mode it tries to deploy a vm of a given account on a host on which vms of the account are already running. If no such host is found it'll search for an empty host to service the request. Otherwise the deploy vm request fails.
3. In preferred mode, if a host which is running vms of the account or an empty host isn't found, the planner then tries to deploy on any other host provided it isn't running implicitly dedicated strict vms of any other account.
4. Updated the createServiceOffering api to configure the details for the planner that the service offering is using.
5. Made db changes to store the service offering details for the planner.
6. Unit tests for testing the implicit planner functionality.
7. Marvin test for validating the functionality.
2013-05-17 11:40:31 +05:30
Prachi Damle
a2eb7bab1e CLOUDSTACK-2056: DeploymentPlanner choice via ServiceOffering
- Changes merged from planner_reserve branch
- Exposing deploymentplanner as an optional parameter while creating a service offering
- changes to DeploymentPlanningManagerImpl to make sure host reserve-release happens between conflicting planner usages.
2013-05-16 15:02:17 -07:00
Mice Xia
e7fef86c80 CLOUDSTACK-2456 usage:usage parser throws runtime exception while parsing networkoffering usage 2013-05-16 15:19:05 +08:00
Alena Prokharchyk
9f59c618e2 CLOUDSTACK-2517: fixed private gateway creation. Following fixes went in:
1) Only PrivateNetworkGuru handles network creation for the private gateway. Exluded Guest Network Guru from this list (was mistakenly included as a part of merge for Nicira integration)
2) Pass vpc_id to createNetwork call when the network is created as a part of private gateway creation
3) Fixed VPC restart when there are multiple private gateways present (have to grab all the private gateways when creating nic profiles for the VPC router that is being re-created)
4) 41-42 db upgarde: set vpc_id for the private networks of the existing VPCs
2013-05-15 13:12:51 -07:00
Prachi Damle
73030f4372 CLOUDSTACK-2486: Deleting the host_details and inserting them back can lead to mysql deadlock
- Changing the correct details dao. Instead of using separate delete and insert, we will use ON DUPLICATE KEY UPDATE to avoid the MySQL deadlock
2013-05-15 11:58:13 -07:00
Prachi Damle
d31217f3be CLOUDSTACK-2486: Deleting the host_details and inserting them back can lead to mysql deadlock
- Added the index found missing after upgrade

Contained in branches: master
Contained in no tag
2013-05-15 11:16:43 -07:00
Prachi Damle
a13dd59d16 CLOUDSTACK-2486: Deleting the host_details and inserting them back can lead to mysql deadlock
- Instead of using separate delete and insert, we will use ON DUPLICATE KEY UPDATE to avoid the MySQL deadlock
2013-05-15 11:16:41 -07:00
Likitha Shetty
f893aa8a78 CLOUDSTACK-2116
Public IP addresses resource count of an account - number of ip addresses dedicated to an account
plus the number of ip addresses belonging to the system that have been allocated to the account
2013-05-15 18:05:01 +05:30
Jayapal
9b6513466f CLOUDSTACK-2369 fixed adding same private gw twice 2013-05-15 16:45:52 +05:30
Sanjay Tripathi
9542f10592 CLOUDSTACK-1904: API : UI : Admin can not delete Events/Archive from other accounts 2013-05-15 15:28:37 +05:30
Jayapal
c94c71b4ce CLOUDSTACK-2441: Fix deleting private gateways while deleting vpc in case multiple private gateways 2013-05-14 16:10:38 +05:30
Jayapal Reddy
2d950e2858 CLOUDSTACK-768: ACL on private gateway 2013-05-13 19:24:23 +05:30