Commit Graph

1492 Commits

Author SHA1 Message Date
Naredula Janardhana Reddy e75520259d Bug 14120: Enabling SNAT for all the public NICs.
Summary of changes:
    - snat flag is set to true if it is first ip of the NIC.

reviewed-by: Abhi
2012-05-07 09:59:44 +05:30
JohnZ ef2c7423f1 S3 API merged branch 2012-05-02 15:51:10 +01:00
Salvatore Orlando 486d962f09 CS-14724 : Making the default network label configurable, improving exception management
Please also see notes added to wiki.cloudstack.org/display/QA/Open+vSwitch+Tunnel+Manager
2012-05-02 13:14:47 +01:00
Vijayendra Bhamidipati f601db1304 Bug 14060: Include a CloudStack error code in an Exception Response
Bug 13127: API error text refer to database ids instead of uuids

Code-Reviewers: Ewan Mellor, Kelven Yang

Description:

	1. A new class CSExceptionErrorCode has been added to utils.
	   It contains a list of error codes for each type of
	   Exception class. Use fully qualified package paths for
	   Exceptions in CSExceptionErrorCode.  We log any exception
	   name not found in the list of error codes for exceptions.

	2. Whenever we throw an exception exobj anywhere in the
	   CS code, the CSErrorCode is set in the base class
	   constructor.

	3. We add a new field csErrorCode in classes CloudException,
	   RuntimeCloudException, ExecutionException and
	   ExceptionResponse.

	4. Two places in ApiServer.java were wrongly modified when
	   putting in changes for bug 13127 to not throw an exception.
	   This has been corrected in this commit.
2012-05-01 13:48:15 +01:00
Vijayendra Bhamidipati bea85d47a7 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Modify Exception handling to enable addition of multiple
	uuids in a single exception thrown by API functions. Both
	XML and JSON outputs will store all uuids and Fieldnames.
	This will make it easier to provide more information when
	an exception occurs - for example, a zone id, a cluster id,
	host id, and then a specific property id.
2012-05-01 13:28:21 +01:00
Vijayendra Bhamidipati 094f01be41 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Added a field name for the db id in the IdentityProxy class, and
	modified setProxyObject() to take an additional id name parameter.
	This will let us know the name of the uuid that we are returning.
	E.g.- domainId, zoneId, etc. The client can view this field in
	the json/xml output. Modified the JSON/XML serialization routines
	to append this new parameter to the serialized output for Exception
	Responses.
2012-05-01 13:28:20 +01:00
Vijayendra Bhamidipati b4cefb4cc6 Bug 13127: API error text refer to database ids instead of uuids
Description:

	1) Added a setProxyObject() method to CloudException and RuntimeCloudException
	2) Modified a bunch of throw exceptions in NetworkManagerImpl.java to call setProxyObject() before throwing an exception.
	3) Changed scope of ProxyIdentity attribute to protected.
	4) Added routines to ServerApiException to get/set IdentityProxy object, and
	   routine in RuntimeCloudException to get the Idproxy object.
	5) Modified the exception handling around the dispatcher and handlerequest()
	   to copy over the IdentityProxy information before rethrowing an exception
	   eventually back to handle().
	6) Removed duplicate IdentityProxy object in ServerApiException.
	   It was extending RuntimeCloudException which already had an
	   IdentityProxy object.
2012-05-01 13:28:16 +01:00
Vijayendra Bhamidipati efdaa4d110 Bug 13127: API error text refer to database ids instead of uuids
Description:

1)	Moved RuntimeCloudException from api/ to utils/.

	Added simple constructor to RuntimeCloudException.

	Modified all classes that extended RuntimeException
	to extend RuntimeCloudException. These classes
	are listed below:

		ServerApiException
		CloudAuthenticationException
		CloudExecutionException
		AsyncCommandQueued
		HypervisorVersionChangedException
		RuntimeCloudException

2)	Added overloaded constructed to CloudException.
	Modified all classes that extend Exception to extend CloudException instead.
	These classes are listed below:

		ConcurrentOperationException
                ConflictingNetworkSettingsException
                ConnectionException
                DiscoveryException
                InsufficientCapacityException
                ManagementServerException
                ResourceUnavailableException
                VirtualMachineMigrationException
                AgentControlChannelException
                OperationTimedoutException.java
                UnsupportedVersionException.java
                UsageServerException.java
                UnableDeleteHostException.java
                AgentAuthnException.java
                HttpCallException.java
                ActiveFencingException.java
                ClusterInvalidSessionException.java
                GreTunnelException.java
                OvsVlanExhaustedException.java
2012-05-01 13:21:44 +01:00
Salvatore Orlando 88131e5db6 CS-14605: OVS cleanup
Fix syntax errors in ConfigurationManager and Resource Manager test

Conflicts:

	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
	server/test/com/cloud/agent/manager/ResourceManagerTest.java
2012-04-25 15:11:05 +01:00
Salvatore Orlando 33a2b17972 CS-14605: OVS Tunnel Manager Clean-up
1) Remove old VLAN-in-overlay manager
2) Remove unused DAO objects
3) Fix code using removed object (all stale lines)

Conflicts:

	server/src/com/cloud/network/ovs/GreTunnelException.java
	server/src/com/cloud/network/ovs/OvsVlanExhaustedException.java
	server/src/com/cloud/network/ovs/dao/OvsTunnelAccountDao.java
	server/src/com/cloud/network/ovs/dao/OvsTunnelAccountDaoImpl.java
	server/src/com/cloud/network/ovs/dao/OvsTunnelAccountVO.java
2012-04-25 15:03:47 +01:00
Alena Prokharchyk 4e3bdb62d2 Account specific vlan ranges - fixed deleteVlanRange
Conflicts:

	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
2012-04-24 17:16:58 -07:00
Alena Prokharchyk ccd0472201 CS-14622: fixed adding vlan range per account - associate it with the Guest network, not public
Conflicts:

	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
2012-04-24 11:42:53 -07:00
Salvatore Orlando ef13158c2b CS-14437: Fixing remaining merge issues affecting tunnel creation
Tunnel networks now work on this branch
(VLAN networks never stopped working)
2012-04-24 15:21:41 +01:00
Salvatore Orlando 48b6236c64 Fixing merge issues for OVS tunnel manager 2012-04-24 02:22:10 +01:00
Salvatore Orlando 421862216e Now finding the IP address also for the remote endpoint
Conflicts:

	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
2012-04-24 02:20:39 +01:00
Salvatore Orlando cc344ad038 Adding DB support for interfaces OVS tunnel manager will use as GRE endpoints
Conflicts:

	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
2012-04-24 02:20:38 +01:00
Salvatore Orlando 24a567ac43 Removing superfluous log statements 2012-04-24 02:20:38 +01:00
Salvatore Orlando 2d12cfbc87 Fixing remaining issues with per-VIF flow script and removing version-specific scripts.
Now generating XSnetwork names using gre keys

Plus other minor corrections

Conflicts:

	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
	server/src/com/cloud/resource/ResourceManagerImpl.java
2012-04-24 02:20:38 +01:00
Salvatore Orlando 58165221ef Now using vnets instead of network id for creating networks
Fixed issues with vif scripts on 5.6FP1
Fixed ipv6 issue on 5.6FP1
Plus other various fixes and improvements

Starting to remove debug code
NOTE: Network is configured correctly but instances do not start. Possibly indefinite wait occuring on some commands

Conflicts:

	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
2012-04-24 02:20:37 +01:00
Salvatore Orlando f786505a1b Adding Missing file to source control 2012-04-24 02:20:37 +01:00
Salvatore Orlando 8c398654d3 Open vSwitch tunnel manager
Applying patch with new ovs-tunnel-manager on top of cloudstack oss-master

Conflicts:

	api/src/com/cloud/network/ovs/OvsCreateTunnelAnswer.java
2012-04-24 02:20:37 +01:00
Sheng Yang 95d3be2d3a bug 14470: Return true for applyRules unless specified
Only DHCP entry need to know if no one apply the entries(when VM is starting
up), other rules should be safe when return true anyway.

status 14470: resolved fixed
2012-04-13 14:51:13 -07:00
Alena Prokharchyk 07778f8db3 Code cleanup for createVlanRange api 2012-04-04 15:02:51 -07:00
frank 72d284de7d Switch to Apache license 2012-04-03 04:54:14 -07:00
prachi 399cc04163 Bug 14536 - DB exception while trying to delete physical network
Reviewed-By: Sheng Yang

Changes:
Added proper cleanup for virtual router elements.
2012-03-29 12:38:13 -07:00
prachi 2b6712b7a8 Bug 14536 - DB exception while trying to delete physical network
Reviewed-By: Sheng Yang

Changes:
Added 'removed' column to physical_network_service_providers to avoid the Foreign Key constraint error.

Conflicts:

	setup/db/db/schema-30to301.sql
2012-03-29 10:08:47 -07:00
Alena Prokharchyk 94986f74f9 bug 14444: specifyVlan should always be false for the network offering of type Isolated supporting sourceNat service
status 14444: resolved fixed
2012-03-28 13:51:00 -07:00
kishan 23f87663e4 bug 14512: Create user_stats entry for router while persisting routerVO
status 14512: resolved fixed
reviewed-by: Nitin
2012-03-27 19:09:55 +05:30
Sheng Yang d80b58fe1d bug 14484: Apply existed firewall rules when associating IP
It's not a elegant fix. The status for firewall rules should remain unchanged
before/after ip association/disassociation. But the related change is tricky
than this fix, may not get enough test for 3.0.1. So we would apply existed
firewall rules again, which would work, just result in some unnecessary
commands.

status 14484: resolved fixed

Reviewed-by: Edison Su
2012-03-26 13:55:32 -07:00
frank 5fe0faf0cd Bug 14492 - Stop and start of SSVM in Zone1 fails if Zone2 is configured with Storage network
status 14492: resolved fixed
reviewed-by: edison
2012-03-26 11:57:52 -07:00
Alena Prokharchyk 0652165adb bug 14446: removed elasticLBVm from components.xml
status 14446: resolved fixed
reviewed-by: Frank Zhang
2012-03-22 10:26:37 -07:00
prachi 64311cc3ab Bug 14299 - Fix adding public ip range per account
Changes:
Fixed as described in the bug.

* CreateVlanIpRangeCmd still accept account/domainId info
* if account owns:
- one Isolated network with source nat service enabled, use this network
- more than one Isolated network with source nat service enabled - error out
- none Isolated networks with source nat service enabled, create it only in
case when there is an Isolated network offering with Availability=Required and
source nat service enabled.
2012-03-21 16:46:13 -07:00
Sheng Yang ce2e1166e0 bug 14042: Don't set dhcp:router option on DHCP server for non-default network on CentOS/RHEL
The routing table with two nics may be messed up, due to we sent same
router(gateway) information from different DHCP server, in order to specify
default gateway. E.g.

Network A: 192.168.1.0/24, gw 192.168.1.1
Network B: 192.168.2.0/24, gw 192.168.2.1

User VM: Nic 1 connect to network A, get ip 192.168.1.10; nic 2 connect to
network B, get ip 192.168.2.10.

Set network A as the default network of user VM.

Currently we would send this information to user VM through DHCP offer:
In network A: dhcp-option:router 192.168.1.1
In network B: dhcp-option:router 192.168.1.1

So both NIC in the guest VM would receive 192.168.1.1 as router(gateway).

But, in CentOS 5.6, dhclient-scripts try to tell if the gateway is reachable
for current subnet.

So when we try to enable nic 2(eth1) of user VM, dhclient would receive:
IP: 192.168.2.10
Mask: 255.255.255.0
Router: 192.168.1.1

Then it would found that the specified gateway(router) is not within its own
subnet(192.168.2.0/24). But since we send out this ip(192.168.1.1) as the
gateway for it, dhclient thought that it should got someway to access the
network through this IP. So it would execute:

ip route add 192.168.1.1 dev eth1
ip route replace default via 192.168.1.1 dev eth1

But it can never reach 192.168.1.1(which is in the eth0's subnet and the
gateway of eth0) by go through eth1 interface. So it is messed up.

We've tested Windows 2008 R2, CentOS 5.3, CentOS 5.6 and Ubuntu 10.04. Windows
and Ubuntu are fine with above policy.

To solve this, we send different dhcp:router option according to the guest OS
type now.

We may need expand this list later, but for now we only know that CentOS and
RHEL would behavior in this way.

status 14042: resolved fixed
2012-03-21 10:37:30 -07:00
Sheng Yang e14cf6a4e1 Fix not sending DNS in DHCP command 2012-03-21 10:37:24 -07:00
Murali reddy b4e64e653b bug 13899: CloudStack (Advanced Mode) should not allow "NetScaler" as provider for StaticNAT service
status 13899: resolved fixed
2012-03-21 16:52:51 +05:30
Alena Prokharchyk 7964665cb4 bug 14388: don't return console proxy / ssvm service offerings
status 14388: resolved fixed
2012-03-19 14:52:11 -07:00
Alena Prokharchyk d5e95fa407 bug 14295: allow regular user to create network with the custom cidr
status 14295: resolved fixed
2012-03-14 10:47:08 -07:00
Sheng Yang d3142c2977 Refactor VirtualRouterNetworkManagerImpl
Refactor applyDhcpEntry and applyUserData to use applyRules framework.
2012-03-12 16:10:16 -07:00
Alena Prokharchyk 9e9ff4f363 bug 14239: limit number of Isolated account specific networks per account
status 14239: resolved fixed
2012-03-12 15:50:49 -07:00
Sheng Yang 9022ab5bc9 bug 14074: Specify networkId for list public ip
status 14074: resolved fixed
2012-03-12 12:07:57 -07:00
Sheng Yang 21fedec0ef Refactor VirtualNetworkApplianceManagerImpl
Add separate create command for dhcp, userdata and password.
2012-03-09 19:00:35 -08:00
Sheng Yang 4956177dd1 Refactor rules appling in the VirtualNetworkApplianceManagerImpl 2012-03-09 18:00:26 -08:00
Sheng Yang 666a7aa974 Fix several wrong ResourceUnavailableException scopes 2012-03-08 11:54:43 -08:00
Alena Prokharchyk 82841438d1 bug 14173: add eip/elb network offering (if missing) during the management server start
status 14173: resolved fixed
2012-03-07 10:01:40 -08:00
Sheng Yang bd7d4a407a bug 14110: Fix error message
status 14110: resolved fixed
2012-03-05 11:10:17 -08:00
Sheng Yang 178bd35143 bug 14076: Fix the exception scope
status 14076: resolved fixed
2012-03-01 14:59:08 -08:00
Alena Prokharchyk 8972e0826e Wrap deletePhysicalNetwork in transaction 2012-02-29 11:02:35 -08:00
Kelven Yang d6271aab9b bug 13989: get domr control IP from NIC table, the old private ip in domain_router table is no longer valid under basic zone configuration. Reviewed-By: Anthony 2012-02-27 15:59:14 -08:00
Alena Prokharchyk 1b16ad0f93 Clone services map when do provider/service verification during network offering addition.
Reviewed-by: Prachi Damle
2012-02-24 15:33:28 -08:00
Kelven Yang f41b0f4d0b bug 13989: GetDomRVersion command context is not correctly set for VMware under Basic zone configuration. Reviewed-By: Anthony 2012-02-24 10:00:21 -08:00