961 Commits

Author SHA1 Message Date
Murali Reddy
c520aae346 CLOUDSTACK-2991: [PortableIPRange] CS should not allow portable IP with
sourceNAT service on it

if a portable ip is first IP associated with a non-VPC network, then its
being considered as source nat IP. This fix adds exemption for portable
IP not to be considred for source nat.
2013-07-30 15:49:09 +05:30
Bharat Kumar
a8387568f3 Fixed the conditon which checks for the provider's capabilty and reapply ipaliases on virtual router restart.
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-07-29 17:40:00 +05:30
Likitha Shetty
b7a483608f CLOUDSTACK-3735. Domain deletion fails even when the networks within the domain have been destroyed.
When a network is destroyed remove the corresponding network entry from domain_network_ref and account_network_ref table
2013-07-24 20:03:51 +05:30
Alex Huang
1325014a03 Changed VirtualMachineProfile to be non-generic. From here on VirtualMachineManager will only manage vm instance. It doesn't understand the difference between different types of VMs. This makes the vmsync code to be generic across all vms. 2013-07-22 11:48:11 -07:00
Alena Prokharchyk
823c72552e InternalLb: fixed creation for default network offering with internal lb support - public lb support should be disbaled on it 2013-07-19 13:20:57 -07:00
Murali Reddy
28aaa7534a CLOUDSTACK-3642: [Usage][PortableIP] CS is not generating usage events
for portable IPs

generating usage events for acquire/release of portable IP
2013-07-19 18:45:14 +05:30
Bharat Kumar
d73bb22802 Incorportaed the review changes Now dhcpservice IPs are removed when last vm from the subnet is removed. Rebased with master.
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-07-17 12:35:06 +05:30
Bharat Kumar
dd33abffbe Cloudstack-2997 Make haproxy maxconn configurable
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-07-17 10:06:11 +05:30
Bharat Kumar
6b549074fa Cloudstack-3313 Cannot deploy vm in ipv6 network
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-07-17 10:06:11 +05:30
ahuang
11e1e585b1 UserContext switched to CallContext. Added generic storage mechanism for other code to carry information throughout a call. Made the calling User and Account a must have. Added an interface to carry entities in error. Fixed up the code. Part of the vmsync branch 2013-07-16 11:24:21 -07:00
Murali Reddy
4466492484 CLOUDSTACK-3444: Unable to transfer portalbe IP between ISOLATED network and VPC
Tiered Network

When portable IP is transferred across the zones, we emulate portable IP
as provisioned in new zone's physical network carrying public traffic
and logical public network. network Id, and physical network id both
were bieng set to same physical network id resulting in IP association
to fail. This fix ensures both network and physcial network are set
appropriatley.
2013-07-15 08:48:50 +05:30
Alena Prokharchyk
3984287434 CLOUDSTACK-3458: network GC thread - acquire global lock to prevent multiple MS from running the GC thread on the network at the same time 2013-07-11 09:37:57 -07:00
Murali Reddy
ea8b85af2a CLOUDSTACK-234: create/delete firewa/lb/pf rule: send ip assoc command
only on first rule is created on the IP and last rule is revoked on the
IP

Current suboptima logic of IP Assoc

 - On associate IP to GuestNetwork there is an IPAssoc command sent to
   corresponding network service providers of the network
 - On every rule apply on IP associated with the network send IP assoc
   to the network service providers
 - On every rule deletion on IP associated with a network sernd IP assoc
   command to the network service providers

With this fix logic of IP assoc is changed as below which eliminates
executio of unnessary and expensive IpAssocCommand resource command

 - On associate IP to GuestNetwork, associate IP only to the network,
   Untill any service is associated with the IP dont send IP Assoc
 - On creation of first rule on the IP send IPAssoc to corresponding
   network service provider. Since IP is used for a service, IPAssoc
   need to be sent to correpondign service provider
 - On deletion of last rule on the IP send IPAssoc to corresponding
   network service provider. When last rule is deleted, IP has no
   service associated with it, so send IP assoc to service provider to
   remove the IP association
2013-07-08 14:52:12 +05:30
Hugo Trippaers
41fa79f65c The millisecond to second calculation was done with a bit shift of 10.
This is in effect a division by 1024, while time in ms should be divided
by 1000. The difference of 24 adds up to about a 381 day difference
today. This confuses anybody checking the timestamps in the logs.
2013-07-04 18:39:03 +02:00
Alena Prokharchyk
54c2133590 CLOUDSTACK-2984: createNetwork call - when vlan is specified, check that its not coming from the physical network vnet range as this range is used for dynamic vlan allocation during the network implementation stage 2013-07-01 16:17:43 -07:00
Murali Reddy
0f40cfbea8 CLOUDSTACK-2045: [Multiple IPs Per Nic] This feature is not working well
in case of networks with external devices after GC

add an exception for networks that use external networking devices and has
secondary guest IP's allocated. On network GC, when network goes through
implement phase a new vlan is allocated, based on the acquired VLAN id cidr
of the network is decided in case of external networking case. While NIC
uses reservation strategy 'Start' which ensures that new primary ip is
allocated for the NiC from the new CIDR. Secondary IP's have hardcoded
IP's in  network rules. So prevent network GC.
2013-06-28 12:26:20 +05:30
Murali Reddy
ff167134e4 CLOUDSTACK-3214: transferring portable IP across zones with enableStatic
NAT does not work

making an exception for portabe IP, so that if the current datacenter with
portable IP is associated is different from destiantion data center

also on transfer on to new zone, transfer the portable ip association to
new data center, physical network id's
2013-06-26 19:29:55 +05:30
Alena Prokharchyk
1eacd7872e Update resource count for networks only when the network is non system and Isolated. Before we used to update the count only when offering had specifyVlan=false. And in 4.2 even isolated networks can have this attribute set to true, and we have to count them 2013-06-25 13:46:35 -07:00
Jayapal
6a7ae637dd CLOUDSTACK-1578 Egress default policy configurable using network offering in xenserver with VR as firewall provider 2013-06-24 13:37:00 +05:30
Kishan Kavala
b422d8ddd9 CLOUDSTACK-2819: Revoke existing ACL items if the new ACL is empty 2013-06-20 17:06:06 +05:30
Edison Su
5f28dcc6bb merge to master 2013-06-19 22:41:13 -07:00
Edison Su
9aec9c605c merge to master 2013-06-19 18:16:47 -07:00
Sheng Yang
b3fb4851ee Fix regression of return Userdata provider when caller asked for DHCP
It's introduced by:

commit 052c24c4d1c881f791b804dbb9c2fc083af7da36
Author: Bharat Kumar <bharat.kumar@citrix.com>
Date:   Mon May 13 17:02:27 2013 +0530

    CLOUDSTACK-702: Multiple ip ranges in different subnets.

This commit get userdata provider when caller asked for dhcp provider, thus
result in trouble e.g.

ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-11:job-10) Unexpected
exception while executing
org.apache.cloudstack.api.command.user.network.DeleteNetworkCmd
java.lang.ClassCastException:
com.cloud.baremetal.networkservice.BaremetalUserdataElement_EnhancerByCloudStack_5dee69d2
cannot be cast to com.cloud.network.element.DhcpServiceProvider
        at
com.cloud.network.NetworkManagerImpl.getDhcpServiceProvider(NetworkManagerImpl.java:3309)
...
2013-06-19 17:06:06 -07:00
Alena Prokharchyk
d66e9c7b51 CLOUDSTACK-2843: Provideded an ability to turn off the synchronization being done on the CS agent side,
for number of commands participating in Vm deployment process, as parallel deployment is supported on the hypervisor side.
The behavior is controlled by global config varirables:

"execute.in.sequence.hypervisor.commands" (false by default) sets/resets the synchronization for commands:
=========================
StartCommand
StopCommand
CreateCommand
CopyVolumeCommand

"execute.in.sequence.network.element.commands" (false by default) sets/resets the synchronization for commands:
==========================
DhcpEntryCommand
SavePasswordCommand
UserDataCommand
VmDataCommand

As a part of the fix, increased the global lock timeout to 30 mins in several VR scripts:
===========================
edithosts.sh
savepassword.sh
userdata.sh

to support situations when multiple concurrent calls to the script are being made.
2013-06-19 10:12:13 -07:00
Alena Prokharchyk
5d0a1cee13 CLOUDSTACK-2883: create default network offering with internal lb support (if doesn't exist already) 2013-06-17 16:13:19 -07:00
Likitha Shetty
770cf02ccf Global config to disable an account from acquiring public ips and guest vlans from the system if the account
has dedicated resources and the dedicated resources have all been consumed - use.system.public.ips and use.system.guest.vlans
Both configs are configurable at the account level too.
2013-06-17 17:54:36 +05:30
Min Chen
18aeef3ef1 Merge branch 'master' (up to commit
c30d9be3cea30339cfff40c1002906634291b373) into object_store.
2013-06-12 11:20:32 -07:00
Sheng Yang
4a14ea8a4d CLOUDSTACK-1771: Fix ipv6 address for router
Now it won't change(as ipv4 address) after router is destroyed.
2013-06-06 18:04:35 -07:00
Alena Prokharchyk
f4a1a2ff38 Allow account to have multiple networks with customer defined cidrs as we already let it happen when the cidr is taken from the physical network config 2013-06-06 11:52:15 -07:00
Anthony Xu
271cf92ab7 allow subdomain access parent domain's network 2013-05-29 16:27:08 -07:00
Anthony Xu
a8bb62c35c lockRow doesn't work without transaction, start transaction before lockRow 2013-05-29 15:48:23 -07:00
Min Chen
6e55776795 CLOUDSTACK-2331: Failed to display exception object information in case of CloudRuntimeException. 2013-05-28 16:01:33 -07:00
Alena Prokharchyk
f2c468d00c Removed unused imports and obsolete methods from ConfigurationManager/ConfigurationServer, NetworkManager/NetworkService 2013-05-28 15:40:44 -07:00
Murali Reddy
883333c214 CLOUDSTACK-2700:on network/vpc delete, portable IP should be still
associated with account

Unlike public ip which gets dis-associated (released) with the account
on network/VPC delete, portable IP should continue to be associated with
the account even when the network/VPC with which it is currently
associated in deleted. This fix ensures portable IP are associated to
account even after network/vpc is deleted.
2013-05-27 18:44:41 +05:30
Murali Reddy
ad48c83808 generate an action event when portable IP association is transferred
from a network to different network
2013-05-27 18:44:41 +05:30
Min Chen
98af424053 Merge branch 'master' into object_store. 2013-05-23 18:00:15 -07:00
Alena Prokharchyk
f41d398cf7 Remote access vpn: method name change 2013-05-22 16:05:03 -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
Edison Su
f7c1b711ad merge to master 2013-05-16 23:56:20 -07:00
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
Vijayendra Bhamidipati
15be97772e PVLAN : Implementing PVLAN deployment capability for VMware deployments in cloudstack. 2013-05-16 14:50:16 -07:00
Likitha Shetty
fd354dbd7c 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 19:41:49 -07: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
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
Edison Su
a0c3d280b4 merge to master 2013-05-15 00:40:53 -07:00
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
Kishan Kavala
750bfe76ca CLOUDSTACK-763: Added filters to list APIs. Seperated service interface implementation to NetworkACLServiceImpl. Added default ACL to upgrade schema 2013-05-13 12:03:38 +05:30