6626 Commits

Author SHA1 Message Date
Devdeep Singh
904a2a87f7 CLOUDSTACK-2601 : xen.heartbeat.interval doesn't change the parameter passed to xenheartbeat.sh. Made changes to read the parameter from config and to pass it to the resource.
Signed-off-by: Devdeep Singh <devdeep@gmail.com>
2013-05-21 13:33:07 +05:30
Sanjay Tripathi
55c384651a CLOUDSTACK-2305: [Automation] NPE: not able to create volume from snapshot
Signed off by : Nitin Mehta <nitin.mehta@citrix.com>
2013-05-21 12:00:49 +05:30
Sheng Yang
eb7c321426 PVLAN: CLOUDSTACK-2401: VM Migration support 2013-05-20 16:43:24 -07:00
Hiroaki Kawai
7260e8d83f CLOUDSTACK-1638: Introduce NetworkMigrationResponder
The location of the virtual machine is provided by DeployDestination, which will
be passed in NetworkGuru#reserve and NetworkElement#prepare.

During the virtual machine migration, it actually changes DeployDestination and
it looks like that it will tell that event to network components as it has
NetworkManager#prepareNicForMigration. The problem is that althogh the interface
has that method, NetworkManagerImpl does not tell the DeployDestination changes
to network components.

So IMHO, we need to add calls of NetworkGuru#reserve and NetworkElement#prepare
in NetworkManagerImpl#prepareNicForMigration . And then, we also need to add
calls NetworkGuru#release and NetworkElement#release after the migration,
otherwise the network resources that plugin reserved will be kept even when the
vm leaves off.

(Sheng Yang: rebase code, add license header)

Signed-off-by: Sheng Yang <sheng.yang@citrix.com>
2013-05-20 16:43:18 -07:00
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
Devdeep Singh
f5c8e386e5 CLOUDSTACK-2379: Fix for issue destroy vm causing NPE. Made the following changes.
1. Made a fix to make sure a null object is added to the exception.
2. Also fixed the marvin test cases for the feature. Account cleanup will remove the vms deployed for the account. There is no need to explicitly delete the vms for the account.
3. Fixed the assertion checks for the vm created for an account. If there are multiple vms for an account, the test script needs to compare the ids with the correct instance.
2013-05-20 18:26:50 +05:30
Kishan Kavala
612afbd179 CLOUDSTACK-2553: Made ACL item action case-insensitive 2013-05-20 18:06:12 +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
Isaac Chiang
63e92a4ea6 CLOUDSTACK-1871 : domainId parameter to uploadVolume not working
1. Remove duplicated lines for setting domainId.
2. Set domainId with owner's domain if the owner is specified.
2013-05-20 08:54:13 +08:00
Prasanna Santhanam
85d54cd1c0 CLOUDSTACK-2554: Incorrect compute of minmemory and cpu
23e54bb0 introduced multiple hypervisors support for cpu and memory
overcommit. Here the HypervisorGuru base which determines the min, max
range for the memory for all hypervisors computes the minCpu using the
MemoryOverCommit ratio and minMemory using the CpuOverCommit ratio.

Minor typo/logic issue but massive damage across all HV if enabled ;)

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-19 18:34:27 +05:30
Prasanna Santhanam
6ea2b06aab Fixing multiple minor annoyances:
1. Keeping the description consistent - Memory not RAM when referring to
overcommit
2. getters And setters grouped, provided right casing.
3. Removed wildcard imports

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-19 18:34:26 +05:30
Prachi Damle
1851f7f7f6 CLOUDSTACK-2365: Anti-Affinity - As admin , we are allowed to deploy a Vm in an affinity group that belongs to different user.
CLOUDSTACK-2349: Anti-Affinity - As admin user , using updateVMAffinityGroup() , we are allowed to update the affinity group of a Vm (that belongs to a regular user) to be set to admin's affinity group.

Changes:
- Even for root-admin make sure that the affinity group and the VM belong to same account
2013-05-17 15:33:01 -07:00
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
Nitin Mehta
4eb310e926 iCLOUDSTACK-2321
Fix the response of scaleVMCmd
Add Scale System vm command
2013-05-17 17:43:43 +05:30
Devdeep Singh
e520ff4568 CLOUDSTACK-2122. Virtual machine id should be a required parameter for findHostsForMigration api. Fixing it. 2013-05-17 17:01:17 +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
Likitha Shetty
caf0dd22b7 Dedicate Public IP range - If every public ip range in the system is dedicated when an account with no dedicate ranges
acquires a new public ip the request should fail
2013-05-17 09:51:10 +05:30
Mice Xia
3ed9e42dd2 fix null pointer dereference in cloud-server 2013-05-17 09:44:01 +08:00
Prachi Damle
890603be37 Unit test does not use this file anymore. 2013-05-16 15:28:02 -07:00
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
Vijayendra Bhamidipati
15be97772e PVLAN : Implementing PVLAN deployment capability for VMware deployments in cloudstack. 2013-05-16 14:50:16 -07:00
Kishan Kavala
d078f92167 CLOUDSTACK-2544: Fix NPE while comparing lastHostId during capacity calculation 2013-05-16 19:14:41 +05:30
Murali Reddy
f441582e1b CLOUDSTACK-2378: assignToGSLBRule or removeFromGlobalLoadBalancerRule APIs are failing when there are multiple physical network in a zone
adding support for deployments where multiple physical networks are configured for guest traffic in a zone
2013-05-16 18:26:14 +05:30
Murali Reddy
d2d0398e33 CLOUDSTACK-2529: GlobalLoadBalancerResponse should have the full FQDN
for the global load balanced service
2013-05-16 15:19:41 +05:30
Mice Xia
e26442f7d0 instead of '==', use equals() to compare two strings in cloud-server 2013-05-16 16:18:53 +08:00
Mice Xia
6d57393629 instead of using '==', use equals() to test Long value equality 2013-05-16 16:00:02 +08:00
Saksham Srivastava
e260817318 CLOUDSTACK-2130: UpdateDefaultNicForVirtualMachine api should also create usage events for updating new default network
Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
2013-05-16 14:22:36 +08:00
Sheng Yang
2d2c0c48cd Merge branch 'pvlan'
Conflicts:
	scripts/vm/hypervisor/xenserver/xenserver60/patch
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/NetworkServiceImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/network/MockNetworkManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
	server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java
2013-05-15 16:08:08 -07:00
Prachi Damle
ddd7cfd71c CLOUDSTACK-2519: VMs on local storage incorrectly destroyed when removing another host using deleteHost API
- For DeleteHost API: Search for Volumes in READY state on the local storage of the host to find VM's in 'Running' State
- For PrepareForMaintenance API: Search for Volumes not in Destroy or Expunging state to check if the Local Storage on the host is being used.
2013-05-15 13:28:41 -07: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
Wei Zhou
8f7a51ee5f CLOUDSTACK-962: Because of the same reason to this (CLOUDSTACK-685)
https://reviews.apache.org/r/11157/

Signed-off-by: Chip Childers <chip.childers@gmail.com>
2013-05-15 16:39:22 +01:00
Jayapal
36a312d4b2 CLOUDSTACK-2134 updated acl checks for aquiring nic secondary ip 2013-05-15 18:08:15 +05:30
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
Wei Zhou
7370638915 CLOUDSTACK:685 Fix user stat collection in PrepareStop part of VirtualNetworkApplianceImpl 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
Nitin Mehta
24cdddbf5e CLOUDSTACK-2459 Fix the scale vm tests 2013-05-15 14:25:39 +05:30
Kishan Kavala
39caa0ebdd Updated network acl service test to avoid default ACL modification 2013-05-15 14:20:29 +05:30
Kishan Kavala
3388b77156 CLOUDSTACK-2487: Show error while adding acl_item to default ACL 2013-05-15 12:51:08 +05:30
Alena Prokharchyk
26cefdcfac When UUID field is null for existing records, set it to id
Conflicts:
	server/src/com/cloud/uuididentity/dao/IdentityDaoImpl.java
2013-05-14 15:11:41 -07:00
Jayapal
46f8b6f34a CLOUDSTACK-2400 updated the error message and replacenetworkacl on private gateway 2013-05-14 16:11:33 +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
Alena Prokharchyk
dfdc089668 CLOUDSTACK-2465: fixed network creation in VPC - removed extra call to createGuestNetwork introduced by the NetworkACL feature merge 2013-05-13 15:28:08 -07:00
Sheng Yang
065d2561b9 CLOUDSTACK-2392: Not allow create pvlan network with ipv6 2013-05-13 11:40:40 -07:00
Jayapal Reddy
2d950e2858 CLOUDSTACK-768: ACL on private gateway 2013-05-13 19:24:23 +05:30
Nitin Mehta
bcc320f8b0 Scale vm test failing..commented for now to unblock all. Will open a bug for the same 2013-05-13 18:32:01 +05:30
Nitin Mehta
573f529ea0 mvn install didnt point me the compilation errors...fixing them 2013-05-13 18:18:56 +05:30
Nitin Mehta
f84b6abde0 merge with master 2013-05-13 17:30:42 +05:30
Bharat Kumar
052c24c4d1 CLOUDSTACK-702: Multiple ip ranges in different subnets.
This feature enables adding of guest ip ranges (public ips)  form different subnets.

In order to provide the dhcp service to a different subnet we create an ipalias on the router. This allows the router to listen to the dhcp request from the guest vms and respond accordingly. Every time a vm is deployed in the new subnet we configure an ip alias on the router. Cloudstack uses dnsmasq to provide dhcp service. We need to configure the dnsmasq to issue ips on the new subnets. Added a new class dnsmasqconfigurator which generates the dnsmasq confg file, this file replaces the old config in the router.

The details of the alias ips are stored in db in the nic_ip_alias table. Every time a new subnet is added one of the ip from the subnet is used to configure the ip alias.

I have pushed the code to  https://github.com/bvbharatk/cloud-stack/tree/Cloudstack-702 , also rebased the code with master.
I need to test the code for advanced sg enabled network using kvm.

I have added the unit test
Marvin tests are at https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=53e4965

Also accomodated some of the changes suggested by koushik.
corrected the import statements. renamed the IpAlias command to createIpAlias command.

This feature supports only ipv4
2013-05-13 17:06:44 +05:30
Nitin Mehta
8d53b1ef05 merge with master 2013-05-13 16:36:41 +05:30