504 Commits

Author SHA1 Message Date
Sheng Yang
5cb9df91a1 Merge branch 'ipv6'
Conflicts:
	api/src/com/cloud/network/NetworkProfile.java
2013-01-31 15:07:33 -08:00
Jayapal
b6727e5646 CLOUDSTACK-299: Egress firewall rules feature for guest network on VR 2013-01-31 11:20:47 +05:30
Harikrishna Patnala
b21595c10d CLOUDSTACK-297: Reset SSH key to access VM
This feature provides resetting a SSH key for an existing VM which means,
setting the old ssh key that is assigned to the VM previously with the new ssh
key.

Signed-off-by: Harikrishna Patnala <harikrishna.patnala@citrix.com>
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-30 17:33:44 -08:00
Sheng Yang
6169c1d724 IPv6: Enable IPv6 address for router 2013-01-26 23:14:21 -08:00
Sheng Yang
bd4bc025d1 IPv6: Accept IPv6 parameter for createNetworkCmd
Also ass public_ipv6_address for ipv6 address management.

Extend nics and vlans for ipv6 address.

Add dependency to com.googlecode.ipv6(java-ipv6).

Modify dhcpcommand for ipv6.
2013-01-26 23:14:15 -08:00
Chiradeep Vittal
cadca5fc0c Merge branch 'master' into network-refactor-merge2
Conflicts:
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/network/element/RemoteAccessVPNServiceProvider.java
	plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
	server/src/com/cloud/acl/DomainChecker.java
	server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/network/MockNetworkManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
2013-01-16 19:17:14 -08:00
Sheng Yang
4f889bd426 CLOUDSTACK-985: Make sure RvR would always have same MAC address
Even with newly created RvR using "restartNetwork&cleanup=false" API.
2013-01-15 15:22:41 -08:00
Sheng Yang
c32dbec468 CLOUDSTACK-985: Revert "Using different MAC for a pair of redundant routers"
The different MAC address for a pair of redundant router have issues when short
time network outrage happened. When this happened:

1. BACKUP(r-2) cannot receive the broadcast from MASTER(r-1).
2. Then r-2 would announce it's MASTER after 3 seconds, and send gratuitous ARP
to the gateway of public ip(usually a rack router).
3. The gateway of public ip would update it's ARP cache to associate the public
ip of the network to the MAC of r-2.
4. In the meantime, r-1 still sending out VRRP broadcast(due to network issue,
the broadcast never arrived at r-2), and acting as MASTER.
5. After network outrage, r-2 would receive the higher priority VRRP broadcast
from MASTER again, then receded as BACKUP.
6. But the public gateway would still associate public ip with MAC of r-2, thus
caused the issue. r-1 would no longer able to receive any packets from public
network.

And there is no way for r-1 to send gratuitous ARP again, because it's always
consider itself as MASTER, no state changed, and no hook existed for receiving
lower priority broadcast.

So I would revert this change, and introduce another commit to ensure the newly
create redundant router would share the same MAC as the first one.

This reverts commit 9f257aa60b62f24193bba3f7c902e7779632e01e.
2013-01-15 15:02:21 -08:00
anthony
3aba867e16 only basic network is pod based.
it has nothing to do with shared SG enabled netwokr
2013-01-14 18:29:09 -08:00
Kishan Kavala
cd7f771615 CLOUDSTACK-721: Fixed network usage. Send network usage command for isolated guest nic of non VPC VR. Send network usage command for public nic in VPC VR. 2013-01-10 14:56:11 +05:30
Chiradeep Vittal
504264236c Network-refactor: In preparation for moving the read-only interface NetworkModel
to the api project, ensure that all methods use interfaces from the api project.
By moving it to the api project, it lessens the dependency of plugins on the server components.

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 15:49:01 -08:00
Chiradeep Vittal
5a830c4db0 Network-refactor: Refactor NetworkManager into NetworkModel and NetworkManager.
NetworkManager's exclusive focus is now
 - handling plugins during orchestration, and
 - to deal with ip address allocation.
Those classes that used to refer to NetworkManager to get access to the datamodel now refer to NetworkModel

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 15:49:01 -08:00
Rohit Yadav
b720675bfe Merge branch 'master' into api_refactoring
Getting ready for merge request for master, sync changes

Conflicts:
	client/tomcatconf/commands.properties.in

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 01:11:16 -08:00
Sheng Yang
aa9701a10c CLOUDSTACK-799: Redundant router: Speed up RvR status update
The basic idea behind this is, deploy a fix sized threadpool for updating RvR
status, then using producer/consumer model. There is a global configuration
router.check.poolsize(10 by default) to control the pool size.

Using pool size 100 for 1000 RvR is tested with simulator and works well.

Also we can adjust the global configuration option router.check.interval to e.g.
60s from default 30s to mitigate the issue.
2013-01-05 21:02:37 -08:00
Rohit Yadav
5119785cf7 Get latest changes, merge branch 'master' into api_refactoring
Conflicts:
	api/src/com/cloud/network/element/RemoteAccessVPNServiceProvider.java
	server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
	server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 22:21:20 -08:00
Sheng Yang
177e157cbf CLOUDSTACK-306: Move inline mode parameter from device to network offering
One F5 device can be used as inline and side-by-side at the same time(for
different networks). So we can define inline or not on network base.
2013-01-04 19:17:58 -08:00
Rohit Yadav
296b49c2f8 Merge branch 'master' into test-merge-api
Conflicts:
	api/src/com/cloud/agent/api/BackupSnapshotCommand.java
	api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java
	api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/resource/ResourceService.java
	api/src/org/apache/cloudstack/api/ApiConstants.java
	api/src/org/apache/cloudstack/api/ResponseGenerator.java
	api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java
	client/tomcatconf/commands.properties.in
	core/src/com/cloud/storage/SnapshotVO.java
	pom.xml
	server/src/com/cloud/api/ApiDispatcher.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/offerings/NetworkOfferingVO.java
	server/src/com/cloud/resource/ResourceManagerImpl.java
	server/src/com/cloud/upgrade/dao/Upgrade40to41.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
	setup/db/create-schema.sql
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 13:54:46 -08:00
Sheng Yang
96c7bbeb86 Update the router status after start network
Start network can possible start the router as well. If it's already started by
start network, then we won't need to start it again.
2012-12-21 15:22:07 -08:00
Sheng Yang
9f257aa60b Using different MAC for a pair of redundant routers
In the past, we use same MAC address therefore once MASTER is down, the packet
to the same MAC would go to BACKUP ASAP.

But now we also have arping after BACKUP become MASTER, which should update the
ARP cache of public gateway router quickly. Though it would be a little
delay(likely less than 1 second), it's still fine for different MAC.

And it would solve some cache issue for same mac on vSwitch different ports.
2012-12-21 15:21:53 -08:00
Sheng Yang
d72f8a695d Add new global configuration option to enable user specify guest OS DHCP policy
This is improvement of:

commit 1ca493e4facf190a288012bf9b888f90e2bc2855
Author: Sheng Yang <sheng.yang@cloud.com>
Date:   Wed Feb 29 17:43:50 2012 -0800

    bug 14042: Don't set dhcp:router option on DHCP server for non-default
network on CentOS/RHEL

The old solution only works on CentOS/RHEL, this one would enable the ability to more
guest OS, and enable user to choose what policy should be for each guest os
type.
2012-12-20 19:21:02 -08:00
Sheng Yang
53e6825b74 CLOUDSTACK-689: Clean stop pending flags when VR start/stop 2012-12-20 18:51:01 -08:00
Rohit Yadav
af28c06998 api: move and group all under command, org.apache.cloudstack.command.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 18:30:54 -08:00
Rohit Yadav
c59de6cbde api_refactor: router apis for admin pkg
- Fix missing api mapping in commands.prop
- Refactor package namespace

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-05 15:23:31 -08:00
Rohit Yadav
5edfc2760a refactor: remove redundant imports, fix trailing chars 2012-12-03 13:54:37 -08:00
Deepak Garg
bf1e6ed991 CS-15644-Autoscale: Implemented UUIDs for templateId-serviceOff Reviewed-By:Vijay 2012-11-16 10:56:58 +05:30
Vijay
dda4d39b55 AutoScale changes in Apache master 2012-11-16 10:56:44 +05:30
Rohit Yadav
4c86b1545d CLOUDSTACK-424: Update userdata should propagate to VR
The code that would propage userdata to router, when updateVirtualMachine api
is called, was missing. As per the docs [0], userdata should be a base64 encoded
string upto 2KB which is put on domr's html directory adn using HTTP GET the
userdata information can be obtained from the domr.

The updateVirtualMachine api [0] would accept a base64 encoded string
and decoded and put into the domr's /var/www/html/userdata/<uservm ip>/user-data
file. The operation does not require the VM to be in stopped state, though it is
advised to stop and call this api in case the user vm has a script which gets
the userdata information from domr while starting.

For example, this script can be used to fetch the data:
server_ip=$(grep dhcp-server-identifier /var/lib/dhclient-eth0.leases | tail -1 | awk '{print $NF}' | tr '\;' ' ')
wget http://${server_ip}/latest/user-data

This feature can be useful, for example to use into puppet facts [1], or to do
automation and horizontal scaling etc. based on userdata.

[0] http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/domain_admin/updateVirtualMachine.html
[1] http://geek.jasonhancock.com/2011/11/09/cloudstack-userdata-into-puppet-facts/

BUG-ID : CLOUDSTACK-424
Reviewed-by: Rohit Yadav <bhaisaab@apache.org>
Reported-by: Nick Wales

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-15 18:43:51 +05:30
Alena Prokharchyk
214bbf3ebd CLOUDSTACK-279: fixed deleteProject when executed by the regular user. Always pass System account as a caller when do account cleanup
Conflicts:

	api/src/com/cloud/api/commands/DeleteRemoteAccessVpnCmd.java
	server/src/com/cloud/network/element/CiscoNexusVSMElement.java
	server/src/com/cloud/network/element/ElasticLoadBalancerElement.java
	server/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
	server/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/element/NetscalerElement.java
	server/src/com/cloud/network/element/OvsElement.java
	server/src/com/cloud/network/element/VpcJuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
	server/src/com/cloud/storage/StorageManager.java
2012-10-17 17:26:19 -07:00
Rohit Yadav
6dd5c3fd42 CLOUDSTACK-70: Improve restart network behaviour for basic network
If cleanup=true, network elements and resources are shutdown and
reimplemented. Else, shutdown/reimplementation is skipped. Enabled
cleanup checkbox in CS UI.

For both cases, VRs are only deployed for Pods with no running
or starting VRs and Pods having running or starting user vms.

New DAO helpers introduced:
HostPodDao: listByDataCenterIdVMTypeAndStates
DomainRouterDao: listByPodId and listByPodIdAndStates
VMInstanceDao: listByPodId and corrected definition of listByTypeAndState

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-11 19:33:26 +05:30
Alena Prokharchyk
c36744a18c Fixed deployVR - used to fail in case when system.vm.default.hypervisor was set to not NULL value 2012-10-10 13:05:39 -07:00
Sheng Yang
fe8a2992a2 Elimiate mystery guestIp in IpAddressTO
Nobody can explain why it's there...

Also fix wrong return result of several empty network element callbacks
2012-09-12 15:42:48 -07:00
Alena Prokharchyk
d0c526fdcd Replaced tabs with spaces in VirtualNetworkApplianceManagerImpl (tabs were used mostly in network stats related code) 2012-09-11 17:03:11 -07:00
Fang Wang
6fd7da8f56 Keep the instance-id and vm-id values prior to Acton, use UUID for VMs created poast Acton. 2012-09-11 17:03:11 -07:00
Fang Wang
4b8fb79ef6 Fix the output of instance-id and vm-id to UUID 2012-09-10 18:02:34 -07:00
Fang Wang
663e250334 Replace db-id by UUID for user VM's vm-id. 2012-09-10 18:01:08 -07:00
Sheng Yang
86427559cb CS-16269: Fix savePassword on one stopped RvR 2012-09-05 13:46:44 -07:00
Jayapal
eb4a3cf6c8 bug CS-15398: fix for basic zone dns issue in multiple pods 2012-08-29 14:33:27 +05:30
Alena Prokharchyk
38e26f8dbd IpAssoc: when set ROUTER_GUEST_IP, get network id from associatedNetworkId field of the ip address instead of networkId as networkId is the id of the public network the ip belongs to
Reviewed-by: Sheng Yang
2012-08-27 16:26:32 -07:00
Alena Prokharchyk
3ada5e4a46 VPC: CS-16100 - 1) when start VPC router, never pick up any other hypervisor besides vmWare and Xen 2) When start user vm in vpc network, throw an error when deploy from the tempalate of not supported hypervisor
Reviewed-by: Frank Zhang

Conflicts:

	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
2012-08-22 11:53:59 -07:00
Jayapal
a5248f1cfc Fix for dns issue in multiple pods
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2012-08-22 16:48:41 +05:30
Alena Prokharchyk
2bf5c99bc6 CS-15304: VR deployment - release the lock for the network once the router entry is allocated (2.2.x behavior) as opposed to releasing it when the router start is completed
Reviewed-by: Frank Zhang

Conflicts:

	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2012-08-21 15:31:07 -07:00
Alena Prokharchyk
7d0ad98c93 More logging to lock operations on the network 2012-08-21 15:25:17 -07:00
Alena Prokharchyk
14dd3f07d7 Fixed line endings in VirtualNetworkApplianceManagerImpl 2012-08-21 15:24:44 -07:00
Edison Su
481aae1ebc add recreate.systemvm.enabled parameter to control recreating systemvm 2012-08-20 11:19:26 -07:00
Sheng Yang
1cfcefd2fb CS-16043: Using network based router rather than account for RVR detection 2012-08-17 16:52:06 -07:00
Sheng Yang
ea6f3eb6f9 CS-14253: Apply IP when firewall rule is in place 2012-08-17 16:52:06 -07:00
kishan
691be5c60e bug CS-15577: Added per gateway network usage for VPC and VPN usage. VPN usage uses 525 mark for outgoing traffic and 524 mark for incoming traffic
status CS-15577: resolved fixed
2012-08-17 17:07:13 +05:30
Sheng Yang
6e7b4bc07b S2S VPN: CS-15642: Re-initiate the VPN connections after router reboot
Conflicts:

	server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
2012-08-06 15:32:18 -07:00
Sheng Yang
1b5103c501 S2S VPN: CS-15472: Separate IKE lifetime and ESP lifetime 2012-08-06 15:19:26 -07:00
Alena Prokharchyk
ebe53a91d7 VPC: reduced visability for some vpc related methods
Conflicts:

	server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
2012-08-01 18:33:12 -07:00