You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2013/06/10 19:26:55 UTC
[01/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Updated Branches:
refs/heads/disk_io_throttling f2e5591b7 -> 8b8a0d397
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
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f4a1a2ff
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f4a1a2ff
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f4a1a2ff
Branch: refs/heads/disk_io_throttling
Commit: f4a1a2ff380478fcd23319f0fd2678c50b971e36
Parents: 9a175f9
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Thu Jun 6 11:52:15 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Thu Jun 6 11:52:15 2013 -0700
----------------------------------------------------------------------
.../src/com/cloud/network/NetworkManagerImpl.java | 17 -----------------
1 file changed, 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4a1a2ff/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index b92ef4b..cae4e8a 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -1490,23 +1490,6 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
return configs;
}
}
- } else if (predefined != null && predefined.getCidr() != null && predefined.getBroadcastUri() == null && vpcId == null) {
- // don't allow to have 2 networks with the same cidr in the same zone for the account
- List<NetworkVO> configs = _networksDao.listBy(owner.getId(), plan.getDataCenterId(), predefined.getCidr(), true);
- if (configs.size() > 0) {
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Found existing network configuration for offering " + offering + ": " + configs.get(0));
- }
-
- if (errorIfAlreadySetup) {
- InvalidParameterValueException ex = new InvalidParameterValueException("Found existing network configuration (with specified id) for offering (with specified id)");
- ex.addProxyObject(offering.getUuid(), "offeringId");
- ex.addProxyObject(configs.get(0).getUuid(), "networkConfigId");
- throw ex;
- } else {
- return configs;
- }
- }
}
List<NetworkVO> networks = new ArrayList<NetworkVO>();
[21/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2350: Anti-Affinity - As admin user, when tryinto update the affinity group for a Vm that is deployed by a regular user , he is presented with admin's affinity groups.
Changes:
- listAffinityGroups API takes in accountname and domainId parameter
- For admin, listall=true should return all affinity groups of all users
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8c9f681f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8c9f681f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8c9f681f
Branch: refs/heads/disk_io_throttling
Commit: 8c9f681f9eba377d1eee279329090fbbdc46c5ab
Parents: ce17f85
Author: Prachi Damle <pr...@cloud.com>
Authored: Fri Jun 7 15:27:39 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Fri Jun 7 15:28:28 2013 -0700
----------------------------------------------------------------------
.../affinitygroup/ListAffinityGroupsCmd.java | 7 +++--
.../apache/cloudstack/query/QueryService.java | 3 +-
.../com/cloud/api/query/QueryManagerImpl.java | 33 +++++++++++---------
.../src/com/cloud/user/AccountManagerImpl.java | 4 +++
4 files changed, 29 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c9f681f/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
index 9310fb9..d966a4c 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
@@ -19,7 +19,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
import org.apache.cloudstack.affinity.AffinityGroupResponse;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.UserVmResponse;
@@ -28,7 +28,7 @@ import org.apache.log4j.Logger;
import com.cloud.async.AsyncJob;
@APICommand(name = "listAffinityGroups", description = "Lists affinity groups", responseObject = AffinityGroupResponse.class)
-public class ListAffinityGroupsCmd extends BaseListCmd {
+public class ListAffinityGroupsCmd extends BaseListAccountResourcesCmd {
public static final Logger s_logger = Logger.getLogger(ListAffinityGroupsCmd.class.getName());
private static final String s_name = "listaffinitygroupsresponse";
@@ -77,7 +77,8 @@ public class ListAffinityGroupsCmd extends BaseListCmd {
public void execute(){
ListResponse<AffinityGroupResponse> response = _queryService.listAffinityGroups(id, affinityGroupName,
- affinityGroupType, virtualMachineId, this.getStartIndex(), this.getPageSizeVal());
+ affinityGroupType, virtualMachineId, this.getAccountName(), this.getDomainId(), this.isRecursive(),
+ this.listAll(), this.getStartIndex(), this.getPageSizeVal());
response.setResponseName(getCommandName());
this.setResponseObject(response);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c9f681f/api/src/org/apache/cloudstack/query/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/query/QueryService.java b/api/src/org/apache/cloudstack/query/QueryService.java
index 2dfd97c..73e393b 100644
--- a/api/src/org/apache/cloudstack/query/QueryService.java
+++ b/api/src/org/apache/cloudstack/query/QueryService.java
@@ -86,7 +86,8 @@ public interface QueryService {
public ListResponse<ZoneResponse> listDataCenters(ListZonesByCmd cmd);
public ListResponse<AffinityGroupResponse> listAffinityGroups(Long affinityGroupId, String affinityGroupName,
- String affinityGroupType, Long vmId, Long startIndex, Long pageSize);
+ String affinityGroupType, Long vmId, String accountName, Long domainId, boolean isRecursive,
+ boolean listAll, Long startIndex, Long pageSize);
public List<ResourceDetailResponse> listResource(ListResourceDetailsCmd cmd);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c9f681f/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 28aecfc..beda75e 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2401,9 +2401,10 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
@Override
public ListResponse<AffinityGroupResponse> listAffinityGroups(Long affinityGroupId, String affinityGroupName,
- String affinityGroupType, Long vmId, Long startIndex, Long pageSize) {
+ String affinityGroupType, Long vmId, String accountName, Long domainId, boolean isRecursive,
+ boolean listAll, Long startIndex, Long pageSize) {
Pair<List<AffinityGroupJoinVO>, Integer> result = listAffinityGroupsInternal(affinityGroupId,
- affinityGroupName, affinityGroupType, vmId, startIndex, pageSize);
+ affinityGroupName, affinityGroupType, vmId, accountName, domainId, isRecursive, listAll, startIndex, pageSize);
ListResponse<AffinityGroupResponse> response = new ListResponse<AffinityGroupResponse>();
List<AffinityGroupResponse> agResponses = ViewResponseHelper.createAffinityGroupResponses(result.first());
response.setResponses(agResponses, result.second());
@@ -2412,12 +2413,12 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
public Pair<List<AffinityGroupJoinVO>, Integer> listAffinityGroupsInternal(Long affinityGroupId,
- String affinityGroupName, String affinityGroupType, Long vmId, Long startIndex, Long pageSize) {
+ String affinityGroupName, String affinityGroupType, Long vmId, String accountName, Long domainId,
+ boolean isRecursive, boolean listAll, Long startIndex, Long pageSize) {
Account caller = UserContext.current().getCaller();
Long accountId = caller.getAccountId();
- Long domainId = caller.getDomainId();
if (vmId != null) {
UserVmVO userVM = _userVmDao.findById(vmId);
@@ -2429,20 +2430,25 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
return listAffinityGroupsByVM(vmId.longValue(), startIndex, pageSize);
}
+ List<Long> permittedAccounts = new ArrayList<Long>();
+ Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject = new Ternary<Long, Boolean, ListProjectResourcesCriteria>(
+ domainId, isRecursive, null);
+ _accountMgr.buildACLSearchParameters(caller, affinityGroupId, accountName, null, permittedAccounts,
+ domainIdRecursiveListProject, listAll, true);
+ domainId = domainIdRecursiveListProject.first();
+ isRecursive = domainIdRecursiveListProject.second();
+ ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third();
+
Filter searchFilter = new Filter(AffinityGroupJoinVO.class, "id", true, startIndex, pageSize);
SearchBuilder<AffinityGroupJoinVO> groupSearch = _affinityGroupJoinDao.createSearchBuilder();
+ _accountMgr.buildACLViewSearchBuilder(groupSearch, domainId, isRecursive, permittedAccounts,
+ listProjectResourcesCriteria);
+
groupSearch.select(null, Func.DISTINCT, groupSearch.entity().getId()); // select
// distinct
SearchCriteria<AffinityGroupJoinVO> sc = groupSearch.create();
-
- if (accountId != null) {
- sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
- }
-
- if (domainId != null) {
- sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
- }
+ _accountMgr.buildACLViewSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);
if (affinityGroupId != null) {
sc.addAnd("id", SearchCriteria.Op.EQ, affinityGroupId);
@@ -2457,8 +2463,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
}
- Pair<List<AffinityGroupJoinVO>, Integer> uniqueGroupsPair = _affinityGroupJoinDao.searchAndCount(sc,
- searchFilter);
+ Pair<List<AffinityGroupJoinVO>, Integer> uniqueGroupsPair = _affinityGroupJoinDao.searchAndCount(sc, searchFilter);
// search group details by ids
Integer count = uniqueGroupsPair.second();
if (count.intValue() == 0) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c9f681f/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index 0d89639..6b4bf0e 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -2208,6 +2208,10 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
domainIdRecursiveListProject.second(true);
}
}
+ } else if (domainId != null) {
+ if (caller.getType() == Account.ACCOUNT_TYPE_NORMAL) {
+ permittedAccounts.add(caller.getId());
+ }
}
}
[15/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-869:Netscaler support as an external LB provider
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5233e321
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5233e321
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5233e321
Branch: refs/heads/disk_io_throttling
Commit: 5233e3216b11e69c7c7e051f0a6c3d0c6bf98803
Parents: bcc5baa
Author: Pranav Saxena <pr...@citrix.com>
Authored: Fri Jun 7 16:53:32 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Fri Jun 7 16:53:32 2013 +0530
----------------------------------------------------------------------
ui/scripts/network.js | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5233e321/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index a3e239b..9e60cbc 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4536,20 +4536,29 @@
loadbalancer:{ //Support for Netscaler as an external device for load balancing
label:'Load Balancer',
select:function(args){
+ $.ajax({
+ url:createURL('listVPCOfferings&listall=true'),
+ dataType:'json',
+ success:function(json){
+ var items=[];
+ var vpcObj = json.listvpcofferingsresponse.vpcoffering;
+ $(vpcObj).each(function(){
+ items.push({id:this.id , description:this.name});
+ });
+ args.response.success({data:items});
- var items = [];
- items.push({id:'vpcvirtualrouter' , description:'VPC Virtual Router'});
- items.push({id:'netscaler' , description:'NetScaler'});
+ }
- args.response.success({data:items});
- }
+ });
+
+ }
}
}
},
action: function(args) {
- var defaultvpcofferingid;
+ /* var defaultvpcofferingid;
$.ajax({
url: createURL("listVPCOfferings"),
dataType: "json",
@@ -4560,14 +4569,14 @@
success: function(json) {
defaultvpcofferingid = json.listvpcofferingsresponse.vpcoffering[0].id;
}
- });
+ });*/
var dataObj = {
name: args.data.name,
displaytext: args.data.displaytext,
zoneid: args.data.zoneid,
cidr: args.data.cidr,
- vpcofferingid: defaultvpcofferingid
+ vpcofferingid: args.data.loadbalancer // Support for external load balancer
};
if(args.data.networkdomain != null && args.data.networkdomain.length > 0)
[47/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Test should find Routing hosts not specific hypervisor_type
Bug in listing hosts that can be used for deploying VMs. Use Routing
hosts to identify hosts regardless of hypervisor_type.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3f3c6aa3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3f3c6aa3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3f3c6aa3
Branch: refs/heads/disk_io_throttling
Commit: 3f3c6aa35f64c4129c203d54840524e6aa2c4621
Parents: ef0e0f3
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 21:05:33 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 21:05:33 2013 +0530
----------------------------------------------------------------------
.../smoke/test_deploy_vms_with_varied_deploymentplanners.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3f3c6aa3/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
index f1b3043..af83299 100644
--- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
+++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
@@ -76,7 +76,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
domainid=cls.domain.id
)
cls.services["account"] = cls.account.name
- cls.hosts = Host.list(cls.apiclient, hypervisortype='Simulator')
+ cls.hosts = Host.list(cls.apiclient, type='Routing')
cls.cleanup = [
cls.account
]
[37/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2923: Delete Secondary storage of a Zone was giving NPE bcz we were still refering to the object. Instead log that the cpvm and ssvm cant be created bcz sec storage is not available
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d8a235ee
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d8a235ee
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d8a235ee
Branch: refs/heads/disk_io_throttling
Commit: d8a235ee316af7d9b21ea62581c8b5c8925081d8
Parents: 63494f8
Author: Nitin Mehta <ni...@citrix.com>
Authored: Fri Nov 23 14:11:51 2012 +0530
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Mon Jun 10 16:48:50 2013 +0530
----------------------------------------------------------------------
.../src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8a235ee/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
index 421e53f..7362cf1 100755
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -945,6 +945,13 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
VMTemplateVO template = _templateDao.findSystemVMTemplate(dataCenterId);
HostVO secondaryStorageHost = this.templateMgr.getSecondaryStorageHost(dataCenterId);
boolean templateReady = false;
+
+ if (secondaryStorageHost == null) {
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("No secondary storage available in zone " + dataCenterId + ", wait until it is ready to launch secondary storage vm");
+ }
+ return false;
+ }
if (template != null && secondaryStorageHost != null) {
VMTemplateHostVO templateHostRef = _vmTemplateHostDao.findByHostTemplate(secondaryStorageHost.getId(), template.getId());
[20/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2811: Default add primary storage dialog to scope=cluster
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ce17f856
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ce17f856
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ce17f856
Branch: refs/heads/disk_io_throttling
Commit: ce17f856eacce32e09b43dd955d5e2da2a678766
Parents: da5c461
Author: Brian Federle <br...@citrix.com>
Authored: Fri Jun 7 11:05:01 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Fri Jun 7 11:05:01 2013 -0700
----------------------------------------------------------------------
ui/scripts/system.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce17f856/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index e3d7b41..f853ed5 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -11425,8 +11425,8 @@
label: 'label.scope',
select: function(args) {
var scope = [
- { id: 'zone', description: _l('label.zone.wide') },
- { id: 'cluster', description: _l('label.cluster') }
+ { id: 'cluster', description: _l('label.cluster') },
+ { id: 'zone', description: _l('label.zone.wide') }
// { id: 'host', description: _l('label.host') }
];
[36/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
rename the test methods to be more pythonic :)
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/63494f8d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/63494f8d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/63494f8d
Branch: refs/heads/disk_io_throttling
Commit: 63494f8dfd1f1633170262b1c8e14efce5bc3bb2
Parents: 03e283c
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 16:37:41 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 16:37:41 2013 +0530
----------------------------------------------------------------------
.../component/test_vpc_network_pfrules.py | 487 +++++++++----------
1 file changed, 237 insertions(+), 250 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63494f8d/test/integration/component/test_vpc_network_pfrules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network_pfrules.py b/test/integration/component/test_vpc_network_pfrules.py
index c0c2b86..92b04ad 100644
--- a/test/integration/component/test_vpc_network_pfrules.py
+++ b/test/integration/component/test_vpc_network_pfrules.py
@@ -44,138 +44,139 @@ from marvin.integration.lib.common import (get_domain,
class Services:
"""Test VPC network services - Port Forwarding Rules Test Data Class.
"""
+
def __init__(self):
self.services = {
- "account": {
- "email": "test@test.com",
- "firstname": "Test",
- "lastname": "User",
- "username": "test",
- # Random characters are appended for unique
- # username
- "password": "password",
- },
- "host1":None,
- "host2":None,
- "service_offering": {
- "name": "Tiny Instance",
- "displaytext": "Tiny Instance",
- "cpunumber": 1,
- "cpuspeed": 1000,
- "memory": 512,
- },
- "network_offering": {
- "name": 'VPC Network offering',
- "displaytext": 'VPC Network off',
- "guestiptype": 'Isolated',
- "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "serviceProviderList": {
- "Vpn": 'VpcVirtualRouter',
- "Dhcp": 'VpcVirtualRouter',
- "Dns": 'VpcVirtualRouter',
- "SourceNat": 'VpcVirtualRouter',
- "PortForwarding": 'VpcVirtualRouter',
- "Lb": 'VpcVirtualRouter',
- "UserData": 'VpcVirtualRouter',
- "StaticNat": 'VpcVirtualRouter',
- "NetworkACL": 'VpcVirtualRouter'
- },
- "servicecapabilitylist": {
- },
- },
- "network_offering_no_lb": {
- "name": 'VPC Network offering',
- "displaytext": 'VPC Network off',
- "guestiptype": 'Isolated',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "serviceProviderList": {
- "Dhcp": 'VpcVirtualRouter',
- "Dns": 'VpcVirtualRouter',
- "SourceNat": 'VpcVirtualRouter',
- "PortForwarding": 'VpcVirtualRouter',
- "UserData": 'VpcVirtualRouter',
- "StaticNat": 'VpcVirtualRouter',
- "NetworkACL": 'VpcVirtualRouter'
- },
- },
- "vpc_offering": {
- "name": 'VPC off',
- "displaytext": 'VPC off',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat',
- },
- "vpc": {
- "name": "TestVPC",
- "displaytext": "TestVPC",
- "cidr": '10.0.0.1/24'
- },
- "network": {
- "name": "Test Network",
- "displaytext": "Test Network",
- "netmask": '255.255.255.0'
- },
- "lbrule": {
- "name": "SSH",
- "alg": "leastconn",
- # Algorithm used for load balancing
- "privateport": 22,
- "publicport": 2222,
- "openfirewall": False,
- "startport": 22,
- "endport": 2222,
- "protocol": "TCP",
- "cidrlist": '0.0.0.0/0',
- },
- "lbrule_http": {
- "name": "HTTP",
- "alg": "leastconn",
- # Algorithm used for load balancing
- "privateport": 80,
- "publicport": 8888,
- "openfirewall": False,
- "startport": 80,
- "endport": 8888,
- "protocol": "TCP",
- "cidrlist": '0.0.0.0/0',
- },
- "natrule": {
- "privateport": 22,
- "publicport": 22,
- "startport": 22,
- "endport": 22,
- "protocol": "TCP",
- "cidrlist": '0.0.0.0/0',
- },
- "http_rule": {
- "privateport": 80,
- "publicport": 80,
- "startport": 80,
- "endport": 80,
- "cidrlist": '0.0.0.0/0',
- "protocol": "TCP"
- },
- "virtual_machine": {
- "displayname": "Test VM",
- "username": "root",
- "password": "password",
- "ssh_port": 22,
- "hypervisor": 'XenServer',
- # Hypervisor type should be same as
- # hypervisor type of cluster
- "privateport": 22,
- "publicport": 22,
- "protocol": 'TCP',
- },
- "ostype": 'CentOS 5.3 (64-bit)',
- "sleep": 60,
- "timeout": 10,
- "mode": 'advanced'
- }
+ "account": {
+ "email": "test@test.com",
+ "firstname": "Test",
+ "lastname": "User",
+ "username": "test",
+ # Random characters are appended for unique
+ # username
+ "password": "password",
+ },
+ "host1": None,
+ "host2": None,
+ "service_offering": {
+ "name": "Tiny Instance",
+ "displaytext": "Tiny Instance",
+ "cpunumber": 1,
+ "cpuspeed": 1000,
+ "memory": 512,
+ },
+ "network_offering": {
+ "name": 'VPC Network offering',
+ "displaytext": 'VPC Network off',
+ "guestiptype": 'Isolated',
+ "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "serviceProviderList": {
+ "Vpn": 'VpcVirtualRouter',
+ "Dhcp": 'VpcVirtualRouter',
+ "Dns": 'VpcVirtualRouter',
+ "SourceNat": 'VpcVirtualRouter',
+ "PortForwarding": 'VpcVirtualRouter',
+ "Lb": 'VpcVirtualRouter',
+ "UserData": 'VpcVirtualRouter',
+ "StaticNat": 'VpcVirtualRouter',
+ "NetworkACL": 'VpcVirtualRouter'
+ },
+ "servicecapabilitylist": {
+ },
+ },
+ "network_offering_no_lb": {
+ "name": 'VPC Network offering',
+ "displaytext": 'VPC Network off',
+ "guestiptype": 'Isolated',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "serviceProviderList": {
+ "Dhcp": 'VpcVirtualRouter',
+ "Dns": 'VpcVirtualRouter',
+ "SourceNat": 'VpcVirtualRouter',
+ "PortForwarding": 'VpcVirtualRouter',
+ "UserData": 'VpcVirtualRouter',
+ "StaticNat": 'VpcVirtualRouter',
+ "NetworkACL": 'VpcVirtualRouter'
+ },
+ },
+ "vpc_offering": {
+ "name": 'VPC off',
+ "displaytext": 'VPC off',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat',
+ },
+ "vpc": {
+ "name": "TestVPC",
+ "displaytext": "TestVPC",
+ "cidr": '10.0.0.1/24'
+ },
+ "network": {
+ "name": "Test Network",
+ "displaytext": "Test Network",
+ "netmask": '255.255.255.0'
+ },
+ "lbrule": {
+ "name": "SSH",
+ "alg": "leastconn",
+ # Algorithm used for load balancing
+ "privateport": 22,
+ "publicport": 2222,
+ "openfirewall": False,
+ "startport": 22,
+ "endport": 2222,
+ "protocol": "TCP",
+ "cidrlist": '0.0.0.0/0',
+ },
+ "lbrule_http": {
+ "name": "HTTP",
+ "alg": "leastconn",
+ # Algorithm used for load balancing
+ "privateport": 80,
+ "publicport": 8888,
+ "openfirewall": False,
+ "startport": 80,
+ "endport": 8888,
+ "protocol": "TCP",
+ "cidrlist": '0.0.0.0/0',
+ },
+ "natrule": {
+ "privateport": 22,
+ "publicport": 22,
+ "startport": 22,
+ "endport": 22,
+ "protocol": "TCP",
+ "cidrlist": '0.0.0.0/0',
+ },
+ "http_rule": {
+ "privateport": 80,
+ "publicport": 80,
+ "startport": 80,
+ "endport": 80,
+ "cidrlist": '0.0.0.0/0',
+ "protocol": "TCP"
+ },
+ "virtual_machine": {
+ "displayname": "Test VM",
+ "username": "root",
+ "password": "password",
+ "ssh_port": 22,
+ "hypervisor": 'XenServer',
+ # Hypervisor type should be same as
+ # hypervisor type of cluster
+ "privateport": 22,
+ "publicport": 22,
+ "protocol": 'TCP',
+ },
+ "ostype": 'CentOS 5.3 (64-bit)',
+ "sleep": 60,
+ "timeout": 10,
+ "mode": 'advanced'
+ }
class TestVPCNetworkPFRules(cloudstackTestCase):
@@ -251,15 +252,12 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
try:
#Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self._cleanup)
- wait_for_cleanup(self.apiclient, [
- "network.gc.interval",
- "network.gc.wait"])
except Exception as e:
self.debug("Warning: Exception during cleanup : %s" % e)
#raise Exception("Warning: Exception during cleanup : %s" % e)
return
- def get_Router_For_VPC(self):
+ def get_vpcrouter(self):
routers = list_routers(self.apiclient,
account=self.account.name,
domainid=self.account.domainid,
@@ -276,8 +274,8 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
return router
- def stop_VPC_VRouter(self):
- router = self.get_Router_For_VPC()
+ def stop_vpcrouter(self):
+ router = self.get_vpcrouter()
self.debug("Stopping router ID: %s" % router.id)
cmd = stopRouter.stopRouterCmd()
cmd.id = router.id
@@ -298,7 +296,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
)
return router
- def start_VPC_VRouter(self, router):
+ def start_vpcrouter(self, router):
# Start the VPC Router
cmd = startRouter.startRouterCmd()
cmd.id = router.id
@@ -348,7 +346,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
else:
self.debug("Failed to wget from VM=%s http server on public_ip=%s" % (vm.name, public_ip.ipaddress.ipaddress))
- def create_StaticNatRule_For_VM(self, vm, public_ip, network):
+ def create_staticnat(self, vm, public_ip, network):
self.debug("Enabling static NAT for IP: %s" %
public_ip.ipaddress.ipaddress)
try:
@@ -364,7 +362,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
self.fail("Failed to enable static NAT on IP: %s - %s" % (
public_ip.ipaddress.ipaddress, e))
- def create_NatRule_For_VM(self, vm, public_ip, network, services=None):
+ def create_natrule(self, vm, public_ip, network, services=None):
self.debug("Creatinng NAT rule in network for vm with public IP")
if not services:
services = self.services["natrule"]
@@ -386,7 +384,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
self.debug('nwacl_nat=%s' % nwacl_nat.__dict__)
return nat_rule
- def acquire_Public_IP(self, network):
+ def acquire_publicip(self, network):
self.debug("Associating public IP for network: %s" % network.name)
public_ip = PublicIPAddress.create(self.apiclient,
accountid=self.account.name,
@@ -400,7 +398,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
))
return public_ip
- def create_VPC(self, cidr='10.1.2.1/16'):
+ def create_vpc(self, cidr='10.1.2.1/16'):
self.debug("Creating a VPC offering..")
self.services["vpc_offering"]["name"] = self.services["vpc_offering"]["name"] + str(cidr)
vpc_off = VpcOffering.create(
@@ -424,7 +422,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
)
return vpc
- def create_Network(self, net_offerring, gateway='10.1.1.1',vpc=None):
+ def create_network(self, net_offerring, gateway='10.1.1.1',vpc=None):
try:
self.debug('Create NetworkOffering')
net_offerring["name"] = "NET_OFF-" + str(gateway)
@@ -453,7 +451,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
except:
self.fail('Unable to create a Network with offering=%s' % net_offerring)
- def create_VM_in_Network(self, network, host_id=None):
+ def deployvm_in_network(self, network, host_id=None):
try:
self.debug('Creating VM in network=%s' % network.name)
vm = VirtualMachine.create(
@@ -471,7 +469,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
except:
self.fail('Unable to create VM in a Network=%s' % network.name)
- def create_LB_Rule(self, public_ip, network, vmarray, services=None):
+ def create_lbrule(self, public_ip, network, vmarray, services=None):
self.debug("Creating LB rule for IP address: %s" %
public_ip.ipaddress.ipaddress)
objservices = None
@@ -493,7 +491,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
lb_rule.assign(self.apiclient, vmarray)
return lb_rule
- def create_egress_Internet_Rule(self, network):
+ def open_egress_to_world(self, network):
self.debug("Adding Egress rules to network %s and %s to allow access to internet" % (network.name,self.services["http_rule"]))
nwacl_internet_1 = NetworkACL.create(
self.apiclient,
@@ -507,8 +505,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
@attr(tags=["advanced", "intervlan"])
def test_01_network_services_VPC_StopCreatePF(self):
- """ Test case no 204 : Create PF rules for a single virtual network of a VPC,
- using a new Public IP Address available with the VPC when Virtual Router is in Stopped State
+ """ Test : Create VPC PF rules on acquired public ip when VpcVirtualRouter is stopped
"""
# Validate the following
@@ -521,20 +518,19 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 7. Start VPC Virtual Router.
# 8. Successfully ssh into the Guest VM using the PF rule
- network_1 = self.create_Network(self.services["network_offering"])
- vm_1 = self.create_VM_in_Network(network_1)
- public_ip_1 = self.acquire_Public_IP(network_1)
- router = self.stop_VPC_VRouter()
- self.create_NatRule_For_VM( vm_1, public_ip_1, network_1)
- self.start_VPC_VRouter(router)
+ network_1 = self.create_network(self.services["network_offering"])
+ vm_1 = self.deployvm_in_network(network_1)
+ public_ip_1 = self.acquire_publicip(network_1)
+ router = self.stop_vpcrouter()
+ self.create_natrule( vm_1, public_ip_1, network_1)
+ self.start_vpcrouter(router)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
return
@attr(tags=["advanced", "intervlan"])
def test_02_network_services_VPC_CreatePF(self):
- """ Test case no 190 : Create PF rules for a single virtual network of a VPC using a
- new Public IP Address available with the VPC when Virtual Router is in Running State
+ """ Test Create VPC PF rules on acquired public ip when VpcVirtualRouter is Running
"""
# Validate the following
@@ -545,17 +541,16 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 5. Use the Create PF rule for vm in network1.
# 6. Successfully ssh into the Guest VM using the PF rule
- network_1 = self.create_Network(self.services["network_offering"])
- vm_1 = self.create_VM_in_Network(network_1)
- public_ip_1 = self.acquire_Public_IP(network_1)
- self.create_NatRule_For_VM( vm_1, public_ip_1, network_1)
+ network_1 = self.create_network(self.services["network_offering"])
+ vm_1 = self.deployvm_in_network(network_1)
+ public_ip_1 = self.acquire_publicip(network_1)
+ self.create_natrule( vm_1, public_ip_1, network_1)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
return
@attr(tags=["advanced", "intervlan"])
def test_03_network_services_VPC_StopCreateMultiplePF(self):
- """ Test case no 205 : Create PF rules for a two/multiple virtual networks of a VPC using
- a new Public IP Address available with the VPC when Virtual Router is in Stopped State
+ """ Test Create multiple VPC PF rules on acquired public ip in diff't networks when VpcVirtualRouter is stopped
"""
# Validate the following
@@ -571,24 +566,23 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 10. Start VPC Virtual Router.
# 11. Successfully ssh into the Guest VM1 and VM2 using the PF rule
- network_1 = self.create_Network(self.services["network_offering_no_lb"])
- network_2 = self.create_Network(self.services["network_offering_no_lb"], '10.1.2.1')
- vm_1 = self.create_VM_in_Network(network_1)
- vm_2 = self.create_VM_in_Network(network_2)
- public_ip_1 = self.acquire_Public_IP(network_1)
- public_ip_2 = self.acquire_Public_IP(network_2)
- router = self.stop_VPC_VRouter()
- self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- self.create_NatRule_For_VM(vm_2, public_ip_2, network_2)
- self.start_VPC_VRouter(router)
+ network_1 = self.create_network(self.services["network_offering_no_lb"])
+ network_2 = self.create_network(self.services["network_offering_no_lb"], '10.1.2.1')
+ vm_1 = self.deployvm_in_network(network_1)
+ vm_2 = self.deployvm_in_network(network_2)
+ public_ip_1 = self.acquire_publicip(network_1)
+ public_ip_2 = self.acquire_publicip(network_2)
+ router = self.stop_vpcrouter()
+ self.create_natrule(vm_1, public_ip_1, network_1)
+ self.create_natrule(vm_2, public_ip_2, network_2)
+ self.start_vpcrouter(router)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_ssh_into_vm(vm_2, public_ip_2, testnegative=False)
return
@attr(tags=["advanced", "intervlan"])
def test_04_network_services_VPC_CreateMultiplePF(self):
- """ Test case no 191 : Create PF rules for a two/multiple virtual networks of a VPC using a
- new Public IP Address available with the VPC when Virtual Router is in Running State
+ """ Test Create multiple VPC PF rules on acquired public ip in diff't networks when VpcVirtualRouter is running
"""
# Validate the following
@@ -603,24 +597,23 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 9. Start VPC Virtual Router.
# 10. Successfully ssh into the Guest VM1 and VM2 using the PF rule
- network_1 = self.create_Network(self.services["network_offering"])
- network_2 = self.create_Network(self.services["network_offering_no_lb"], '10.1.2.1')
- vm_1 = self.create_VM_in_Network(network_1)
- vm_2 = self.create_VM_in_Network(network_2)
- public_ip_1 = self.acquire_Public_IP(network_1)
- public_ip_2 = self.acquire_Public_IP(network_2)
- router = self.stop_VPC_VRouter()
- self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- self.create_NatRule_For_VM(vm_2, public_ip_2, network_2)
- self.start_VPC_VRouter(router)
+ network_1 = self.create_network(self.services["network_offering"])
+ network_2 = self.create_network(self.services["network_offering_no_lb"], '10.1.2.1')
+ vm_1 = self.deployvm_in_network(network_1)
+ vm_2 = self.deployvm_in_network(network_2)
+ public_ip_1 = self.acquire_publicip(network_1)
+ public_ip_2 = self.acquire_publicip(network_2)
+ router = self.stop_vpcrouter()
+ self.create_natrule(vm_1, public_ip_1, network_1)
+ self.create_natrule(vm_2, public_ip_2, network_2)
+ self.start_vpcrouter(router)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_ssh_into_vm(vm_2, public_ip_2, testnegative=False)
return
@attr(tags=["advanced", "intervlan"])
def test_05_network_services_VPC_StopDeletePF(self):
- """ Test case no 207 : Delete few(not all) PF rules for a single virtual network of
- a VPC belonging to a single Public IP Address when Virtual Router is in Stopped State
+ """ Test delete a PF rule in VPC when VpcVirtualRouter is Stopped
"""
# Validate the following
@@ -636,24 +629,23 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 10. Start VPC Virtual Router.
# 11. wget a file present on http server of VM1 should fail
- network_1 = self.create_Network(self.services["network_offering"])
- vm_1 = self.create_VM_in_Network(network_1)
- public_ip_1 = self.acquire_Public_IP(network_1)
- self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- http_rule = self.create_NatRule_For_VM(vm_1, public_ip_1, network_1, self.services["http_rule"])
+ network_1 = self.create_network(self.services["network_offering"])
+ vm_1 = self.deployvm_in_network(network_1)
+ public_ip_1 = self.acquire_publicip(network_1)
+ self.create_natrule(vm_1, public_ip_1, network_1)
+ http_rule = self.create_natrule(vm_1, public_ip_1, network_1, self.services["http_rule"])
#http_rule = self.create_egress_Internet_Rule(network_1)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_wget_from_vm(vm_1, public_ip_1, testnegative=False)
- router = self.stop_VPC_VRouter()
+ router = self.stop_vpcrouter()
http_rule.delete()
- self.start_VPC_VRouter(router)
+ self.start_vpcrouter(router)
self.check_wget_from_vm(vm_1, public_ip_1, testnegative=True)
return
@attr(tags=["advanced", "intervlan"])
def test_06_network_services_VPC_DeletePF(self):
- """ Test case no 193 : Delete few(not all) PF rules for a single virtual network of
- a VPC belonging to a single Public IP Address when Virtual Router is in Running State
+ """ Test delete a PF rule in VPC when VpcVirtualRouter is Running
"""
# Validate the following
@@ -667,11 +659,11 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 9. Delete internet PF rule
# 10. wget a file present on http server of VM1 should fail
- network_1 = self.create_Network(self.services["network_offering"])
- vm_1 = self.create_VM_in_Network(network_1)
- public_ip_1 = self.acquire_Public_IP(network_1)
- self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- http_rule=self.create_NatRule_For_VM(vm_1, public_ip_1, network_1, self.services["http_rule"])
+ network_1 = self.create_network(self.services["network_offering"])
+ vm_1 = self.deployvm_in_network(network_1)
+ public_ip_1 = self.acquire_publicip(network_1)
+ self.create_natrule(vm_1, public_ip_1, network_1)
+ http_rule=self.create_natrule(vm_1, public_ip_1, network_1, self.services["http_rule"])
#http_rule = self.create_egress_Internet_Rule(network_1)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_wget_from_vm(vm_1, public_ip_1, testnegative=False)
@@ -681,8 +673,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
@attr(tags=["advanced", "intervlan"])
def test_07_network_services_VPC_StopDeleteAllPF(self):
- """ Test case no 208 : Delete all PF rules for a single virtual network of a
- VPC belonging to a single Public IP Address when Virtual Router is in Stopped State
+ """ Test delete all PF rules in VPC when VpcVirtualRouter is Stopped
"""
# Validate the following
@@ -699,26 +690,25 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 11. wget a file present on http server of VM1 should fail
# 12. ssh into Guest VM using the PF rule should fail
- network_1 = self.create_Network(self.services["network_offering"])
- vm_1 = self.create_VM_in_Network(network_1)
- public_ip_1 = self.acquire_Public_IP(network_1)
- nat_rule = self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- http_rule = self.create_NatRule_For_VM(vm_1, public_ip_1, network_1, self.services["http_rule"])
+ network_1 = self.create_network(self.services["network_offering"])
+ vm_1 = self.deployvm_in_network(network_1)
+ public_ip_1 = self.acquire_publicip(network_1)
+ nat_rule = self.create_natrule(vm_1, public_ip_1, network_1)
+ http_rule = self.create_natrule(vm_1, public_ip_1, network_1, self.services["http_rule"])
#http_rule = self.create_egress_Internet_Rule(network_1)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_wget_from_vm(vm_1, public_ip_1, testnegative=False)
- router = self.stop_VPC_VRouter()
+ router = self.stop_vpcrouter()
http_rule.delete()
nat_rule.delete()
- self.start_VPC_VRouter(router)
+ self.start_vpcrouter(router)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=True)
self.check_wget_from_vm(vm_1, public_ip_1, testnegative=True)
return
@attr(tags=["advanced", "intervlan"])
def test_08_network_services_VPC_DeleteAllPF(self):
- """ Test case no 194 : Delete all PF rules for a single virtual network of a
- VPC belonging to a single Public IP Address when Virtual Router is in Running State
+ """ Test delete all PF rules in VPC when VpcVirtualRouter is Running
"""
# Validate the following
@@ -733,11 +723,11 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 9. wget a file present on http server of VM1 should fail
# 10. ssh into Guest VM using the PF rule should fail
- network_1 = self.create_Network(self.services["network_offering"])
- vm_1 = self.create_VM_in_Network(network_1)
- public_ip_1 = self.acquire_Public_IP(network_1)
- nat_rule = self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- http_rule = self.create_NatRule_For_VM(vm_1, public_ip_1, network_1, self.services["http_rule"])
+ network_1 = self.create_network(self.services["network_offering"])
+ vm_1 = self.deployvm_in_network(network_1)
+ public_ip_1 = self.acquire_publicip(network_1)
+ nat_rule = self.create_natrule(vm_1, public_ip_1, network_1)
+ http_rule = self.create_natrule(vm_1, public_ip_1, network_1, self.services["http_rule"])
#http_rule = self.create_egress_Internet_Rule(network_1)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_wget_from_vm(vm_1, public_ip_1, testnegative=False)
@@ -749,8 +739,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
@attr(tags=["advanced", "intervlan"])
def test_09_network_services_VPC_StopDeleteAllMultiplePF(self):
- """ Test case no 209 : Delete all PF rules for two/multiple virtual networks of a VPC.
- Observe the status of the Public IP Addresses of the rules when Virtual Router is in Stopped State
+ """ Test delete all PF rules in VPC across multiple networks when VpcVirtualRouter is Stopped
"""
# Validate the following
@@ -769,20 +758,20 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 12. Start VPC Virtual Router.
# 13. Fail to ssh and http to vm1, vm2, vm3 and vm4.
- network_1 = self.create_Network(self.services["network_offering"])
- network_2 = self.create_Network(self.services["network_offering_no_lb"], '10.1.2.1')
- vm_1 = self.create_VM_in_Network(network_1)
- vm_2 = self.create_VM_in_Network(network_1)
- vm_3 = self.create_VM_in_Network(network_2)
- vm_4 = self.create_VM_in_Network(network_2)
- public_ip_1 = self.acquire_Public_IP(network_1)
- public_ip_2 = self.acquire_Public_IP(network_1)
- nat_rule1 = self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- nat_rule2 = self.create_NatRule_For_VM(vm_2, public_ip_2, network_1)
- http_rule1 = self.create_egress_Internet_Rule(network_1)
- nat_rule3 = self.create_NatRule_For_VM(vm_3, public_ip_1, network_2)
- nat_rule4 = self.create_NatRule_For_VM(vm_4, public_ip_2, network_2)
- http_rule2 = self.create_egress_Internet_Rule(network_2)
+ network_1 = self.create_network(self.services["network_offering"])
+ network_2 = self.create_network(self.services["network_offering_no_lb"], '10.1.2.1')
+ vm_1 = self.deployvm_in_network(network_1)
+ vm_2 = self.deployvm_in_network(network_1)
+ vm_3 = self.deployvm_in_network(network_2)
+ vm_4 = self.deployvm_in_network(network_2)
+ public_ip_1 = self.acquire_publicip(network_1)
+ public_ip_2 = self.acquire_publicip(network_1)
+ nat_rule1 = self.create_natrule(vm_1, public_ip_1, network_1)
+ nat_rule2 = self.create_natrule(vm_2, public_ip_2, network_1)
+ http_rule1 = self.open_egress_to_world(network_1)
+ nat_rule3 = self.create_natrule(vm_3, public_ip_1, network_2)
+ nat_rule4 = self.create_natrule(vm_4, public_ip_2, network_2)
+ http_rule2 = self.open_egress_to_world(network_2)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_ssh_into_vm(vm_2, public_ip_2, testnegative=False)
self.check_ssh_into_vm(vm_3, public_ip_1, testnegative=False)
@@ -791,14 +780,14 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
self.check_wget_from_vm(vm_2, public_ip_2, testnegative=False)
self.check_wget_from_vm(vm_3, public_ip_1, testnegative=False)
self.check_wget_from_vm(vm_4, public_ip_2, testnegative=False)
- router = self.stop_VPC_VRouter()
+ router = self.stop_vpcrouter()
nat_rule1.delete()
nat_rule2.delete()
nat_rule3.delete()
nat_rule4.delete()
http_rule1.delete()
http_rule2.delete()
- self.start_VPC_VRouter(router)
+ self.start_vpcrouter(router)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=True)
self.check_ssh_into_vm(vm_2, public_ip_2, testnegative=True)
self.check_ssh_into_vm(vm_3, public_ip_1, testnegative=True)
@@ -811,10 +800,8 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
@attr(tags=["advanced", "intervlan"])
def test_10_network_services_VPC_DeleteAllMultiplePF(self):
- """ Test case no 195: Delete all PF rules for two/multiple virtual networks of a VPC.
- Observe the status of the Public IP Addresses of the rules when Virtual Router is in Running State
+ """ Test delete all PF rules in VPC across multiple networks when VpcVirtualRouter is Running
"""
-
# Validate the following
# 1. Create a VPC with cidr - 10.1.1.1/16.
# 2. Create a Network offering - NO1 with all supported services.
@@ -829,20 +816,20 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
# 12. Delete all PF rultes for vm1, vm2, vm3 and vm4.
# 13. Fail to ssh and http to vm1, vm2, vm3 and vm4.
- network_1 = self.create_Network(self.services["network_offering"])
- network_2 = self.create_Network(self.services["network_offering_no_lb"], '10.1.2.1')
- vm_1 = self.create_VM_in_Network(network_1)
- vm_2 = self.create_VM_in_Network(network_1)
- vm_3 = self.create_VM_in_Network(network_2)
- vm_4 = self.create_VM_in_Network(network_2)
- public_ip_1 = self.acquire_Public_IP(network_1)
- public_ip_2 = self.acquire_Public_IP(network_1)
- nat_rule1 = self.create_NatRule_For_VM(vm_1, public_ip_1, network_1)
- nat_rule2 = self.create_NatRule_For_VM(vm_2, public_ip_2, network_1)
- http_rule1 = self.create_egress_Internet_Rule(network_1)
- nat_rule3 = self.create_NatRule_For_VM(vm_3, public_ip_1, network_2)
- nat_rule4 = self.create_NatRule_For_VM(vm_4, public_ip_2, network_2)
- http_rule2 = self.create_egress_Internet_Rule(network_2)
+ network_1 = self.create_network(self.services["network_offering"])
+ network_2 = self.create_network(self.services["network_offering_no_lb"], '10.1.2.1')
+ vm_1 = self.deployvm_in_network(network_1)
+ vm_2 = self.deployvm_in_network(network_1)
+ vm_3 = self.deployvm_in_network(network_2)
+ vm_4 = self.deployvm_in_network(network_2)
+ public_ip_1 = self.acquire_publicip(network_1)
+ public_ip_2 = self.acquire_publicip(network_1)
+ nat_rule1 = self.create_natrule(vm_1, public_ip_1, network_1)
+ nat_rule2 = self.create_natrule(vm_2, public_ip_2, network_1)
+ http_rule1 = self.open_egress_to_world(network_1)
+ nat_rule3 = self.create_natrule(vm_3, public_ip_1, network_2)
+ nat_rule4 = self.create_natrule(vm_4, public_ip_2, network_2)
+ http_rule2 = self.open_egress_to_world(network_2)
self.check_ssh_into_vm(vm_1, public_ip_1, testnegative=False)
self.check_ssh_into_vm(vm_2, public_ip_2, testnegative=False)
self.check_ssh_into_vm(vm_3, public_ip_1, testnegative=False)
[25/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Unskip all skipped tests
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8bc72ad5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8bc72ad5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8bc72ad5
Branch: refs/heads/disk_io_throttling
Commit: 8bc72ad55c76635939f463185291b0c283b57858
Parents: 91edeb4
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Sat Jun 8 20:22:16 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 10:04:52 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_accounts.py | 4 ----
test/integration/component/test_egress_rules.py | 1 -
test/integration/component/test_eip_elb.py | 6 ------
test/integration/component/test_netscaler_lb.py | 1 -
test/integration/component/test_network_offering.py | 1 -
test/integration/component/test_project_configs.py | 2 --
test/integration/component/test_project_limits.py | 1 -
test/integration/component/test_projects.py | 1 -
test/integration/component/test_tags.py | 2 --
test/integration/component/test_templates.py | 1 -
test/integration/component/test_vm_passwdenabled.py | 1 -
test/integration/component/test_vpc.py | 1 -
test/integration/component/test_vpc_network.py | 4 ----
test/integration/component/test_vpc_offerings.py | 2 --
test/integration/component/test_vpc_routers.py | 4 ----
test/integration/component/test_vpc_vm_life_cycle.py | 9 ---------
test/integration/component/test_vpc_vms_deployment.py | 1 -
17 files changed, 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py
index a25e636..3f106c3 100644
--- a/test/integration/component/test_accounts.py
+++ b/test/integration/component/test_accounts.py
@@ -385,7 +385,6 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
)
return
- @unittest.skip("Open Questions")
@attr(tags=["advanced", "basic", "eip", "advancedns", "sg"])
def test_02_remove_all_users(self):
"""Test Remove both users from the account
@@ -712,7 +711,6 @@ class TestServiceOfferingSiblings(cloudstackTestCase):
return
-@unittest.skip("Open Questions")
class TestServiceOfferingHierarchy(cloudstackTestCase):
@classmethod
@@ -841,7 +839,6 @@ class TestServiceOfferingHierarchy(cloudstackTestCase):
return
-@unittest.skip("Open Questions")
class TesttemplateHierarchy(cloudstackTestCase):
@classmethod
@@ -1441,7 +1438,6 @@ class TestUserDetails(cloudstackTestCase):
)
return
-@unittest.skip("Login API response returns nothing")
class TestUserLogin(cloudstackTestCase):
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_egress_rules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py
index 607bac8..c8b3eee 100644
--- a/test/integration/component/test_egress_rules.py
+++ b/test/integration/component/test_egress_rules.py
@@ -1966,7 +1966,6 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
return
-@unittest.skip("Valid bug- ID: CS-12647")
class TestInvalidParametersForEgress(cloudstackTestCase):
def setUp(self):
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_eip_elb.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_eip_elb.py b/test/integration/component/test_eip_elb.py
index 14af4a3..42a5148 100644
--- a/test/integration/component/test_eip_elb.py
+++ b/test/integration/component/test_eip_elb.py
@@ -182,7 +182,6 @@ class TestEIP(cloudstackTestCase):
@attr(tags = ["eip"])
- @unittest.skip("skipped - Framework DB Exception")
def test_01_eip_by_deploying_instance(self):
"""Test EIP by deploying an instance
"""
@@ -350,7 +349,6 @@ class TestEIP(cloudstackTestCase):
return
@attr(tags = ["eip"])
- @unittest.skip("skipped - Framework DB Exception")
def test_02_acquire_ip_enable_static_nat(self):
"""Test associate new IP and enable static NAT for new IP and the VM
"""
@@ -495,7 +493,6 @@ class TestEIP(cloudstackTestCase):
return
@attr(tags = ["eip"])
- @unittest.skip("skipped - Framework DB Exception")
def test_03_disable_static_nat(self):
"""Test disable static NAT and release EIP acquired
"""
@@ -695,7 +692,6 @@ class TestEIP(cloudstackTestCase):
return
@attr(tags = ["eip"])
- @unittest.skip("skipped - Framework DB Exception")
def test_04_disable_static_nat_system(self):
"""Test disable static NAT with system = True
"""
@@ -765,7 +761,6 @@ class TestEIP(cloudstackTestCase):
return
@attr(tags = ["eip"])
- @unittest.skip("skipped - Framework DB Exception")
def test_05_destroy_instance(self):
"""Test EIO after destroying instance
"""
@@ -1406,7 +1401,6 @@ class TestELB(cloudstackTestCase):
return
@attr(tags = ["eip"])
- @unittest.skip("valid bug : http://bugs.cloudstack.org/browse/CS-15077 : ListPublicIPAddress failing")
def test_04_delete_lb_on_eip(self):
"""Test delete LB rule generated on EIP
"""
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_netscaler_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py
index 80b3f0b..1988897 100644
--- a/test/integration/component/test_netscaler_lb.py
+++ b/test/integration/component/test_netscaler_lb.py
@@ -2132,7 +2132,6 @@ class TestLoadBalancingRule(cloudstackTestCase):
return
-@unittest.skip("Questions - How to verify after changing public/private ports?")
class TestDeleteCreateLBRule(cloudstackTestCase):
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_network_offering.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_network_offering.py b/test/integration/component/test_network_offering.py
index b51d0e4..a3e87f6 100644
--- a/test/integration/component/test_network_offering.py
+++ b/test/integration/component/test_network_offering.py
@@ -1816,7 +1816,6 @@ class TestNetworkUpgrade(cloudstackTestCase):
return
-@unittest.skip("Skipped since shared network requires StartIp/endIp/gateway/netmask")
class TestSharedNetworkWithoutIp(cloudstackTestCase):
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_project_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_configs.py b/test/integration/component/test_project_configs.py
index 1eef123..6416497 100644
--- a/test/integration/component/test_project_configs.py
+++ b/test/integration/component/test_project_configs.py
@@ -343,7 +343,6 @@ class TestProjectCreationNegative(cloudstackTestCase):
@attr(configuration = "allow.user.create.projects")
@attr(tags = ["advanced", "basic", "sg", "eip", "advancedns", "simulator"])
- @unittest.skip("Known bug-able to create project as a domain user")
def test_user_project_creation(self):
"""Test create project as a domain admin and domain user
"""
@@ -1299,7 +1298,6 @@ class TestProjectInviteTimeout(cloudstackTestCase):
)
return
- @unittest.skip("Requires SMPT configs")
def test_09_invite_to_project_by_email(self):
"""Test invite user to project by email"""
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_project_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py
index af99717..6e3f41d 100644
--- a/test/integration/component/test_project_limits.py
+++ b/test/integration/component/test_project_limits.py
@@ -328,7 +328,6 @@ class TestProjectLimits(cloudstackTestCase):
return
@attr(tags=["advanced", "basic", "sg", "eip", "advancedns", "simulator"])
- @unittest.skip("No provision for updating resource limits from account through API")
def test_02_project_limits_normal_user(self):
""" Test project limits
"""
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_projects.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_projects.py b/test/integration/component/test_projects.py
index e1975cf..5f37f96 100644
--- a/test/integration/component/test_projects.py
+++ b/test/integration/component/test_projects.py
@@ -559,7 +559,6 @@ class TestDeleteAccountWithProject(cloudstackTestCase):
return
-@unittest.skip("Deleting domain doesn't cleanup account")
class TestDeleteDomainWithProject(cloudstackTestCase):
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_tags.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_tags.py b/test/integration/component/test_tags.py
index 992ca1d..52df6da 100644
--- a/test/integration/component/test_tags.py
+++ b/test/integration/component/test_tags.py
@@ -690,7 +690,6 @@ class TestResourceTags(cloudstackTestCase):
return
@attr(tags=["advanced"])
- @unittest.skip("Not supported in 3.0.5")
def test_04_vpn_tag(self):
""" Test Create tag on vpn and remove the vpn
"""
@@ -1421,7 +1420,6 @@ class TestResourceTags(cloudstackTestCase):
return
@attr(tags=["basic", "sg"])
- @unittest.skip("skip")
def test_11_migrate_tagged_vm_del(self):
""" Test migration of a tagged vm and delete the tag
"""
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_templates.py b/test/integration/component/test_templates.py
index 65beabf..e4599d4 100644
--- a/test/integration/component/test_templates.py
+++ b/test/integration/component/test_templates.py
@@ -99,7 +99,6 @@ class Services:
}
-@unittest.skip("Open questions")
class TestCreateTemplate(cloudstackTestCase):
def setUp(self):
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_vm_passwdenabled.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vm_passwdenabled.py b/test/integration/component/test_vm_passwdenabled.py
index e22a1a0..ebe32c8 100644
--- a/test/integration/component/test_vm_passwdenabled.py
+++ b/test/integration/component/test_vm_passwdenabled.py
@@ -69,7 +69,6 @@ class Services:
# CentOS 5.3 (64-bit)
}
-@unittest.skip("Additional test")
class TestVMPasswordEnabled(cloudstackTestCase):
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_vpc.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc.py b/test/integration/component/test_vpc.py
index 7dbe7c4..3fc0cc5 100644
--- a/test/integration/component/test_vpc.py
+++ b/test/integration/component/test_vpc.py
@@ -2474,7 +2474,6 @@ class TestVPC(cloudstackTestCase):
"Updation of VPC display text failed.")
-@unittest.skip("Skip")
class TestVPCHostMaintenance(cloudstackTestCase):
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_vpc_network.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py
index c0c393c..c321103 100644
--- a/test/integration/component/test_vpc_network.py
+++ b/test/integration/component/test_vpc_network.py
@@ -459,7 +459,6 @@ class TestVPCNetwork(cloudstackTestCase):
)
return
- @unittest.skip("Skip - Requires netscaler setup")
@attr(tags=["netscaler", "intervlan"])
def test_03_create_network_netscaler(self):
""" Test create network using netscaler for LB
@@ -707,7 +706,6 @@ class TestVPCNetwork(cloudstackTestCase):
return
@attr(tags=["advanced", "intervlan"])
- @unittest.skip("Skipping - able to create network with RvR")
def test_06_create_network_with_rvr(self):
""" Test create network with eredundant router capability
"""
@@ -1038,7 +1036,6 @@ class TestVPCNetwork(cloudstackTestCase):
"Network creation failed as VPC support nw with conserve mode OFF")
return
-@unittest.skip("tested")
class TestVPCNetworkRanges(cloudstackTestCase):
@classmethod
@@ -1670,7 +1667,6 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
return
@attr(tags=["advanced", "intervlan"])
- @unittest.skip("Error while NW upgrade - Failed to implement network (with specified id) elements and resources as a part of network update")
def test_01_network_services_upgrade(self):
""" Test update Network that is part of a VPC to a network offering
that has more services.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_vpc_offerings.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_offerings.py b/test/integration/component/test_vpc_offerings.py
index 4b98775..a111d7d 100644
--- a/test/integration/component/test_vpc_offerings.py
+++ b/test/integration/component/test_vpc_offerings.py
@@ -278,7 +278,6 @@ class TestVPCOffering(cloudstackTestCase):
return
@attr(tags=["advanced", "intervlan"])
- @unittest.skip("Skipping - Issue: Deleting account doesn't clean VPC")
def test_02_deploy_vms_in_vpc_nw(self):
"""Test deploy virtual machines in VPC networks"""
@@ -897,7 +896,6 @@ class TestVPCOffering(cloudstackTestCase):
return
@attr(tags=["advanced", "intervlan"])
- @unittest.skip("Skipping - API should not allow to create VPC offering without SourceNAT, Firewall")
def test_06_vpc_off_invalid_services(self):
"""Test VPC offering with invalid services"""
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_vpc_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_routers.py b/test/integration/component/test_vpc_routers.py
index 7dc95e8..a8559e5 100644
--- a/test/integration/component/test_vpc_routers.py
+++ b/test/integration/component/test_vpc_routers.py
@@ -509,7 +509,6 @@ class TestVPCRoutersBasic(cloudstackTestCase):
)
return
- @unittest.skip("Needs hosts")
@attr(tags=["advanced", "intervlan"])
def test_04_migrate_router_after_creating_vpc(self):
""" Test migration of router to another host after creating VPC """
@@ -531,7 +530,6 @@ class TestVPCRoutersBasic(cloudstackTestCase):
self.migrate_router(routers[0])
return
- @unittest.skip("Fails")
@attr(tags=["advanced", "intervlan"])
def test_05_change_service_offerring_vpc(self):
""" Tests to change service offering of the Router after
@@ -1236,7 +1234,6 @@ class TestVPCRouterOneNetwork(cloudstackTestCase):
)
return
- @unittest.skip("Untested - hosts not available")
@attr(tags=["advanced", "intervlan"])
def test_04_migrate_router_after_addition_of_one_guest_network(self):
""" Test migrate of router after addition of one guest network
@@ -1280,7 +1277,6 @@ class TestVPCRouterOneNetwork(cloudstackTestCase):
self.migrate_router(routers[0])
return
- @unittest.skip("Fails")
@attr(tags=["advanced", "intervlan"])
def test_05_chg_srv_off_router_after_addition_of_one_guest_network(self):
""" Test to change service offering of router after addition of one guest network
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index 7658beb..44f7288 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -2464,7 +2464,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
)
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_03_start_instance_in_network(self):
""" Test start an instance in VPC networks
@@ -2488,7 +2487,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
self.validate_network_rules()
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_04_reboot_instance_in_network(self):
""" Test reboot an instance in VPC networks
@@ -2516,7 +2514,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
self.validate_network_rules()
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_05_destroy_instance_in_network(self):
""" Test destroy an instance in VPC networks
@@ -2562,7 +2559,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
)
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_06_recover_instance_in_network(self):
""" Test recover an instance in VPC networks
@@ -2594,7 +2590,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
self.validate_network_rules()
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_07_migrate_instance_in_network(self):
""" Test migrate an instance in VPC networks
@@ -2645,7 +2640,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
self.validate_network_rules()
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_08_user_data(self):
""" Test user data in virtual machines
@@ -2700,7 +2694,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
)
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_09_meta_data(self):
""" Test meta data in virtual machines
@@ -2754,7 +2747,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
)
return
- @unittest.skip("Skipping - Not able to SSH if VPCVR is stopped")
@attr(tags=["advanced", "intervlan"])
def test_10_expunge_instance_in_network(self):
""" Test expunge an instance in VPC networks
@@ -2812,7 +2804,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
return
-@unittest.skip("Skip - Requires Tagged hosts setup")
class TestVMLifeCycleDiffHosts(cloudstackTestCase):
@classmethod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_vpc_vms_deployment.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py
index c49ef45..c599d96 100644
--- a/test/integration/component/test_vpc_vms_deployment.py
+++ b/test/integration/component/test_vpc_vms_deployment.py
@@ -1721,7 +1721,6 @@ class TestVMDeployVPC(cloudstackTestCase):
return
@attr(tags=["advanced", "intervlan"])
- @unittest.skip("Not tested")
def test_07_delete_network_with_rules(self):
""" Test delete network that has PF/staticNat/LB rules/Network Acl
"""
[26/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2894. Removing all vlan ranges should update the vnet column to NULL.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/22a85082
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/22a85082
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/22a85082
Branch: refs/heads/disk_io_throttling
Commit: 22a850828001b89fd6ac8e3916256bc7e966a1ef
Parents: 8bc72ad
Author: Likitha Shetty <li...@citrix.com>
Authored: Fri Jun 7 19:22:39 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Mon Jun 10 10:39:55 2013 +0530
----------------------------------------------------------------------
.../com/cloud/network/NetworkServiceImpl.java | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22a85082/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index c2af8e8..c7be2c6 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -2680,9 +2680,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
vnetString = vnetString+vnetRange.first().toString()+"-"+value.toString()+";";
}
}
- vnetString = vnetString+"*";
- vnetString = vnetString.replace(";*","");
- network.setVnet(vnetString);
+ if (vnetString.length() > 0 && vnetString.charAt(vnetString.length()-1)==';') {
+ vnetString = vnetString.substring(0, vnetString.length()-1);
+ }
+ network.setVnet(vnetString);
}
for (Pair<Integer, Integer> vnetToAdd : vnetsToAdd) {
@@ -2788,12 +2789,15 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
_datacneter_vnet.deleteRange(txn, network.getDataCenterId(), network.getId(), start, end);
String vnetString="";
- for (Pair<Integer,Integer> vnetRange : existingRanges ){
- vnetString=vnetString+vnetRange.first().toString()+"-"+vnetRange.second().toString()+";";
+ if (existingRanges.isEmpty()) {
+ network.setVnet(null);
+ } else {
+ for (Pair<Integer,Integer> vnetRange : existingRanges ) {
+ vnetString=vnetString+vnetRange.first().toString()+"-"+vnetRange.second().toString()+";";
+ }
+ vnetString = vnetString.substring(0, vnetString.length()-1);
+ network.setVnet(vnetString);
}
- vnetString = vnetString+"*";
- vnetString = vnetString.replace(";*","");
- network.setVnet(vnetString);
_physicalNetworkDao.update(network.getId(), network);
txn.commit();
_physicalNetworkDao.releaseFromLockTable(network.getId());
[06/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Fix DB warnings - txn: Commit called when it is not a transaction: -NetworkServiceImpl.dedicateGuestVlanRange:3050
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e7d5ccaa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e7d5ccaa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e7d5ccaa
Branch: refs/heads/disk_io_throttling
Commit: e7d5ccaada697607260ab5ee8e8ff3b436973f88
Parents: 6208a51
Author: Likitha Shetty <li...@citrix.com>
Authored: Fri Jun 7 12:11:15 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Fri Jun 7 12:12:18 2013 +0530
----------------------------------------------------------------------
server/src/com/cloud/network/NetworkServiceImpl.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e7d5ccaa/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 2bf9f40..29a36b9 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3044,6 +3044,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
_accountGuestVlanMapDao.update(guestVlanMapId, accountGuestVlanMapVO);
} else {
Transaction txn = Transaction.currentTxn();
+ txn.start();
accountGuestVlanMapVO = new AccountGuestVlanMapVO(vlanOwner.getAccountId(), physicalNetworkId);
accountGuestVlanMapVO.setGuestVlanRange(startVlan + "-" + endVlan);
_accountGuestVlanMapDao.persist(accountGuestVlanMapVO);
[33/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Adding serviceCapability LB:Public for VPC
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6607b1e5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6607b1e5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6607b1e5
Branch: refs/heads/disk_io_throttling
Commit: 6607b1e5f1da3e738babcc557f40c30b932ed565
Parents: 20c1f2c
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 14:52:47 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 14:52:47 2013 +0530
----------------------------------------------------------------------
.../component/test_vpc_vm_life_cycle.py | 1095 +++---------------
1 file changed, 156 insertions(+), 939 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6607b1e5/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index 44f7288..1fd2724 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -26,8 +26,6 @@ from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
from marvin.remoteSSHClient import remoteSSHClient
-import datetime
-
class Services:
"""Test VM life cycle in VPC network services
@@ -35,155 +33,159 @@ class Services:
def __init__(self):
self.services = {
- "account": {
- "email": "test@test.com",
- "firstname": "Test",
- "lastname": "User",
- "username": "test",
- # Random characters are appended for unique
- # username
- "password": "password",
- },
- "service_offering": {
- "name": "Tiny Instance",
- "displaytext": "Tiny Instance",
- "cpunumber": 1,
- "cpuspeed": 100,
- "memory": 128,
- },
- "service_offering_1": {
- "name": "Tiny Instance- tagged host 1",
- "displaytext": "Tiny off-tagged host2",
- "cpunumber": 1,
- "cpuspeed": 100,
- "memory": 128,
- "tags": "HOST_TAGS_HERE"
- },
- "service_offering_2": {
- "name": "Tiny Instance- tagged host 2",
- "displaytext": "Tiny off-tagged host2",
- "cpunumber": 1,
- "cpuspeed": 100,
- "memory": 128,
- "tags": "HOST_TAGS_HERE"
- },
- "network_offering": {
- "name": 'VPC Network offering',
- "displaytext": 'VPC Network off',
- "guestiptype": 'Isolated',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "serviceProviderList": {
- "Dhcp": 'VpcVirtualRouter',
- "Dns": 'VpcVirtualRouter',
- "SourceNat": 'VpcVirtualRouter',
- "PortForwarding": 'VpcVirtualRouter',
- "Lb": 'VpcVirtualRouter',
- "UserData": 'VpcVirtualRouter',
- "StaticNat": 'VpcVirtualRouter',
- "NetworkACL": 'VpcVirtualRouter'
- },
- },
- "network_offering_no_lb": {
- "name": 'VPC Network offering',
- "displaytext": 'VPC Network off',
- "guestiptype": 'Isolated',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "serviceProviderList": {
- "Dhcp": 'VpcVirtualRouter',
- "Dns": 'VpcVirtualRouter',
- "SourceNat": 'VpcVirtualRouter',
- "PortForwarding": 'VpcVirtualRouter',
- "UserData": 'VpcVirtualRouter',
- "StaticNat": 'VpcVirtualRouter',
- "NetworkACL": 'VpcVirtualRouter'
- },
- },
- "network_off_shared": {
- "name": 'Shared Network offering',
- "displaytext": 'Shared Network offering',
- "guestiptype": 'Shared',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "specifyIpRanges": True,
- "specifyVlan": True
- },
- "vpc_offering": {
- "name": 'VPC off',
- "displaytext": 'VPC off',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat',
- },
- "vpc": {
- "name": "TestVPC",
- "displaytext": "TestVPC",
- "cidr": '10.0.0.1/24'
- },
- "network": {
- "name": "Test Network",
- "displaytext": "Test Network",
- "netmask": '255.255.255.0',
- "limit": 5,
- # Max networks allowed as per hypervisor
- # Xenserver -> 5, VMWare -> 9
- },
- "lbrule": {
- "name": "SSH",
- "alg": "leastconn",
- # Algorithm used for load balancing
- "privateport": 22,
- "publicport": 2222,
- "openfirewall": False,
- "startport": 2222,
- "endport": 2222,
- "protocol": "TCP",
- "cidrlist": '0.0.0.0/0',
- },
- "natrule": {
- "privateport": 22,
- "publicport": 22,
- "startport": 22,
- "endport": 22,
- "protocol": "TCP",
- "cidrlist": '0.0.0.0/0',
- },
- "fw_rule": {
- "startport": 1,
- "endport": 6000,
- "cidr": '0.0.0.0/0',
- # Any network (For creating FW rule)
- "protocol": "TCP"
- },
- "http_rule": {
- "startport": 80,
- "endport": 80,
- "cidrlist": '0.0.0.0/0',
- "protocol": "ICMP"
- },
- "virtual_machine": {
- "displayname": "Test VM",
- "username": "root",
- "password": "password",
- "ssh_port": 22,
- "hypervisor": 'XenServer',
- # Hypervisor type should be same as
- # hypervisor type of cluster
- "privateport": 22,
- "publicport": 22,
- "protocol": 'TCP',
- "userdata": 'This is sample data',
- },
- "ostype": 'CentOS 5.3 (64-bit)',
- # Cent OS 5.3 (64 bit)
- "sleep": 60,
- "timeout": 10,
- "mode": 'advanced'
- }
+ "account": {
+ "email": "test@test.com",
+ "firstname": "Test",
+ "lastname": "User",
+ "username": "test",
+ # Random characters are appended for unique
+ # username
+ "password": "password",
+ },
+ "service_offering": {
+ "name": "Tiny Instance",
+ "displaytext": "Tiny Instance",
+ "cpunumber": 1,
+ "cpuspeed": 100,
+ "memory": 128,
+ },
+ "service_offering_1": {
+ "name": "Tiny Instance- tagged host 1",
+ "displaytext": "Tiny off-tagged host2",
+ "cpunumber": 1,
+ "cpuspeed": 100,
+ "memory": 128,
+ "tags": "HOST_TAGS_HERE"
+ },
+ "service_offering_2": {
+ "name": "Tiny Instance- tagged host 2",
+ "displaytext": "Tiny off-tagged host2",
+ "cpunumber": 1,
+ "cpuspeed": 100,
+ "memory": 128,
+ "tags": "HOST_TAGS_HERE"
+ },
+ "network_offering": {
+ "name": 'VPC Network offering',
+ "displaytext": 'VPC Network off',
+ "guestiptype": 'Isolated',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "serviceProviderList": {
+ "Dhcp": 'VpcVirtualRouter',
+ "Dns": 'VpcVirtualRouter',
+ "SourceNat": 'VpcVirtualRouter',
+ "PortForwarding": 'VpcVirtualRouter',
+ "Lb": 'VpcVirtualRouter',
+ "UserData": 'VpcVirtualRouter',
+ "StaticNat": 'VpcVirtualRouter',
+ "NetworkACL": 'VpcVirtualRouter'
+ },
+ "serviceCapabilityList": {
+ "SourceNat": {"SupportedSourceNatTypes": "peraccount"},
+ "Lb": {"lbSchemes": "public", "SupportedLbIsolation": "dedicated"}
+ },
+ },
+ "network_offering_no_lb": {
+ "name": 'VPC Network offering no LB',
+ "displaytext": 'VPC Network off no LB',
+ "guestiptype": 'Isolated',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "serviceProviderList": {
+ "Dhcp": 'VpcVirtualRouter',
+ "Dns": 'VpcVirtualRouter',
+ "SourceNat": 'VpcVirtualRouter',
+ "PortForwarding": 'VpcVirtualRouter',
+ "UserData": 'VpcVirtualRouter',
+ "StaticNat": 'VpcVirtualRouter',
+ "NetworkACL": 'VpcVirtualRouter'
+ },
+ },
+ "network_off_shared": {
+ "name": 'Shared Network offering',
+ "displaytext": 'Shared Network offering',
+ "guestiptype": 'Shared',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "specifyIpRanges": True,
+ "specifyVlan": True
+ },
+ "vpc_offering": {
+ "name": 'VPC off',
+ "displaytext": 'VPC off',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat',
+ },
+ "vpc": {
+ "name": "TestVPC",
+ "displaytext": "TestVPC",
+ "cidr": '10.0.0.1/24'
+ },
+ "network": {
+ "name": "Test Network",
+ "displaytext": "Test Network",
+ "netmask": '255.255.255.0',
+ "limit": 5,
+ # Max networks allowed as per hypervisor
+ # Xenserver -> 5, VMWare -> 9
+ },
+ "lbrule": {
+ "name": "SSH",
+ "alg": "leastconn",
+ # Algorithm used for load balancing
+ "privateport": 22,
+ "publicport": 2222,
+ "openfirewall": False,
+ "startport": 2222,
+ "endport": 2222,
+ "protocol": "TCP",
+ "cidrlist": '0.0.0.0/0',
+ },
+ "natrule": {
+ "privateport": 22,
+ "publicport": 22,
+ "startport": 22,
+ "endport": 22,
+ "protocol": "TCP",
+ "cidrlist": '0.0.0.0/0',
+ },
+ "fw_rule": {
+ "startport": 1,
+ "endport": 6000,
+ "cidr": '0.0.0.0/0',
+ # Any network (For creating FW rule)
+ "protocol": "TCP"
+ },
+ "http_rule": {
+ "startport": 80,
+ "endport": 80,
+ "cidrlist": '0.0.0.0/0',
+ "protocol": "ICMP"
+ },
+ "virtual_machine": {
+ "displayname": "Test VM",
+ "username": "root",
+ "password": "password",
+ "ssh_port": 22,
+ "hypervisor": 'XenServer',
+ # Hypervisor type should be same as
+ # hypervisor type of cluster
+ "privateport": 22,
+ "publicport": 22,
+ "protocol": 'TCP',
+ "userdata": 'This is sample data',
+ },
+ "ostype": 'CentOS 5.3 (64-bit)',
+ # Cent OS 5.3 (64 bit)
+ "sleep": 60,
+ "timeout": 10,
+ "mode": 'advanced'
+ }
class TestVMLifeCycleVPC(cloudstackTestCase):
@@ -914,7 +916,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
)
return
-
+@unittest.skip("debugging")
class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
@classmethod
@@ -1722,6 +1724,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
return
+@unittest.skip("debugging")
class TestVMLifeCycleBothIsolated(cloudstackTestCase):
@classmethod
@@ -2060,6 +2063,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
return
+@unittest.skip("debugging")
class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
@classmethod
@@ -2804,791 +2808,4 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
return
-class TestVMLifeCycleDiffHosts(cloudstackTestCase):
-
- @classmethod
- def setUpClass(cls):
- cls.api_client = super(
- TestVMLifeCycleDiffHosts,
- cls
- ).getClsTestClient().getApiClient()
- cls.services = Services().services
- # Get Zone, Domain and templates
- cls.domain = get_domain(cls.api_client, cls.services)
- cls.zone = get_zone(cls.api_client, cls.services)
- cls.template = get_template(
- cls.api_client,
- cls.zone.id,
- cls.services["ostype"]
- )
- cls.services["virtual_machine"]["zoneid"] = cls.zone.id
- cls.services["virtual_machine"]["template"] = cls.template.id
-
- cls.service_offering_1 = ServiceOffering.create(
- cls.api_client,
- cls.services["service_offering_1"]
- )
- cls.service_offering_2 = ServiceOffering.create(
- cls.api_client,
- cls.services["service_offering_2"]
- )
- cls.vpc_off = VpcOffering.create(
- cls.api_client,
- cls.services["vpc_offering"]
- )
- cls.vpc_off.update(cls.api_client, state='Enabled')
-
- cls.account = Account.create(
- cls.api_client,
- cls.services["account"],
- admin=True,
- domainid=cls.domain.id
- )
-
- cls.vpc_off = VpcOffering.create(
- cls.api_client,
- cls.services["vpc_offering"]
- )
-
- cls.vpc_off.update(cls.api_client, state='Enabled')
-
- cls.services["vpc"]["cidr"] = '10.1.1.1/16'
- cls.vpc = VPC.create(
- cls.api_client,
- cls.services["vpc"],
- vpcofferingid=cls.vpc_off.id,
- zoneid=cls.zone.id,
- account=cls.account.name,
- domainid=cls.account.domainid
- )
-
- cls.nw_off = NetworkOffering.create(
- cls.api_client,
- cls.services["network_offering"],
- conservemode=False
- )
- # Enable Network offering
- cls.nw_off.update(cls.api_client, state='Enabled')
-
- # Creating network using the network offering created
- cls.network_1 = Network.create(
- cls.api_client,
- cls.services["network"],
- accountid=cls.account.name,
- domainid=cls.account.domainid,
- networkofferingid=cls.nw_off.id,
- zoneid=cls.zone.id,
- gateway='10.1.1.1',
- vpcid=cls.vpc.id
- )
- cls.nw_off_no_lb = NetworkOffering.create(
- cls.api_client,
- cls.services["network_offering_no_lb"],
- conservemode=False
- )
- # Enable Network offering
- cls.nw_off_no_lb.update(cls.api_client, state='Enabled')
-
- # Creating network using the network offering created
- cls.network_2 = Network.create(
- cls.api_client,
- cls.services["network"],
- accountid=cls.account.name,
- domainid=cls.account.domainid,
- networkofferingid=cls.nw_off_no_lb.id,
- zoneid=cls.zone.id,
- gateway='10.1.2.1',
- vpcid=cls.vpc.id
- )
- # Spawn an instance in that network
- cls.vm_1 = VirtualMachine.create(
- cls.api_client,
- cls.services["virtual_machine"],
- accountid=cls.account.name,
- domainid=cls.account.domainid,
- serviceofferingid=cls.service_offering_1.id,
- networkids=[str(cls.network_1.id)]
- )
- # Spawn an instance in that network
- cls.vm_2 = VirtualMachine.create(
- cls.api_client,
- cls.services["virtual_machine"],
- accountid=cls.account.name,
- domainid=cls.account.domainid,
- serviceofferingid=cls.service_offering_1.id,
- networkids=[str(cls.network_1.id)]
- )
- cls.vm_3 = VirtualMachine.create(
- cls.api_client,
- cls.services["virtual_machine"],
- accountid=cls.account.name,
- domainid=cls.account.domainid,
- serviceofferingid=cls.service_offering_2.id,
- networkids=[str(cls.network_2.id)]
- )
-
- cls.public_ip_1 = PublicIPAddress.create(
- cls.api_client,
- accountid=cls.account.name,
- zoneid=cls.zone.id,
- domainid=cls.account.domainid,
- networkid=cls.network_1.id,
- vpcid=cls.vpc.id
- )
- cls.lb_rule = LoadBalancerRule.create(
- cls.api_client,
- cls.services["lbrule"],
- ipaddressid=cls.public_ip_1.ipaddress.id,
- accountid=cls.account.name,
- networkid=cls.network_1.id,
- vpcid=cls.vpc.id,
- domainid=cls.account.domainid
- )
- cls.lb_rule.assign(cls.api_client, [cls.vm_1, cls.vm_2])
-
- cls.public_ip_2 = PublicIPAddress.create(
- cls.api_client,
- accountid=cls.account.name,
- zoneid=cls.zone.id,
- domainid=cls.account.domainid,
- networkid=cls.network_1.id,
- vpcid=cls.vpc.id
- )
-
- cls.nat_rule = NATRule.create(
- cls.api_client,
- cls.vm_1,
- cls.services["natrule"],
- ipaddressid=cls.public_ip_2.ipaddress.id,
- openfirewall=False,
- networkid=cls.network_1.id,
- vpcid=cls.vpc.id
- )
-
- # Opening up the ports in VPC
- cls.nwacl_nat = NetworkACL.create(
- cls.api_client,
- networkid=cls.network_1.id,
- services=cls.services["natrule"],
- traffictype='Ingress'
- )
-
- cls.nwacl_lb = NetworkACL.create(
- cls.api_client,
- networkid=cls.network_1.id,
- services=cls.services["lbrule"],
- traffictype='Ingress'
- )
-
- cls.nwacl_internet = NetworkACL.create(
- cls.api_client,
- networkid=cls.network_1.id,
- services=cls.services["http_rule"],
- traffictype='Egress'
- )
- cls._cleanup = [
- cls.service_offering_1,
- cls.service_offering_2,
- cls.nw_off,
- cls.nw_off_no_lb,
- ]
- return
-
- @classmethod
- def tearDownClass(cls):
- try:
- cls.account.delete(cls.api_client)
- wait_for_cleanup(cls.api_client, ["account.cleanup.interval"])
- #Cleanup resources used
- cleanup_resources(cls.api_client, cls._cleanup)
-
- # Waiting for network cleanup to delete vpc offering
- wait_for_cleanup(cls.api_client, ["network.gc.wait",
- "network.gc.interval"])
- cls.vpc_off.delete(cls.api_client)
- except Exception as e:
- raise Exception("Warning: Exception during cleanup : %s" % e)
- return
-
- def setUp(self):
-
- self.apiclient = self.testClient.getApiClient()
- self.dbclient = self.testClient.getDbConnection()
- self.debug("Check the status of VPC virtual router")
- routers = Router.list(
- self.apiclient,
- networkid=self.network_1.id,
- listall=True
- )
- if not isinstance(routers, list):
- raise Exception("No response from list routers API")
-
- self.router = routers[0]
- if self.router.state == "Running":
- Router.stop(self.apiclient, id=self.router.id)
-
- self.cleanup = []
- return
-
- def tearDown(self):
- try:
- #Clean up, terminate the created network offerings
- cleanup_resources(self.apiclient, self.cleanup)
- wait_for_cleanup(self.apiclient, [
- "network.gc.interval",
- "network.gc.wait"])
-
- except Exception as e:
- raise Exception("Warning: Exception during cleanup : %s" % e)
- return
-
- def validate_vm_deployment(self):
- """Validates VM deployment on different hosts"""
-
- vms = VirtualMachine.list(
- self.apiclient,
- account=self.account.name,
- domainid=self.account.domainid,
- networkid=self.network_1.id,
- listall=True
- )
- self.assertEqual(
- isinstance(vms, list),
- True,
- "List VMs shall return a valid response"
- )
- host_1 = vms[0].hostid
- self.debug("Host for network 1: %s" % vms[0].hostid)
-
- vms = VirtualMachine.list(
- self.apiclient,
- account=self.account.name,
- domainid=self.account.domainid,
- networkid=self.network_2.id,
- listall=True
- )
- self.assertEqual(
- isinstance(vms, list),
- True,
- "List VMs shall return a valid response"
- )
- host_2 = vms[0].hostid
- self.debug("Host for network 2: %s" % vms[0].hostid)
-
- self.assertNotEqual(
- host_1,
- host_2,
- "Both the virtual machines should be deployed on diff hosts "
- )
- return
- def validate_vpc_offering(self, vpc_offering):
- """Validates the VPC offering"""
-
- self.debug("Check if the VPC offering is created successfully?")
- vpc_offs = VpcOffering.list(
- self.apiclient,
- id=vpc_offering.id
- )
- self.assertEqual(
- isinstance(vpc_offs, list),
- True,
- "List VPC offerings should return a valid list"
- )
- self.assertEqual(
- vpc_offering.name,
- vpc_offs[0].name,
- "Name of the VPC offering should match with listVPCOff data"
- )
- self.debug(
- "VPC offering is created successfully - %s" %
- vpc_offering.name)
- return
-
- def validate_vpc_network(self, network, state=None):
- """Validates the VPC network"""
-
- self.debug("Check if the VPC network is created successfully?")
- vpc_networks = VPC.list(
- self.apiclient,
- id=network.id
- )
- self.assertEqual(
- isinstance(vpc_networks, list),
- True,
- "List VPC network should return a valid list"
- )
- self.assertEqual(
- network.name,
- vpc_networks[0].name,
- "Name of the VPC network should match with listVPC data"
- )
- if state:
- self.assertEqual(
- vpc_networks[0].state,
- state,
- "VPC state should be '%s'" % state
- )
- self.debug("VPC network validated - %s" % network.name)
- return
-
- def validate_network_rules(self):
- """Validates if the network rules work properly or not?"""
- try:
- ssh_1 = self.vm_1.get_ssh_client(
- ipaddress=self.public_ip_1.ipaddress.ipaddress)
- self.debug("SSH into VM is successfully")
-
- self.debug("Verifying if we can ping to outside world from VM?")
- # Ping to outsite world
- res = ssh_1.execute("ping -c 1 www.google.com")
- # res = 64 bytes from maa03s17-in-f20.1e100.net (74.125.236.212):
- # icmp_req=1 ttl=57 time=25.9 ms
- # --- www.l.google.com ping statistics ---
- # 1 packets transmitted, 1 received, 0% packet loss, time 0ms
- # rtt min/avg/max/mdev = 25.970/25.970/25.970/0.000 ms
- except Exception as e:
- self.fail("Failed to SSH into VM - %s, %s" %
- (self.public_ip_1.ipaddress.ipaddress, e))
-
- result = str(res)
- self.assertEqual(
- result.count("1 received"),
- 1,
- "Ping to outside world from VM should be successful"
- )
-
- self.debug("Checking if we can SSH into VM_1?")
- try:
- ssh_2 = self.vm_1.get_ssh_client(
- ipaddress=self.public_ip_2.ipaddress.ipaddress)
- self.debug("SSH into VM is successfully")
-
- self.debug("Verifying if we can ping to outside world from VM?")
- res = ssh_2.execute("ping -c 1 www.google.com")
- except Exception as e:
- self.fail("Failed to SSH into VM - %s, %s" %
- (self.public_ip_2.ipaddress.ipaddress, e))
-
- result = str(res)
- self.assertEqual(
- result.count("1 received"),
- 1,
- "Ping to outside world from VM should be successful"
- )
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_01_deploy_instance_in_network(self):
- """ Test deploy an instance in VPC networks
- """
-
- # Validate the following
- # 1. Create a VPC with cidr - 10.1.1.1/16
- # 2. Add network1(10.1.1.1/24) and network2(10.1.2.1/24) to this VPC.
- # Steps:
- # 1. Deploy vm1 and vm2 in network1 and vm3 and vm4 in network2 using
- # the default CentOS 6.2 Template
-
- self.validate_vm_deployment()
- self.debug("Check if deployed VMs are in running state?")
- vms = VirtualMachine.list(
- self.apiclient,
- account=self.account.name,
- domainid=self.account.domainid,
- listall=True
- )
- self.assertEqual(
- isinstance(vms, list),
- True,
- "List VMs should return a valid response"
- )
- for vm in vms:
- self.debug("VM name: %s, VM state: %s" % (vm.name, vm.state))
- self.assertEqual(
- vm.state,
- "Running",
- "Vm state should be running for each VM deployed"
- )
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_02_stop_instance_in_network(self):
- """ Test stop an instance in VPC networks
- """
-
- # Validate the following
- # 1. Stop the virtual machines.
- # 2. Rules should be still configured on virtual router.
-
- self.debug("Stopping the virtual machines in account: %s" %
- self.account.name)
- try:
- self.vm_1.stop(self.apiclient)
- self.vm_2.stop(self.apiclient)
- except Exception as e:
- self.fail("Failed to stop the virtual instances, %s" % e)
-
- # Check if the network rules still exists after Vm stop
- self.debug("Checking if NAT rules ")
- nat_rules = NATRule.list(
- self.apiclient,
- id=self.nat_rule.id,
- listall=True
- )
- self.assertEqual(
- isinstance(nat_rules, list),
- True,
- "List NAT rules shall return a valid list"
- )
-
- lb_rules = LoadBalancerRule.list(
- self.apiclient,
- id=self.lb_rule.id,
- listall=True
- )
- self.assertEqual(
- isinstance(lb_rules, list),
- True,
- "List LB rules shall return a valid list"
- )
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_03_start_instance_in_network(self):
- """ Test start an instance in VPC networks
- """
-
- # Validate the following
- # 1. Start the virtual machines.
- # 2. Vm should be started successfully.
- # 3. Make sure that all the PF,LB and Static NAT rules on this VM
- # works as expected.
- # 3. Make sure that we are able to access google.com from this user Vm
-
- self.debug("Starting the virtual machines in account: %s" %
- self.account.name)
- try:
- self.vm_1.start(self.apiclient)
- self.vm_2.start(self.apiclient)
- except Exception as e:
- self.fail("Failed to start the virtual instances, %s" % e)
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_04_reboot_instance_in_network(self):
- """ Test reboot an instance in VPC networks
- """
-
- # Validate the following
- # 1. Reboot the virtual machines.
- # 2. Vm should be started successfully.
- # 3. Make sure that all the PF,LB and Static NAT rules on this VM
- # works as expected.
- # 3. Make sure that we are able to access google.com from this user Vm
-
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
-
- self.debug("Starting the virtual machines in account: %s" %
- self.account.name)
- try:
- self.vm_1.reboot(self.apiclient)
- self.vm_2.reboot(self.apiclient)
- except Exception as e:
- self.fail("Failed to reboot the virtual instances, %s" % e)
-
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_05_destroy_instance_in_network(self):
- """ Test destroy an instance in VPC networks
- """
-
- # Validate the following
- # 1. Destory the virtual machines.
- # 2. Rules should be still configured on virtual router.
-
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
-
- self.debug("Destroying the virtual machines in account: %s" %
- self.account.name)
- try:
- self.vm_1.delete(self.apiclient)
- self.vm_2.delete(self.apiclient)
- except Exception as e:
- self.fail("Failed to stop the virtual instances, %s" % e)
-
- # Check if the network rules still exists after Vm stop
- self.debug("Checking if NAT rules ")
- nat_rules = NATRule.list(
- self.apiclient,
- id=self.nat_rule.id,
- listall=True
- )
- self.assertEqual(
- isinstance(nat_rules, list),
- True,
- "List NAT rules shall return a valid list"
- )
-
- lb_rules = LoadBalancerRule.list(
- self.apiclient,
- id=self.lb_rule.id,
- listall=True
- )
- self.assertEqual(
- isinstance(lb_rules, list),
- True,
- "List LB rules shall return a valid list"
- )
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_06_recover_instance_in_network(self):
- """ Test recover an instance in VPC networks
- """
-
- # Validate the following
- # 1. Recover the virtual machines.
- # 2. Vm should be in stopped state. State both the instances
- # 3. Make sure that all the PF,LB and Static NAT rules on this VM
- # works as expected.
- # 3. Make sure that we are able to access google.com from this user Vm
-
- self.debug("Recovering the expunged virtual machines in account: %s" %
- self.account.name)
- try:
- self.vm_1.recover(self.apiclient)
- self.vm_2.recover(self.apiclient)
- except Exception as e:
- self.fail("Failed to recover the virtual instances, %s" % e)
-
- self.debug("Starting the two instances..")
- try:
- self.vm_1.start(self.apiclient)
- self.vm_2.start(self.apiclient)
- except Exception as e:
- self.fail("Failed to start the instances, %s" % e)
-
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_07_migrate_instance_in_network(self):
- """ Test migrate an instance in VPC networks
- """
-
- # Validate the following
- # 1. Migrate the virtual machines to other hosts
- # 2. Vm should be in stopped state. State both the instances
- # 3. Make sure that all the PF,LB and Static NAT rules on this VM
- # works as expected.
- # 3. Make sure that we are able to access google.com from this user Vm
-
- self.debug("Checking if the host is available for migration?")
- hosts = Host.list(
- self.apiclient,
- zoneid=self.zone.id,
- type='Routing'
- )
-
- self.assertEqual(
- isinstance(hosts, list),
- True,
- "List hosts should return a valid list"
- )
- if len(hosts) < 2:
- raise unittest.SkipTest(
- "No host available for migration. Test requires atleast 2 hosts")
-
- # Remove the host of current VM from the hosts list
- hosts[:] = [host for host in hosts if host.id != self.vm_1.hostid]
-
- host = hosts[0]
-
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
-
- self.debug("Migrating VM-ID: %s to Host: %s" % (
- self.vm_1.id,
- host.id
- ))
-
- try:
- self.vm_1.migrate(self.apiclient, hostid=host.id)
- except Exception as e:
- self.fail("Failed to migrate instance, %s" % e)
-
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_08_user_data(self):
- """ Test user data in virtual machines
- """
-
- # Validate the following
- # 1. Create a VPC with cidr - 10.1.1.1/16
- # 2. Add network1(10.1.1.1/24) and network2(10.1.2.1/24) to this VPC.
- # 3. Deploy a vm in network1 and a vm in network2 using userdata
- # Steps
- # 1.Query for the user data for both the user vms from both networks
- # User should be able to query the user data for the vms belonging to
- # both the networks from the VR
-
- try:
- ssh = self.vm_1.get_ssh_client(
- ipaddress=self.public_ip_1.ipaddress.ipaddress)
- self.debug("SSH into VM is successfully")
- except Exception as e:
- self.fail("Failed to SSH into instance")
-
- # Find router associated with user account
- routers = Router.list(
- self.apiclient,
- zoneid=self.zone.id,
- listall=True
- )
- self.assertEqual(
- isinstance(routers, list),
- True,
- "Check list response returns a valid list"
- )
- router = routers[0]
- self.debug("check the userdata with that of present in router")
- try:
- cmds = [
- "wget http://%s/latest/user-data" % router.guestipaddress,
- "cat user-data",
- ]
- for c in cmds:
- result = ssh.execute(c)
- self.debug("%s: %s" % (c, result))
- except Exception as e:
- self.fail("Failed to SSH in Virtual machine: %s" % e)
-
- res = str(result)
- self.assertEqual(
- res.count(
- self.services["virtual_machine"]["userdata"]),
- 1,
- "Verify user data from router"
- )
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_09_meta_data(self):
- """ Test meta data in virtual machines
- """
-
- # Validate the following
- # 1. Create a VPC with cidr - 10.1.1.1/16
- # 2. Add network1(10.1.1.1/24) and network2(10.1.2.1/24) to this VPC.
- # 3. Deploy a vm in network1 and a vm in network2 using userdata
- # Steps
- # 1.Query for the meta data for both the user vms from both networks
- # User should be able to query the user data for the vms belonging to
- # both the networks from the VR
-
- try:
- ssh = self.vm_1.get_ssh_client(
- ipaddress=self.public_ip_1.ipaddress.ipaddress)
- self.debug("SSH into VM is successfully")
- except Exception as e:
- self.fail("Failed to SSH into instance")
-
- # Find router associated with user account
- routers = Router.list(
- self.apiclient,
- zoneid=self.zone.id,
- listall=True
- )
- self.assertEqual(
- isinstance(routers, list),
- True,
- "Check list response returns a valid list"
- )
- router = routers[0]
- self.debug("check the metadata with that of present in router")
- try:
- cmds = [
- "wget http://%s/latest/meta-data" % router.guestipaddress,
- "cat user-data",
- ]
- for c in cmds:
- result = ssh.execute(c)
- self.debug("%s: %s" % (c, result))
- except Exception as e:
- self.fail("Failed to SSH in Virtual machine: %s" % e)
-
- res = str(result)
- self.assertNotEqual(
- res,
- None,
- "Meta data should be returned from router"
- )
- return
-
- @attr(tags=["advanced", "intervlan"])
- def test_10_expunge_instance_in_network(self):
- """ Test expunge an instance in VPC networks
- """
-
- # Validate the following
- # 1. Recover the virtual machines.
- # 2. Vm should be in stopped state. State both the instances
- # 3. Make sure that all the PF,LB and Static NAT rules on this VM
- # works as expected.
- # 3. Make sure that we are able to access google.com from this user Vm
-
- self.debug("Validating if the network rules work properly or not?")
- self.validate_network_rules()
-
- self.debug("Delete virtual machines in account: %s" %
- self.account.name)
- try:
- self.vm_1.delete(self.apiclient)
- self.vm_2.delete(self.apiclient)
- except Exception as e:
- self.fail("Failed to destroy the virtual instances, %s" % e)
-
- self.debug(
- "Waiting for expunge interval to cleanup the network and VMs")
-
- wait_for_cleanup(
- self.apiclient,
- ["expunge.interval", "expunge.delay"]
- )
-
- # Check if the network rules still exists after Vm stop
- self.debug("Checking if NAT rules ")
- nat_rules = NATRule.list(
- self.apiclient,
- id=self.nat_rule.id,
- listall=True
- )
- self.assertEqual(
- nat_rules,
- None,
- "List NAT rules should not return anything"
- )
-
- lb_rules = LoadBalancerRule.list(
- self.apiclient,
- id=self.lb_rule.id,
- listall=True
- )
- self.assertEqual(
- lb_rules,
- None,
- "List LB rules should not return anything"
- )
- return
[48/50] [abbrv] CLOUDSTACK-1301: VM Disk I/O Throttling on Bps/IOps
Posted by we...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 33ecdb5..6a9765e 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -109,15 +109,29 @@
number: true
}
},
- diskBytesRate: {
- label: 'label.disk.bytes.rate',
+ diskBytesReadRate: {
+ label: 'label.disk.bytes.read.rate',
validation: {
required: false, //optional
number: true
}
},
- diskIORate: {
- label: 'label.disk.iops.rate',
+ diskBytesWriteRate: {
+ label: 'label.disk.bytes.write.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskIopsReadRate: {
+ label: 'label.disk.iops.read.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskIopsWriteRate: {
+ label: 'label.disk.iops.write.rate',
validation: {
required: false, //optional
number: true
@@ -241,17 +255,26 @@
networkrate: args.data.networkRate
});
}
- if(args.data.diskBytesRate != null && args.data.diskBytesRate.length > 0) {
+ if(args.data.diskBytesReadRate != null && args.data.diskBytesReadRate.length > 0) {
$.extend(data, {
- bytesRate: args.data.diskBytesRate
+ bytesreadrate: args.data.diskBytesReadRate
});
}
- if(args.data.diskIORate != null && args.data.diskIORate.length > 0) {
+ if(args.data.diskBytesWriteRate != null && args.data.diskBytesWriteRate.length > 0) {
$.extend(data, {
- iopsRate: args.data.diskIORate
+ byteswriterate: args.data.diskBytesWriteRate
+ });
+ }
+ if(args.data.diskIopsReadRate != null && args.data.diskIopsReadRate.length > 0) {
+ $.extend(data, {
+ iopsreadrate: args.data.diskIopsReadRate
+ });
+ }
+ if(args.data.diskIopsWriteRate != null && args.data.diskIopsWriteRate.length > 0) {
+ $.extend(data, {
+ iopswriterate: args.data.diskIopsWriteRate
});
}
-
$.extend(data, {
offerha: (args.data.offerHA == "on")
});
@@ -420,8 +443,10 @@
}
},
networkrate: { label: 'label.network.rate' },
- diskBytesRate: { label: 'label.disk.bytes.rate' },
- diskIORate: { label: 'label.disk.iops.rate' },
+ diskBytesReadRate: { label: 'label.disk.bytes.read.rate' },
+ diskBytesWriteRate: { label: 'label.disk.bytes.write.rate' },
+ diskIopsReadRate: { label: 'label.disk.iops.read.rate' },
+ diskIopsWriteRate: { label: 'label.disk.iops.write.rate' },
offerha: {
label: 'label.offer.ha',
converter: cloudStack.converters.toBooleanText
@@ -560,15 +585,29 @@
number: true
}
},
- diskBytesRate: {
- label: 'label.disk.bytes.rate',
+ diskBytesReadRate: {
+ label: 'label.disk.bytes.read.rate',
validation: {
required: false, //optional
number: true
}
},
- diskIORate: {
- label: 'label.disk.iops.rate',
+ diskBytesWriteRate: {
+ label: 'label.disk.bytes.write.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskIopsReadRate: {
+ label: 'label.disk.iops.read.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskIopsWriteRate: {
+ label: 'label.disk.iops.write.rate',
validation: {
required: false, //optional
number: true
@@ -642,14 +681,24 @@
networkrate: args.data.networkRate
});
}
- if(args.data.diskBytesRate != null && args.data.diskBytesRate.length > 0) {
+ if(args.data.diskBytesReadRate != null && args.data.diskBytesReadRate.length > 0) {
+ $.extend(data, {
+ bytesreadrate: args.data.diskBytesReadRate
+ });
+ }
+ if(args.data.diskBytesWriteRate != null && args.data.diskBytesWriteRate.length > 0) {
+ $.extend(data, {
+ byteswriterate: args.data.diskBytesWriteRate
+ });
+ }
+ if(args.data.diskIopsReadRate != null && args.data.diskIopsReadRate.length > 0) {
$.extend(data, {
- bytesRate: args.data.diskBytesRate
+ iopsreadrate: args.data.diskIopsReadRate
});
}
- if(args.data.diskIORate != null && args.data.diskIORate.length > 0) {
+ if(args.data.diskIopsWriteRate != null && args.data.diskIopsWriteRate.length > 0) {
$.extend(data, {
- iopsRate: args.data.diskIORate
+ iopswriterate: args.data.diskIopsWriteRate
});
}
@@ -831,8 +880,10 @@
}
},
networkrate: { label: 'label.network.rate' },
- diskBytesRate: { label: 'label.disk.bytes.rate' },
- diskIORate: { label: 'label.disk.iops.rate' },
+ diskBytesReadRate: { label: 'label.disk.bytes.write.rate' },
+ diskBytesWriteRate: { label: 'label.disk.bytes.write.rate' },
+ diskIopsReadRate: { label: 'label.disk.iops.write.rate' },
+ diskIopsWriteRate: { label: 'label.disk.iops.write.rate' },
offerha: {
label: 'label.offer.ha',
converter: cloudStack.converters.toBooleanText
@@ -893,15 +944,29 @@
return "N/A";
}
},
- diskBytesRate: {
- label: 'label.disk.bytes.rate',
+ diskBytesReadRate: {
+ label: 'label.disk.bytes.read.rate',
validation: {
required: false, //optional
number: true
}
},
- diskIORate: {
- label: 'label.disk.iops.rate',
+ diskBytesWriteRate: {
+ label: 'label.disk.bytes.write.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskIopsReadRate: {
+ label: 'label.disk.iops.read.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskIopsWriteRate: {
+ label: 'label.disk.iops.write.rate',
validation: {
required: false, //optional
number: true
@@ -977,15 +1042,29 @@
dependsOn: 'isCustomized',
validation: { required: true, number: true }
},
- diskBytesRate: {
- label: 'label.disk.bytes.rate',
+ diskBytesReadRate: {
+ label: 'label.disk.bytes.read.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskBytesWriteRate: {
+ label: 'label.disk.bytes.write.rate',
+ validation: {
+ required: false, //optional
+ number: true
+ }
+ },
+ diskIopsReadRate: {
+ label: 'label.disk.iops.read.rate',
validation: {
required: false, //optional
number: true
}
},
- diskIORate: {
- label: 'label.disk.iops.rate',
+ diskIopsWriteRate: {
+ label: 'label.disk.iops.write.rate',
validation: {
required: false, //optional
number: true
@@ -1052,6 +1131,26 @@
domainid: args.data.domainId
});
}
+ if(args.data.diskBytesReadRate != null && args.data.diskBytesReadRate.length > 0) {
+ $.extend(data, {
+ bytesreadrate: args.data.diskBytesReadRate
+ });
+ }
+ if(args.data.diskBytesWriteRate != null && args.data.diskBytesWriteRate.length > 0) {
+ $.extend(data, {
+ byteswriterate: args.data.diskBytesWriteRate
+ });
+ }
+ if(args.data.diskIopsReadRate != null && args.data.diskIopsReadRate.length > 0) {
+ $.extend(data, {
+ iopsreadrate: args.data.diskIopsReadRate
+ });
+ }
+ if(args.data.diskIopsWriteRate != null && args.data.diskIopsWriteRate.length > 0) {
+ $.extend(data, {
+ iopswriterate: args.data.diskIopsWriteRate
+ });
+ }
$.ajax({
url: createURL('createDiskOffering'),
@@ -1164,8 +1263,10 @@
return "N/A";
}
},
- diskBytesRate: { label: 'label.disk.bytes.rate' },
- diskIORate: { label: 'label.disk.iops.rate' },
+ diskBytesReadRate: { label: 'label.disk.bytes.write.rate' },
+ diskBytesWriteRate: { label: 'label.disk.bytes.write.rate' },
+ diskIopsReadRate: { label: 'label.disk.iops.write.rate' },
+ diskIopsWriteRate: { label: 'label.disk.iops.write.rate' },
tags: { label: 'label.storage.tags' },
domain: { label: 'label.domain' },
storagetype: { label: 'label.storage.type' }
[41/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
pvlan
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/840e14de
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/840e14de
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/840e14de
Branch: refs/heads/disk_io_throttling
Commit: 840e14de0b322013a496f62958889383f9ccc1e3
Parents: 78811c5
Author: radhikap <ra...@citrix.com>
Authored: Mon Jun 10 17:56:27 2013 +0530
Committer: radhikap <ra...@citrix.com>
Committed: Mon Jun 10 17:56:27 2013 +0530
----------------------------------------------------------------------
docs/en-US/pvlan.xml | 117 +++++++++++++++++++++++++++++++++++++++-------
1 file changed, 99 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/840e14de/docs/en-US/pvlan.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/pvlan.xml b/docs/en-US/pvlan.xml
index 5084ec4..e3f2ea3 100644
--- a/docs/en-US/pvlan.xml
+++ b/docs/en-US/pvlan.xml
@@ -21,27 +21,25 @@
-->
<section id="pvlan">
<title>Isolation in Advanced Zone Using Private VLAN</title>
- <para/>
+ <para>Isolation of guest traffic in shared networks can be achieved by using Private VLANs
+ (PVLAN). PVLANs provide Layer 2 isolation between ports within the same VLAN. In a PVLAN-enabled
+ shared network, a user VM cannot reach other user VM though they can reach the DHCP server and
+ gateway, this would in turn allow users to control traffic within a network and help them deploy
+ multiple applications without communication between application as well as prevent communication
+ with other users’ VMs.</para>
<itemizedlist>
<listitem>
- <para>isolate VMs from other VMs on the same network (Shared Networks are the most common use
- case) using PVLANs</para>
+ <para>Isolate VMs in a shared networks by using Private VLANs.</para>
</listitem>
<listitem>
- <para>create a Network Offering enabling PVLAN support</para>
+ <para>Supported in both VPC and non-VPC deployments.</para>
</listitem>
<listitem>
- <para>create shared networks based on a network offering which has PVLANs enabled</para>
+ <para>Supported on all hypervisors.</para>
</listitem>
<listitem>
- <para>supported in VPC as well as non-VPC deployments</para>
- </listitem>
- <listitem>
- <para>supported on all Hypervisors</para>
- </listitem>
- <listitem>
- <para>Allow end users to deploy VMs on Isolated Networks or VPC along with the Shared Networks
- that have PVLAN support</para>
+ <para>Allow end users to deploy VMs in an isolated networks, or a VPC, or a Private
+ VLAN-enabled shared network.</para>
</listitem>
</itemizedlist>
<section id="about-pvlan">
@@ -54,7 +52,38 @@
Secondary VLAN. The original VLAN that is being divided into smaller groups is called Primary,
which implies that all VLAN pairs in a private VLAN share the same Primary VLAN. All the
secondary VLANs exist only inside the Primary. Each Secondary VLAN has a specific VLAN ID
- associated to it, which differentiates one sub-domain from another.</para>
+ associated to it, which differentiates one sub-domain from another. </para>
+ <para>Three types of ports exist in a private VLAN domain, which essentially determine the
+ behaviour of the participating hosts. Each ports will have its own unique set of rules, which
+ regulate a connected host's ability to communicate with other connected host within the same
+ private VLAN domain. Configure each host that is part of a PVLAN pair can be by using one of
+ these three port designation:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">Promiscuous</emphasis>: A promiscuous port can communicate with
+ all the interfaces, including the community and isolated host ports that belong to the
+ secondary VLANs. In Promiscuous mode, hosts are connected to promiscuous ports and are
+ able to communicate directly with resources on both primary and secondary VLAN. Routers,
+ DHCP servers, and other trusted devices are typically attached to promiscuous
+ ports.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Isolated VLANs</emphasis>: The ports within an isolated VLAN
+ cannot communicate with each other at the layer-2 level. The hosts that are connected to
+ Isolated ports can directly communicate only with the Promiscuous resources. If your
+ customer device needs to have access only to a gateway router, attach it to an isolated
+ port.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Community VLANs</emphasis>: The ports within a community VLAN
+ can communicate with each other and with the promiscuous ports, but they cannot
+ communicate with the ports in other communities at the layer-2 level. In a Community mode,
+ direct communication is permitted only with the hosts in the same community and those that
+ are connected to the Primary PVLAN in promiscuous mode. If your customer has two devices
+ that need to be isolated from other customers' devices, but to be able to communicate
+ among themselves, deploy them in community ports.</para>
+ </listitem>
+ </itemizedlist>
<para>For further reading:</para>
<itemizedlist>
<listitem>
@@ -72,11 +101,63 @@
</listitem>
</itemizedlist>
</section>
- <section id="ability-pvlan">
- <title>Prerequisites</title>
- </section>
<section id="prereq-pvlan">
<title>Prerequisites</title>
- <para>Ensure that you configure private VLAN on your physical switches out-of-band.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Use a PVLAN supported switch.</para>
+ <para>See <ulink
+ url="http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a0080094830.shtml"
+ >Private VLAN Catalyst Switch Support Matrix</ulink>for more information.</para>
+ </listitem>
+ <listitem>
+ <para>Connect a switch to the gateway; connect additional switches to the gateway via a
+ trunk port: Only Cisco Catalyst 4500 has the PVLAN promiscuous trunk mode to connect both
+ normal VLAN and PVLAN to a PVLAN-unaware switch. For other Catalyst PVLAN support switch,
+ connect the switch to upper switch by using cables. The number of cables should be greater
+ than the number of PVLANs used.</para>
+ </listitem>
+ <listitem>
+ <para>All the layer 2 switches, which are PVLAN-aware, are connected to each other, and one
+ of them is connected to a router. All the ports connected to the host would be configured
+ in trunk mode. Allow Management VLAN, Primary VLAN (public) and secondary Isolated VLAN
+ ports. Configure the switch port connected to the router in PVLAN promiscuous trunk mode,
+ which would translate an isolated VLAN to primary VLAN for router, which is PVLAN-unaware.
+ </para>
+ </listitem>
+ <listitem>
+ <para>If your Catalyst switch supports PVLAN, but not PVLAN promiscuous trunk mode, perform
+ the following: </para>
+ <orderedlist numeration="loweralpha">
+ <listitem>
+ <para>Configure one of the switch port as trunk for management network (management
+ VLAN).</para>
+ </listitem>
+ <listitem>
+ <para>For each PVLAN, perform the following:</para>
+ <orderedlist numeration="lowerroman">
+ <listitem>
+ <para>Connect one port of the Catalyst switch to the upper switch.</para>
+ </listitem>
+ <listitem>
+ <para>Set the port in the Catalyst Switch in promiscuous mode for one pair of
+ PVLAN</para>
+ </listitem>
+ <listitem>
+ <para>Set the port in upper switch to access mode, and allow only the traffic of
+ primary VLAN of the PVLAN pair.</para>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ <listitem>
+ <para>Configure private VLAN on your physical switches out-of-band.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="ability-pvlan">
+ <title/>
+ <para/>
</section>
</section>
[12/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Log the actual NAT ip attempting to SSH into
VM IP is the guest IP and it's the NAT ip that is used for ssh.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/302741d3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/302741d3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/302741d3
Branch: refs/heads/disk_io_throttling
Commit: 302741d309f335c1f8c3a36286bec513fd9ed2f4
Parents: 1c9cd9d
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Fri Jun 7 15:02:55 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Fri Jun 7 15:02:55 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_network.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/302741d3/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index eb33c63..a65748d 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -1209,7 +1209,7 @@ class TestRebootRouter(cloudstackTestCase):
except Exception as e:
self.fail(
"SSH Access failed for %s: %s" % \
- (self.vm_1.ipaddress, e))
+ (self.nat_rule.ipaddress.ipaddress, e))
return
def tearDown(self):
[18/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e218a6dc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e218a6dc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e218a6dc
Branch: refs/heads/disk_io_throttling
Commit: e218a6dcfd8ce514ff04df0631ea5fa6ac31cf8b
Parents: 5dc7387 195e823
Author: Sateesh Chodapuneedi <sa...@apache.org>
Authored: Fri Jun 7 17:08:23 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Fri Jun 7 17:08:23 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_vm_life_cycle.py | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
[19/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
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.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/da5c4619
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/da5c4619
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/da5c4619
Branch: refs/heads/disk_io_throttling
Commit: da5c4619c394eaedec55c277bc5e71de379d6600
Parents: e218a6d
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Fri Jun 7 17:08:31 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Fri Jun 7 17:17:54 2013 +0530
----------------------------------------------------------------------
.../storage/volume/VolumeServiceImpl.java | 79 ++++++++++----------
1 file changed, 40 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/da5c4619/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 7fdf6bb..54dcbd2 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -428,51 +428,52 @@ public class VolumeServiceImpl implements VolumeService {
public AsyncCallFuture<VolumeApiResult> createVolumeFromSnapshot(
VolumeInfo volume, DataStore store, SnapshotInfo snapshot) {
AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<VolumeApiResult>();
-
+
try {
- DataObject volumeOnStore = store.create(volume);
- volume.processEvent(Event.CreateOnlyRequested);
- CreateVolumeFromBaseImageContext<VolumeApiResult> context = new CreateVolumeFromBaseImageContext<VolumeApiResult>(null,
- (VolumeObject)volume, store, volumeOnStore, future);
- AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> caller = AsyncCallbackDispatcher.create(this);
- caller.setCallback(caller.getTarget().createVolumeFromSnapshotCallback(null, null))
- .setContext(context);
- this.motionSrv.copyAsync(snapshot, volumeOnStore, caller);
+ DataObject volumeOnStore = store.create(volume);
+ volume = this.volFactory.getVolume(volume.getId(), store);
+ volume.processEvent(Event.CreateOnlyRequested);
+ CreateVolumeFromBaseImageContext<VolumeApiResult> context = new CreateVolumeFromBaseImageContext<VolumeApiResult>(null,
+ (VolumeObject)volume, store, volumeOnStore, future);
+ AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> caller = AsyncCallbackDispatcher.create(this);
+ caller.setCallback(caller.getTarget().createVolumeFromSnapshotCallback(null, null))
+ .setContext(context);
+ this.motionSrv.copyAsync(snapshot, volumeOnStore, caller);
} catch (Exception e) {
- s_logger.debug("create volume from snapshot failed", e);
- VolumeApiResult result = new VolumeApiResult(volume);
- result.setResult(e.toString());
- future.complete(result);
+ s_logger.debug("create volume from snapshot failed", e);
+ VolumeApiResult result = new VolumeApiResult(volume);
+ result.setResult(e.toString());
+ future.complete(result);
}
-
+
return future;
}
-
- protected Void createVolumeFromSnapshotCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
- CreateVolumeFromBaseImageContext<VolumeApiResult> context) {
- CopyCommandResult result = callback.getResult();
- VolumeInfo volume = context.vo;
- VolumeApiResult apiResult = new VolumeApiResult(volume);
- Event event = null;
- if (result.isFailed()) {
- apiResult.setResult(result.getResult());
- event = Event.OperationFailed;
- } else {
- event = Event.OperationSuccessed;
- }
-
- try {
- volume.processEvent(event);
- } catch (Exception e) {
- s_logger.debug("create volume from snapshot failed", e);
- apiResult.setResult(e.toString());
- }
-
- AsyncCallFuture<VolumeApiResult> future = context.future;
- future.complete(apiResult);
- return null;
+
+ protected Void createVolumeFromSnapshotCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
+ CreateVolumeFromBaseImageContext<VolumeApiResult> context) {
+ CopyCommandResult result = callback.getResult();
+ VolumeInfo volume = context.vo;
+ VolumeApiResult apiResult = new VolumeApiResult(volume);
+ Event event = null;
+ if (result.isFailed()) {
+ apiResult.setResult(result.getResult());
+ event = Event.OperationFailed;
+ } else {
+ event = Event.OperationSuccessed;
+ }
+
+ try {
+ volume.processEvent(event);
+ } catch (Exception e) {
+ s_logger.debug("create volume from snapshot failed", e);
+ apiResult.setResult(e.toString());
+ }
+
+ AsyncCallFuture<VolumeApiResult> future = context.future;
+ future.complete(apiResult);
+ return null;
}
-
+
protected VolumeVO duplicateVolumeOnAnotherStorage(Volume volume, StoragePool pool) {
Long lastPoolId = volume.getPoolId();
VolumeVO newVol = new VolumeVO(volume);
[40/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2404 more conceptual info
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/78811c50
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/78811c50
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/78811c50
Branch: refs/heads/disk_io_throttling
Commit: 78811c50021202cb2374ceeb9edf0fdac5c66398
Parents: d8a235e
Author: radhikap <ra...@citrix.com>
Authored: Fri Jun 7 16:44:02 2013 +0530
Committer: radhikap <ra...@citrix.com>
Committed: Mon Jun 10 17:55:28 2013 +0530
----------------------------------------------------------------------
docs/en-US/pvlan.xml | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/78811c50/docs/en-US/pvlan.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/pvlan.xml b/docs/en-US/pvlan.xml
index 96c1a78..5084ec4 100644
--- a/docs/en-US/pvlan.xml
+++ b/docs/en-US/pvlan.xml
@@ -22,15 +22,37 @@
<section id="pvlan">
<title>Isolation in Advanced Zone Using Private VLAN</title>
<para/>
+ <itemizedlist>
+ <listitem>
+ <para>isolate VMs from other VMs on the same network (Shared Networks are the most common use
+ case) using PVLANs</para>
+ </listitem>
+ <listitem>
+ <para>create a Network Offering enabling PVLAN support</para>
+ </listitem>
+ <listitem>
+ <para>create shared networks based on a network offering which has PVLANs enabled</para>
+ </listitem>
+ <listitem>
+ <para>supported in VPC as well as non-VPC deployments</para>
+ </listitem>
+ <listitem>
+ <para>supported on all Hypervisors</para>
+ </listitem>
+ <listitem>
+ <para>Allow end users to deploy VMs on Isolated Networks or VPC along with the Shared Networks
+ that have PVLAN support</para>
+ </listitem>
+ </itemizedlist>
<section id="about-pvlan">
<title>About Private VLAN</title>
- <para>In an Ethernet switch, a VLAN is a broadcast domain in which hosts can establish direct
+ <para>In an Ethernet switch, a VLAN is a broadcast domain where hosts can establish direct
communication with each another at Layer 2. Private VLAN is designed as an extension of VLAN
standard to add further segmentation of the logical broadcast domain. A regular VLAN is a
single broadcast domain, whereas a private VLAN partitions a larger VLAN broadcast domain into
smaller sub-domains. A sub-domain is represented by a pair of VLANs: a Primary VLAN and a
- Secondary VLAN. The original VLAN that is being divided into smaller groups is called
- Primary, That implies all VLAN pairs in a private VLAN share the same Primary VLAN. All the
+ Secondary VLAN. The original VLAN that is being divided into smaller groups is called Primary,
+ which implies that all VLAN pairs in a private VLAN share the same Primary VLAN. All the
secondary VLANs exist only inside the Primary. Each Secondary VLAN has a specific VLAN ID
associated to it, which differentiates one sub-domain from another.</para>
<para>For further reading:</para>
@@ -50,6 +72,9 @@
</listitem>
</itemizedlist>
</section>
+ <section id="ability-pvlan">
+ <title>Prerequisites</title>
+ </section>
<section id="prereq-pvlan">
<title>Prerequisites</title>
<para>Ensure that you configure private VLAN on your physical switches out-of-band.</para>
[50/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack into disk_io_throttling
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8b8a0d39
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8b8a0d39
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8b8a0d39
Branch: refs/heads/disk_io_throttling
Commit: 8b8a0d39756027e359386e018e15e15650ff19a0
Parents: 869a6b0 3f3c6aa
Author: Wei Zhou <w....@leaseweb.com>
Authored: Mon Jun 10 19:25:59 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Mon Jun 10 19:25:59 2013 +0200
----------------------------------------------------------------------
.../storage/dao/SnapshotPolicyDaoImpl.java | 1 -
setup/dev/advanced.cfg | 18 +++++++++++++++++
...deploy_vms_with_varied_deploymentplanners.py | 21 ++++++++++++--------
3 files changed, 31 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
[46/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
deployment planners plan per clusters not hosts
Concentration or Dispersion granularity is at the Cluster level and not
at the host level. So correcting the test to ensure
a. concentrated planner puts the VMs in same cluster
b. dispersed planner puts the Vms in diff't clusters
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ef0e0f36
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ef0e0f36
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ef0e0f36
Branch: refs/heads/disk_io_throttling
Commit: ef0e0f36b2e33eb65c2f0a2e99aa02eabf872b85
Parents: 5b48ec2
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 20:38:37 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 20:40:07 2013 +0530
----------------------------------------------------------------------
setup/dev/advanced.cfg | 18 +++++++++++++++++
...deploy_vms_with_varied_deploymentplanners.py | 21 ++++++++++++--------
2 files changed, 31 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef0e0f36/setup/dev/advanced.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/advanced.cfg b/setup/dev/advanced.cfg
index 8335786..3020165 100644
--- a/setup/dev/advanced.cfg
+++ b/setup/dev/advanced.cfg
@@ -99,6 +99,24 @@
"name": "PS1"
}
]
+ },
+ {
+ "clustername": "C1",
+ "hypervisor": "simulator",
+ "hosts": [
+ {
+ "username": "root",
+ "url": "http://sim/c1/h0",
+ "password": "password"
+ }
+ ],
+ "clustertype": "CloudManaged",
+ "primaryStorages": [
+ {
+ "url": "nfs://10.147.28.6:/export/home/sandbox/primary2",
+ "name": "PS2"
+ }
+ ]
}
],
"gateway": "172.16.15.1"
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef0e0f36/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
index 67532c7..f1b3043 100644
--- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
+++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
@@ -16,7 +16,7 @@
# under the License.
from marvin.cloudstackTestCase import cloudstackTestCase
-from marvin.integration.lib.base import Account, VirtualMachine, ServiceOffering
+from marvin.integration.lib.base import Account, VirtualMachine, ServiceOffering, Host
from marvin.integration.lib.common import get_zone, get_domain, get_template, cleanup_resources
from nose.plugins.attrib import attr
@@ -76,6 +76,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
domainid=cls.domain.id
)
cls.services["account"] = cls.account.name
+ cls.hosts = Host.list(cls.apiclient, hypervisortype='Simulator')
cls.cleanup = [
cls.account
]
@@ -177,10 +178,12 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
"Running",
msg="VM is not in Running state"
)
+ vm1clusterid = filter(lambda c: c.id == vm1.hostid, self.hosts)[0].clusterid
+ vm2clusterid = filter(lambda c: c.id == vm2.hostid, self.hosts)[0].clusterid
self.assertNotEqual(
- vm1.hostid,
- vm2.hostid,
- msg="VMs meant to be dispersed are deployed on the same host"
+ vm1clusterid,
+ vm2clusterid,
+ msg="VMs (%s, %s) meant to be dispersed are deployed in the same cluster %s" % (vm1.id, vm2.id, vm1clusterid)
)
@attr(tags=["simulator", "advanced", "basic", "sg"])
@@ -236,10 +239,12 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
"Running",
msg="VM is not in Running state"
)
- self.assertNotEqual(
- vm1.hostid,
- vm2.hostid,
- msg="VMs meant to be concentrated are deployed on the different hosts"
+ vm1clusterid = filter(lambda c: c.id == vm1.hostid, self.hosts)[0].clusterid
+ vm2clusterid = filter(lambda c: c.id == vm2.hostid, self.hosts)[0].clusterid
+ self.assertEqual(
+ vm1clusterid,
+ vm2clusterid,
+ msg="VMs (%s, %s) meant to be concentrated are deployed on different clusters (%s, %s)" % (vm1.id, vm2.id, vm1clusterid, vm2clusterid)
)
@classmethod
[45/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
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.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5b48ec24
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5b48ec24
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5b48ec24
Branch: refs/heads/disk_io_throttling
Commit: 5b48ec24d8d0dd5919d80d396d6f1825dfe5373f
Parents: 50dc67b
Author: Nitin Mehta <ni...@citrix.com>
Authored: Mon Jun 10 20:00:04 2013 +0530
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Mon Jun 10 20:00:16 2013 +0530
----------------------------------------------------------------------
engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b48ec24/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
index 3f894a2..5394a8f 100644
--- a/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
@@ -63,7 +63,6 @@ public class SnapshotPolicyDaoImpl extends GenericDaoBase<SnapshotPolicyVO, Long
public List<SnapshotPolicyVO> listByVolumeId(long volumeId, Filter filter) {
SearchCriteria<SnapshotPolicyVO> sc = VolumeIdSearch.create();
sc.setParameters("volumeId", volumeId);
- sc.setParameters("active", true);
return listBy(sc, filter);
}
[39/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2b20a45
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2b20a45
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2b20a45
Branch: refs/heads/disk_io_throttling
Commit: c2b20a455c9e16838abf1f4fb426e1f12f6b294c
Parents: 8220b98 d8a235e
Author: Wei Zhou <w....@leaseweb.com>
Authored: Mon Jun 10 14:15:52 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Mon Jun 10 14:15:52 2013 +0200
----------------------------------------------------------------------
.../consoleproxy/ConsoleProxyManagerImpl.java | 7 +
.../component/test_vpc_network_pfrules.py | 487 +++++++++----------
2 files changed, 244 insertions(+), 250 deletions(-)
----------------------------------------------------------------------
[02/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2875: allow port 8080 on virtual router so that vm can get password from virtual router
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f61d61db
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f61d61db
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f61d61db
Branch: refs/heads/disk_io_throttling
Commit: f61d61db9490eb28d2feedbef0d329479a66aede
Parents: f4a1a2f
Author: Wei Zhou <w....@leaseweb.com>
Authored: Thu Jun 6 23:05:12 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Thu Jun 6 23:05:12 2013 +0200
----------------------------------------------------------------------
patches/systemvm/debian/config/etc/iptables/iptables-router | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f61d61db/patches/systemvm/debian/config/etc/iptables/iptables-router
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/iptables/iptables-router b/patches/systemvm/debian/config/etc/iptables/iptables-router
index 3f5bc5f..b214e40 100644
--- a/patches/systemvm/debian/config/etc/iptables/iptables-router
+++ b/patches/systemvm/debian/config/etc/iptables/iptables-router
@@ -37,6 +37,7 @@ COMMIT
-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT
-A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT
+-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT
-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT
[30/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
meng's proposal for GSOC2013
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6e245422
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6e245422
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6e245422
Branch: refs/heads/disk_io_throttling
Commit: 6e2454228313c3373bfa96ef623a4b6ceb88d0ee
Parents: c8d607e
Author: kyrameng <me...@ufl.edu>
Authored: Sun Jun 9 19:09:20 2013 -0400
Committer: Sebastien Goasguen <ru...@gmail.com>
Committed: Mon Jun 10 03:00:30 2013 -0400
----------------------------------------------------------------------
docs/en-US/CloudStack_GSoC_Guide.xml | 2 +-
docs/en-US/gsoc-meng.xml | 235 ++++++++++++++++++++++++++++++
2 files changed, 236 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e245422/docs/en-US/CloudStack_GSoC_Guide.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/CloudStack_GSoC_Guide.xml b/docs/en-US/CloudStack_GSoC_Guide.xml
index 243a0ca..1f43593 100644
--- a/docs/en-US/CloudStack_GSoC_Guide.xml
+++ b/docs/en-US/CloudStack_GSoC_Guide.xml
@@ -49,6 +49,6 @@
<xi:include href="gsoc-tuna.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gsoc-imduffy15.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gsoc-dharmesh.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+ <xi:include href="gsoc-meng.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e245422/docs/en-US/gsoc-meng.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/gsoc-meng.xml b/docs/en-US/gsoc-meng.xml
new file mode 100644
index 0000000..1de259d
--- /dev/null
+++ b/docs/en-US/gsoc-meng.xml
@@ -0,0 +1,235 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "CloudStack_GSoC_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<chapter id="gsoc-meng">
+ <title>Meng's 2013 GSoC Proposal</title>
+ <para>This chapter describes Meng's 2013 Google Summer of Code project within the &PRODUCT; ASF project. It is a copy paste of the submitted proposal.</para>
+ <section id="Project-Description">
+ <title>Project Description</title>
+ <para>
+ Getting a hadoop cluster going can be challenging and painful due to the tedious configuration phase and the diverse idiosyncrasies of each cloud provider. Apache Whirr<ulink url="http://whirr.apache.org/ "><citetitle>[1]</citetitle></ulink> and Provisionr is a set of libraries for running cloud services in an automatic or semi-automatic fashion. They take advantage of a cloud-neutral library called jclouds<ulink url=" http://www.jclouds.org/documentation/gettingstarted/what-is-jclouds/"><citetitle>[2]</citetitle></ulink> to create one-click, auto-configuring hadoop clusters on multiple clouds. Since jclouds supports CloudStack API, most of the services provided by Whirr and Provisionr should work out of the box on CloudStack. My first task is to test that assumption, make sure everything is well documented, and correct all issues with the latest version of CloudStack (4.0 and 4.1).
+ </para>
+
+<para>
+The biggest challenge for hadoop provisioning is automatically configuring each instance at launch time based on what it is supposed to do, a process known as contextualization<ulink url="http://dl.acm.org/citation.cfm?id=1488934"><citetitle>[3]</citetitle></ulink><ulink url="http://www.nimbusproject.org/docs/current/clouds/clusters2.html "><citetitle>[4]</citetitle></ulink>. It causes last minute changes inside an instance to adapt to a cluster environment. Many automated cloud services are enabled by contextualization. For example in one-click hadoop clusters, contextualization basically amounts to generating and distributing ssh key pairs among instances, telling an instance where the master node is and what other slave nodes it should be aware of, etc. On EC2 contextualization is done via passing information through the EC2_USER_DATA entry<ulink url="http://aws.amazon.com/amazon-linux-ami/ "><citetitle>[5]</citetitle></ulink><ulink url="https://svn.apache.org/repos/asf/whirr/bra
nches/contrib-python/src/py/hadoop/cloud/data/hadoop-ec2-init-remote.sh"><citetitle>[6]</citetitle></ulink>. Whirr and Provisionr embrace this feature to provision hadoop instances on EC2. My second task is to test and extend Whirr and Provisionr’s one-click solution on EC2 to CloudStack and also improve CloudStack’s support for Whirr and Provisionr to enable hadoop provisioning on CloudStack based clouds.
+</para>
+<para>
+My third task is to add a Query API that is compatible with Amazon Elastic MapReduce (EMR) to CloudStack. Through this API, all hadoop provisioning functionality will be exposed and users can reuse cloud clients that are written for EMR to create and manage hadoop clusters on CloudStack based clouds.
+</para>
+ </section>
+
+ <section id="Project-Details">
+ <title>Project Details</title>
+ <para>
+ Whirr defines four roles for the hadoop provisioning service: Namenode, JobTracker, Datanode and TaskTraker. With the help of CloudInit<ulink url="https://help.ubuntu.com/community/CloudInit "><citetitle>[7]</citetitle></ulink> (a popular package for cloud instance initialization), each VM instance is configured based on its role and a compressed file that is passed in the EC2_USER_DATA entry. Since CloudStack also supports EC2_USER_DATA, I think the most feasible way to have hadoop provisioning on CloudStack is to extend Whirr’s solution on EC2 to CloudStack platform and to make necessary adjustment based on CloudStack’s
+ </para>
+
+ <para>
+ Whirr and Provisionr deal with two critical issues in their role configuration scripts (configure-hadoop-role_list): SSH key authentication and hostname configuration.
+ </para>
+ <orderedlist>
+ <listitem><para>
+ SSH Key Authentication. The need for SSH Key based authentication is required so that the master node can login to slave nodes to start/stop hadoop daemons. Also each node needs to login to itself to start its own hadoop daemons. Traditionally this is done by generating a key pair on the master node and distributing the public key to all slave nodes. This can be only done with human intervention. Whirr works around this problem on EC2 by having a common key pair for all nodes in a hadoop cluster. Thus every node is able to login to one another. The key pair is provided by users and obtained by CloudInit inside an instance from metadata service. As far as I know, Cloudstack does not support user-provided ssh key authentication. Although CloudStack has the createSSHKeyPair API<ulink url="http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html "><citetitle>[8]</citetitle></ulink> to generate SSH keys and users can create an instance
template that supports SSH keys, there is no easy way to have a unified SSH key on all cluster instances. Besides Whirr prefers minimal image management, so having a customized template doesn’t seem quite fit here.
+ </para></listitem>
+ <listitem><para>
+ Hostname configuration. The hostname of each instance has to be properly set and injected into the set of hadoop config files (core-site.xml, hdfs-site.xml, mapred-site.xml ). For an EC2 instance, its host name is converted from a combination of its public IP and an EC2-specific pre/suffix (e.g. an instance with IP 54.224.206.71 will have its hostname set to ec2-54-224-206-71.compute-1.amazonaws.com). This hostname amounts to the Fully Qualified Domain Name that uniquely identifies this node on the network. As for the case of CloudStack, if users do not specify a name the hostname that identifies a VM on a network will be a unique UUID generated by CloudStack<ulink url="https://cwiki.apache.org/CLOUDSTACK/allow-user-provided-hostname-internal-vm-name-on-hypervisor-instead-of-cloud-platform-auto-generated-name-for-guest-vms.html"><citetitle>[9]</citetitle></ulink>.
+
+
+
+ </para></listitem>
+ </orderedlist>
+ <para>
+ These two are the main issues that need support improvement on the CloudStack side. Other things like preparing disks, installing hadoop tarballs and starting hadoop daemons can be easily done as they are relatively role/instance-independent and static. Runurl can be used to simplify user-data scripts.
+
+
+
+ </para>
+ <para>
+ After we achieve hadoop provisioning on CloudStack using Whirr we can go further to add a Query API to CloudStack to expose this functionality. I will write an API that is compatible with Amazon Elastic MapReduce Service (EMR)<ulink url="http://docs.aws.amazon.com/ElasticMapReduce/latest/API/Welcome.html "><citetitle>[10]</citetitle></ulink> so that users can reuse clients that are written for EMR to submit jobs to existing hadoop clusters, poll job status, terminate a hadoop instance and do other things on CloudStack based clouds. There are eight actions<ulink url="http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_Operations.html "><citetitle>[11]</citetitle></ulink> now supported in EMR API. I will try to implement as many as I can during the period of GSoC. The following statements give some examples of the API that I will write.
+ </para>
+ <programlisting><![CDATA[
+ https://elasticmapreduce.cloudstack.com?Action=RunJobFlow &Name=MyJobFlowName &Instances.MasterInstanceType=m1.small &Instances.SlaveInstanceType=m1.small &Instances.InstanceCount=4
+]]></programlisting>
+<para>
+This will launch a new hadoop cluster with four instances using specified instance types and add a job flow to it.
+</para>
+<programlisting><![CDATA[
+https://elasticmapreduce.cloudstack.com?Action=AddJobFlowSteps &JobFlowId=j-3UN6WX5RRO2AG &Steps.member.1.Name=MyStep2 &Steps.member.1.HadoopJarStep.Jar=MyJar
+]]></programlisting>
+<para>
+This will add a step to the existing job flow with ID j-3UN6WX5RRO2AG. This step will run the specified jar file.
+</para>
+<programlisting><![CDATA[
+https://elasticmapreduce.cloudstack.com?Action=DescribeJobFlows &JobFlowIds.member.1=j-3UN6WX5RRO2AG
+]]></programlisting>
+<para>
+This will return the status of the given job flow.
+</para>
+ </section>
+
+ <section id="Roadmap">
+ <title>Roadmap</title>
+
+ <para><emphasis role="bold">Jun. 17 ∼ Jun. 30</emphasis> </para>
+ <orderedlist>
+ <listitem><para>
+ Learn CloudStack and Apache Whirr/Provisionr APIs; Deploy a CloudStack cluster.
+ </para></listitem>
+
+ <listitem><para>
+ Identify how EC2_USER_DATA is passed and executed on each CloudStack instance.
+ </para></listitem>
+ <listitem><para>
+ Figure out how the files passed in EC2_USER_DATA are acted upon by CloudInit.
+ </para></listitem>
+ <listitem><para>
+ Identify files in /etc/init/ that are used or modified by Whirr and Provisionr for hadoop related configuration.
+ </para></listitem>
+ <listitem><para>
+ Deploy a hadoop cluster on CloudStack via Whirr/Provisionr. This is to test what are missing in CloudStack or Whirr/Provisionr in terms of their support for each other.
+ </para></listitem>
+ </orderedlist>
+ <para><emphasis role="bold">Jul. 1∼ Aug. 1</emphasis> </para>
+ <orderedlist>
+ <listitem><para>
+ Write scripts to configure VM hostname on CloudStack with the help of CloudInit;
+ </para></listitem>
+ <listitem><para>
+ Write scripts to distribute SSH keys among CloudStack instances. Add the capability of using user-provided ssh key for authentication to CloudStack.
+ </para></listitem>
+ <listitem><para>
+ Take care of the other things left for hadoop provisioning, such as mounting disks, installing hadoop tarballs, etc.
+ </para></listitem>
+ <listitem><para>
+ Compose files that need to be passed in EC2_USER_DATA to each CloudStack instance . Test these files and write patches to make sure that Whirr/Provisionr can succefully deploy one-click hadoop clusters on CloudStack.
+ </para></listitem>
+ </orderedlist>
+ <para><emphasis role="bold">Aug. 3 ∼ Sep. 8</emphasis> </para>
+ <orderedlist>
+ <listitem><para>
+ Design and build an Elastic Mapreduce API for CloudStack that takes control of hadoop cluster creation and management.
+ </para></listitem>
+ <listitem><para>
+ Implement the eight actions defined in EMR API. This task might take a while.
+ </para></listitem>
+
+ </orderedlist>
+ <para><emphasis role="bold">Sep. 10 ∼ Sep. 23</emphasis> </para>
+ <orderedlist>
+ <listitem><para>
+
+ Code cleaning and documentation wrap up.
+
+ </para></listitem>
+
+ </orderedlist>
+
+
+ </section>
+
+ <section id="Deliverables-meng">
+ <title>Deliverables</title>
+ <orderedlist>
+ <listitem><para>
+
+ Whirr has limited support for CloudStack. Check what’s missing and make sure all steps are properly documented on the Whirr and CloudStack websites.
+ </para></listitem>
+ <listitem><para>
+ Contribute code to CloudStack and and send patches to Whirr/Provisionr if necessary to enable hadoop provisioning on CloudStack via Whirr/Provisionr.
+ </para></listitem>
+ <listitem><para>
+ Build an EMR-compatible API for CloudStack.
+ </para></listitem>
+ </orderedlist>
+ </section>
+ <section id="Nice-to-have">
+ <title>Nice to have</title>
+ <para>In addition to the required deliverables, it’s nice to have the following:</para>
+ <orderedlist>
+ <listitem><para>
+
+ The capability to add and remove hadoop nodes dynamically to enable elastic hadoop clusters on CloudStack.
+
+ </para></listitem>
+ <listitem><para>
+ A review of the existing tools that offer one-click provisioning and make sure that they support CloudStack based clouds.
+ </para></listitem>
+ </orderedlist>
+ </section>
+
+ <section id="References">
+ <title>References</title>
+
+ <orderedlist>
+ <listitem><para>
+
+ http://whirr.apache.org/
+ </para></listitem>
+ <listitem><para>
+ http://www.jclouds.org/documentation/gettingstarted/what-is-jclouds/
+ </para></listitem>
+ <listitem><para>
+ Katarzyna Keahey, Tim Freeman, Contextualization: Providing One-Click Virtual Clusters
+ </para></listitem>
+ <listitem><para>
+ http://www.nimbusproject.org/docs/current/clouds/clusters2.html
+ </para></listitem>
+ <listitem><para>
+ http://aws.amazon.com/amazon-linux-ami/
+ </para></listitem>
+ <listitem><para>
+ https://svn.apache.org/repos/asf/whirr/branches/contrib-python/src/py/hadoop/cloud/data/hadoop-ec2-init-remote.sh
+ </para></listitem>
+ <listitem><para>
+ https://help.ubuntu.com/community/CloudInit
+ </para></listitem>
+ <listitem><para>
+ http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html
+ </para></listitem>
+ <listitem><para>
+ https://cwiki.apache.org/CLOUDSTACK/allow-user-provided-hostname-internal-vm-name-on-hypervisor-instead-of-cloud-platform-auto-generated-name-for-guest-vms.html
+ </para></listitem>
+ <listitem><para>
+http://docs.aws.amazon.com/ElasticMapReduce/latest/API/Welcome.html
+ </para></listitem>
+ <listitem><para>
+ http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_Operations.html
+ </para></listitem>
+ <listitem><para>
+ http://buildacloud.org/blog/235-puppet-and-cloudstack.html
+ </para></listitem>
+ <listitem><para>
+http://chriskleban-internet.blogspot.com/2012/03/build-cloud-cloudstack-instance.html
+ </para></listitem>
+ <listitem><para>
+ http://gehrcke.de/2009/06/aws-about-api/
+ </para></listitem>
+ <listitem><para>
+ Apache_CloudStack-4.0.0-incubating-API_Developers_Guide-en-US.pdf
+ </para></listitem>
+
+ </orderedlist>
+ </section>
+
+</chapter>
[17/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2882: Fix the diskdevice based on hypervisor
KVM > /dev/vda
Xen > /dev/xvdd
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/195e823b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/195e823b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/195e823b
Branch: refs/heads/disk_io_throttling
Commit: 195e823b10c5519f90aefa74a0cb104f0ff57b07
Parents: 5233e32
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Fri Jun 7 16:23:06 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Fri Jun 7 17:08:19 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_vm_life_cycle.py | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/195e823b/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index 8c78149..afe9b8a 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -730,6 +730,15 @@ class TestVMLifeCycle(cloudstackTestCase):
cmd.virtualmachineid = self.virtual_machine.id
self.apiclient.attachIso(cmd)
+ #determine device type from hypervisor
+ hosts = Host.list(self.apiclient, id=self.virtual_machine.hostid)
+ self.assertTrue(isinstance(hosts, list))
+ self.assertTrue(len(hosts) > 0)
+ self.debug("Found %s host" % hosts[0].hypervisor)
+
+ if hosts[0].hypervisor.lower() == "kvm":
+ self.services["diskdevice"] = "/dev/vda"
+
try:
ssh_client = self.virtual_machine.get_ssh_client()
except Exception as e:
[23/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Remove vm from cleanup list
VM will be cleaned up when the account is cleaned up
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c30d9be3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c30d9be3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c30d9be3
Branch: refs/heads/disk_io_throttling
Commit: c30d9be3cea30339cfff40c1002906634291b373
Parents: cb80ae2
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Sat Jun 8 13:27:08 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Sat Jun 8 13:27:08 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_routers.py | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c30d9be3/test/integration/smoke/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py
index f6ca279..d89acf9 100644
--- a/test/integration/smoke/test_routers.py
+++ b/test/integration/smoke/test_routers.py
@@ -107,7 +107,6 @@ class TestRouterServices(cloudstackTestCase):
serviceofferingid=cls.service_offering.id
)
cls.cleanup = [
- cls.vm_1,
cls.account,
cls.service_offering
]
[49/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-1301: VM Disk I/O Throttling on Bps/IOps
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/869a6b0c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/869a6b0c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/869a6b0c
Branch: refs/heads/disk_io_throttling
Commit: 869a6b0ce305b70c4be72bd5d03866310c4313cc
Parents: 080bb76
Author: Wei Zhou <w....@leaseweb.com>
Authored: Mon Jun 10 19:25:49 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Mon Jun 10 19:25:49 2013 +0200
----------------------------------------------------------------------
api/src/com/cloud/agent/api/to/VolumeTO.java | 45 +++--
api/src/com/cloud/offering/DiskOffering.java | 22 ++-
api/src/com/cloud/vm/DiskProfile.java | 44 +++--
.../org/apache/cloudstack/api/ApiConstants.java | 4 +
.../admin/offering/CreateDiskOfferingCmd.java | 33 +++-
.../offering/CreateServiceOfferingCmd.java | 30 +++-
.../api/response/DiskOfferingResponse.java | 34 ++--
.../api/response/ServiceOfferingResponse.java | 32 +++-
.../cloudstack/api/response/VolumeResponse.java | 46 +++++-
.../classes/resources/messages.properties | 6 +-
.../cloud/agent/api/AttachVolumeCommand.java | 44 +++--
.../src/com/cloud/storage/DiskOfferingVO.java | 44 +++--
.../kvm/resource/LibvirtComputingResource.java | 34 ++--
.../kvm/resource/LibvirtDomainXMLParser.java | 26 ++-
.../hypervisor/kvm/resource/LibvirtVMDef.java | 39 +++--
.../api/query/dao/DiskOfferingJoinDaoImpl.java | 7 +-
.../query/dao/ServiceOfferingJoinDaoImpl.java | 6 +-
.../cloud/api/query/dao/VolumeJoinDaoImpl.java | 7 +-
.../cloud/api/query/vo/DiskOfferingJoinVO.java | 45 +++--
.../api/query/vo/ServiceOfferingJoinVO.java | 45 +++--
.../com/cloud/api/query/vo/VolumeJoinVO.java | 45 +++--
server/src/com/cloud/configuration/Config.java | 6 +-
.../configuration/ConfigurationManager.java | 14 +-
.../configuration/ConfigurationManagerImpl.java | 43 +++--
.../src/com/cloud/storage/StorageManager.java | 8 +-
.../com/cloud/storage/StorageManagerImpl.java | 67 ++++++--
.../com/cloud/storage/VolumeManagerImpl.java | 67 ++++++--
server/src/com/cloud/test/DatabaseConfig.java | 34 +++-
.../cloud/vpc/MockConfigurationManagerImpl.java | 6 +-
setup/db/db/schema-410to420.sql | 38 +++--
ui/dictionary.jsp | 6 +-
ui/scripts/configuration.js | 163 +++++++++++++++----
32 files changed, 808 insertions(+), 282 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/com/cloud/agent/api/to/VolumeTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/VolumeTO.java b/api/src/com/cloud/agent/api/to/VolumeTO.java
index 8b3a6be..b95aa1d 100644
--- a/api/src/com/cloud/agent/api/to/VolumeTO.java
+++ b/api/src/com/cloud/agent/api/to/VolumeTO.java
@@ -37,8 +37,10 @@ public class VolumeTO implements InternalIdentity {
private long deviceId;
private String chainInfo;
private String guestOsType;
- private long bytesRate;
- private long iopsRate;
+ private long bytesReadRate;
+ private long bytesWriteRate;
+ private long iopsReadRate;
+ private long iopsWriteRate;
public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo) {
this.id = id;
@@ -136,19 +138,36 @@ public class VolumeTO implements InternalIdentity {
return new StringBuilder("Vol[").append(id).append("|").append(type).append("|").append(path).append("|").append(size).append("]").toString();
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
-
- public long getBytesRate() {
- return bytesRate;
+
+ public long getBytesReadRate() {
+ return bytesReadRate;
}
-
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
}
-
- public long getIopsRate() {
- return iopsRate;
+
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
+ }
+
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
}
+
+ public long getIopsReadRate() {
+ return iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
+ }
+
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/com/cloud/offering/DiskOffering.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/offering/DiskOffering.java b/api/src/com/cloud/offering/DiskOffering.java
index 1618db9..0c119fc 100644
--- a/api/src/com/cloud/offering/DiskOffering.java
+++ b/api/src/com/cloud/offering/DiskOffering.java
@@ -53,11 +53,19 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
void setDiskSize(long diskSize);
- void setBytesRate(long bytesRate);
-
- long getBytesRate();
-
- void setIopsRate(long iopsRate);
-
- long getIopsRate();
+ void setBytesReadRate(long bytesReadRate);
+
+ long getBytesReadRate();
+
+ void setBytesWriteRate(long bytesWriteRate);
+
+ long getBytesWriteRate();
+
+ void setIopsReadRate(long iopsReadRate);
+
+ long getIopsReadRate();
+
+ void setIopsWriteRate(long iopsWriteRate);
+
+ long getIopsWriteRate();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/com/cloud/vm/DiskProfile.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/DiskProfile.java b/api/src/com/cloud/vm/DiskProfile.java
index 2c77006..90fb71e 100644
--- a/api/src/com/cloud/vm/DiskProfile.java
+++ b/api/src/com/cloud/vm/DiskProfile.java
@@ -35,8 +35,10 @@ public class DiskProfile {
private Long templateId;
private long volumeId;
private String path;
- private long bytesRate;
- private long iopsRate;
+ private long bytesReadRate;
+ private long bytesWriteRate;
+ private long iopsReadRate;
+ private long iopsWriteRate;
private HypervisorType hyperType;
@@ -157,19 +159,35 @@ public class DiskProfile {
this.size = size;
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
-
- public long getBytesRate() {
- return bytesRate;
+
+ public long getBytesReadRate() {
+ return bytesReadRate;
}
-
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
}
-
- public long getIopsRate() {
- return iopsRate;
+
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
+ }
+
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
+ }
+
+ public long getIopsReadRate() {
+ return iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
+ }
+
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index ab1402c..1704ca3 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -31,6 +31,8 @@ public class ApiConstants {
public static final String BOOTABLE = "bootable";
public static final String BIND_DN = "binddn";
public static final String BIND_PASSWORD = "bindpass";
+ public static final String BYTES_READ_RATE = "bytesreadrate";
+ public static final String BYTES_WRITE_RATE = "byteswriterate";
public static final String CATEGORY = "category";
public static final String CERTIFICATE = "certificate";
public static final String PRIVATE_KEY = "privatekey";
@@ -104,6 +106,8 @@ public class ApiConstants {
public static final String INTERNAL_DNS1 = "internaldns1";
public static final String INTERNAL_DNS2 = "internaldns2";
public static final String INTERVAL_TYPE = "intervaltype";
+ public static final String IOPS_READ_RATE = "iopsreadrate";
+ public static final String IOPS_WRITE_RATE = "iopswriterate";
public static final String IP_ADDRESS = "ipaddress";
public static final String IP6_ADDRESS = "ip6address";
public static final String IP_ADDRESS_ID = "ipaddressid";
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
index 848d158..47ec365 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
@@ -62,11 +62,17 @@ public class CreateDiskOfferingCmd extends BaseCmd {
@Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, description="the storage type of the disk offering. Values are local and shared.")
private String storageType = ServiceOffering.StorageType.shared.toString();
- @Parameter(name="bytesRate", type=CommandType.LONG, required=false, description="bytes rate of the disk offering")
- private Long bytesRate;
+ @Parameter(name=ApiConstants.BYTES_READ_RATE, type=CommandType.LONG, required=false, description="bytes read rate of the disk offering")
+ private Long bytesReadRate;
- @Parameter(name="iopsRate", type=CommandType.LONG, required=false, description="io requests rate of the disk offering")
- private Long iopsRate;
+ @Parameter(name=ApiConstants.BYTES_WRITE_RATE, type=CommandType.LONG, required=false, description="bytes write rate of the disk offering")
+ private Long bytesWriteRate;
+
+ @Parameter(name=ApiConstants.IOPS_READ_RATE, type=CommandType.LONG, required=false, description="io requests read rate of the disk offering")
+ private Long iopsReadRate;
+
+ @Parameter(name=ApiConstants.IOPS_WRITE_RATE, type=CommandType.LONG, required=false, description="io requests write rate of the disk offering")
+ private Long iopsWriteRate;
@Parameter(name=ApiConstants.DISPLAY_OFFERING, type=CommandType.BOOLEAN, description="an optional field, whether to display the offering to the end user or not.")
private Boolean displayOffering;
@@ -99,12 +105,21 @@ public class CreateDiskOfferingCmd extends BaseCmd {
return domainId;
}
- public Long getBytesRate() {
- return bytesRate;
+ public long getBytesReadRate() {
+ return bytesReadRate;
+ //return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : bytesReadRate;
}
-
- public Long getIopsRate() {
- return iopsRate;
+
+ public long getBytesWriteRate() {
+ return (bytesWriteRate == null) || (bytesWriteRate < 0) ? 0 : bytesWriteRate;
+ }
+
+ public long getIopsReadRate() {
+ return (iopsReadRate == null) || (iopsReadRate < 0) ? 0 : iopsReadRate;
+ }
+
+ public long getIopsWriteRate() {
+ return (iopsWriteRate == null) || (iopsWriteRate < 0) ? 0 : iopsWriteRate;
}
public String getStorageType() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
index 28f1a68..6efac46 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
@@ -93,11 +93,17 @@ public class CreateServiceOfferingCmd extends BaseCmd {
@Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description = "details for planner, used to store specific parameters")
private Map<String, String> details;
- @Parameter(name="bytesRate", type=CommandType.LONG, required=false, description="bytes rate of the disk offering")
- private Long bytesRate;
+ @Parameter(name=ApiConstants.BYTES_READ_RATE, type=CommandType.LONG, required=false, description="bytes read rate of the disk offering")
+ private Long bytesReadRate;
- @Parameter(name="iopsRate", type=CommandType.LONG, required=false, description="io requests rate of the disk offering")
- private Long iopsRate;
+ @Parameter(name=ApiConstants.BYTES_WRITE_RATE, type=CommandType.LONG, required=false, description="bytes write rate of the disk offering")
+ private Long bytesWriteRate;
+
+ @Parameter(name=ApiConstants.IOPS_READ_RATE, type=CommandType.LONG, required=false, description="io requests read rate of the disk offering")
+ private Long iopsReadRate;
+
+ @Parameter(name=ApiConstants.IOPS_WRITE_RATE, type=CommandType.LONG, required=false, description="io requests write rate of the disk offering")
+ private Long iopsWriteRate;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
@@ -177,12 +183,20 @@ public class CreateServiceOfferingCmd extends BaseCmd {
return params;
}
- public long getBytesRate() {
- return bytesRate;
+ public long getBytesReadRate() {
+ return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : bytesReadRate;
+ }
+
+ public long getBytesWriteRate() {
+ return (bytesWriteRate == null) || (bytesWriteRate < 0) ? 0 : bytesWriteRate;
+ }
+
+ public long getIopsReadRate() {
+ return (iopsReadRate == null) || (iopsReadRate < 0) ? 0 : iopsReadRate;
}
- public long getIopsRate() {
- return iopsRate;
+ public long getIopsWriteRate() {
+ return (iopsWriteRate == null) || (iopsWriteRate < 0) ? 0 : iopsWriteRate;
}
/////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
index 8d4bec3..9cd2918 100644
--- a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
@@ -58,11 +58,17 @@ public class DiskOfferingResponse extends BaseResponse {
@SerializedName("storagetype") @Param(description="the storage type for this disk offering")
private String storageType;
- @SerializedName("diskBytesRate") @Param(description="bytes rate of the disk offering")
- private Long bytesRate;
+ @SerializedName("diskBytesReadRate") @Param(description="bytes read rate of the disk offering")
+ private Long bytesReadRate;
- @SerializedName("diskIORate") @Param(description="io requests rate of the disk offering")
- private Long iopsRate;
+ @SerializedName("diskBytesWriteRate") @Param(description="bytes write rate of the disk offering")
+ private Long bytesWriteRate;
+
+ @SerializedName("diskIopsReadRate") @Param(description="io requests read rate of the disk offering")
+ private Long iopsReadRate;
+
+ @SerializedName("diskIopsWriteRate") @Param(description="io requests write rate of the disk offering")
+ private Long iopsWriteRate;
@SerializedName("displayoffering") @Param(description="whether to display the offering to the end user or not.")
private Boolean displayOffering;
@@ -155,12 +161,20 @@ public class DiskOfferingResponse extends BaseResponse {
public void setStorageType(String storageType) {
this.storageType = storageType;
}
-
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
-
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
+ }
+
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
}
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
index b98fd4d..a56e91a 100644
--- a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
@@ -87,11 +87,17 @@ public class ServiceOfferingResponse extends BaseResponse {
@SerializedName(ApiConstants.NETWORKRATE) @Param(description="data transfer rate in megabits per second allowed.")
private Integer networkRate;
- @SerializedName("diskBytesRate") @Param(description="bytes rate of the service offering")
- private Long bytesRate;
+ @SerializedName("diskBytesReadRate") @Param(description="bytes read rate of the service offering")
+ private Long bytesReadRate;
- @SerializedName("diskIORate") @Param(description="io requests rate of the service offering")
- private Long iopsRate;
+ @SerializedName("diskBytesWriteRate") @Param(description="bytes write rate of the service offering")
+ private Long bytesWriteRate;
+
+ @SerializedName("diskIopsReadRate") @Param(description="io requests read rate of the service offering")
+ private Long iopsReadRate;
+
+ @SerializedName("diskIopsWriteRate") @Param(description="io requests write rate of the service offering")
+ private Long iopsWriteRate;
@SerializedName(ApiConstants.DEPLOYMENT_PLANNER) @Param(description="deployment strategy used to deploy VM.")
private String deploymentPlanner;
@@ -255,11 +261,19 @@ public class ServiceOfferingResponse extends BaseResponse {
this.isVolatile = isVolatile;
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
-
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
+ }
+
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
index 8e38d85..dab5b3e 100644
--- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
@@ -110,11 +110,17 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
@Param(description = "shared or local storage")
private String storageType;
- @SerializedName("diskBytesRate") @Param(description="bytes rate of the disk offering")
- private Long bytesRate;
+ @SerializedName("diskBytesReadRate") @Param(description="bytes read rate of the disk volume")
+ private Long bytesReadRate;
- @SerializedName("diskIORate") @Param(description="io requests rate of the disk offering")
- private Long iopsRate;
+ @SerializedName("diskBytesWriteRate") @Param(description="bytes write rate of the disk volume")
+ private Long bytesWriteRate;
+
+ @SerializedName("diskIopsReadRate") @Param(description="io requests read rate of the disk volume")
+ private Long iopsReadRate;
+
+ @SerializedName("diskIopsWriteRate") @Param(description="io requests write rate of the disk volume")
+ private Long iopsWriteRate;
@SerializedName(ApiConstants.HYPERVISOR)
@Param(description = "Hypervisor the volume belongs to")
@@ -264,12 +270,36 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
this.storageType = storageType;
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
+ }
+
+ public long getBytesReadRate() {
+ return bytesReadRate;
+ }
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
+ }
+
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
+ }
+
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
+ }
+
+ public long getIopsReadRate() {
+ return iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
}
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
}
public void setHypervisor(String hypervisor) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index d0ead0e..a0a36c8 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -466,8 +466,10 @@ label.disable.vpn=Disable VPN
label.disabled=Disabled
label.disabling.vpn.access=Disabling VPN Access
label.disk.allocated=Disk Allocated
-label.disk.bytes.rate=Disk Rate (BPS)
-label.disk.iops.rate=Disk Rate (IOPS)
+label.disk.bytes.read.rate=Disk Read Rate (BPS)
+label.disk.bytes.write.rate=Disk Write Rate (BPS)
+label.disk.iops.read.rate=Disk Read Rate (IOPS)
+label.disk.iops.write.rate=Disk Write Rate (IOPS)
label.disk.offering=Disk Offering
label.disk.read.bytes=Disk Read (Bytes)
label.disk.read.io=Disk Read (IO)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/core/src/com/cloud/agent/api/AttachVolumeCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/AttachVolumeCommand.java b/core/src/com/cloud/agent/api/AttachVolumeCommand.java
index 101c254..74480cc 100644
--- a/core/src/com/cloud/agent/api/AttachVolumeCommand.java
+++ b/core/src/com/cloud/agent/api/AttachVolumeCommand.java
@@ -29,8 +29,10 @@ public class AttachVolumeCommand extends Command {
String volumeName;
Long deviceId;
String chainInfo;
- long bytesRate;
- long iopsRate;
+ long bytesReadRate;
+ long bytesWriteRate;
+ long iopsReadRate;
+ long iopsWriteRate;
protected AttachVolumeCommand() {
}
@@ -99,19 +101,35 @@ public class AttachVolumeCommand extends Command {
return chainInfo;
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
-
- public long getBytesRate() {
- return bytesRate;
+
+ public long getBytesReadRate() {
+ return bytesReadRate;
}
-
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
}
-
- public long getIopsRate() {
- return iopsRate;
+
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
+ }
+
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
+ }
+
+ public long getIopsReadRate() {
+ return iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
+ }
+
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
index 239ddb0..16e11af 100755
--- a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
+++ b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
@@ -100,12 +100,17 @@ public class DiskOfferingVO implements DiskOffering {
@Column(name="sort_key")
int sortKey;
- @Column(name="bytes_rate")
- long bytesRate;
+ @Column(name="bytes_read_rate")
+ long bytesReadRate;
- @Column(name="iops_rate")
- long iopsRate;
+ @Column(name="bytes_write_rate")
+ long bytesWriteRate;
+ @Column(name="iops_read_rate")
+ long iopsReadRate;
+
+ @Column(name="iops_write_rate")
+ long iopsWriteRate;
@Column(name="display_offering")
boolean displayOffering;
@@ -335,20 +340,35 @@ public class DiskOfferingVO implements DiskOffering {
this.displayOffering = displayOffering;
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
+ }
+
+ public long getBytesReadRate() {
+ return bytesReadRate;
+ }
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
+ }
+
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
}
- public long getBytesRate() {
- return bytesRate;
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
}
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+ public long getIopsReadRate() {
+ return iopsReadRate;
}
- public long getIopsRate() {
- return iopsRate;
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
}
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 05882d4..690c15f 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -1411,8 +1411,10 @@ ServerResource {
VolumeTO volume = new VolumeTO(cmd.getVolumeId(), dskch.getType(),
pool.getType(), pool.getUuid(), pool.getPath(),
vol.getName(), vol.getName(), disksize, null);
- volume.setBytesRate(dskch.getBytesRate());
- volume.setIopsRate(dskch.getIopsRate());
+ volume.setBytesReadRate(dskch.getBytesReadRate());
+ volume.setBytesWriteRate(dskch.getBytesWriteRate());
+ volume.setIopsReadRate(dskch.getIopsReadRate());
+ volume.setIopsWriteRate(dskch.getIopsWriteRate());
return new CreateAnswer(cmd, volume);
} catch (CloudRuntimeException e) {
s_logger.debug("Failed to create volume: " + e.toString());
@@ -2628,7 +2630,7 @@ ServerResource {
cmd.getPoolUuid());
KVMPhysicalDisk disk = primary.getPhysicalDisk(cmd.getVolumePath());
attachOrDetachDisk(conn, cmd.getAttach(), cmd.getVmName(), disk,
- cmd.getDeviceId().intValue(), cmd.getBytesRate(), cmd.getIopsRate());
+ cmd.getDeviceId().intValue(), cmd.getBytesReadRate(), cmd.getBytesWriteRate(), cmd.getIopsReadRate(), cmd.getIopsWriteRate());
} catch (LibvirtException e) {
return new AttachVolumeAnswer(cmd, e.toString());
} catch (InternalErrorException e) {
@@ -3497,10 +3499,14 @@ ServerResource {
}
- if (volume.getBytesRate() > 0)
- disk.setBytesRate(volume.getBytesRate());
- if (volume.getIopsRate() > 0)
- disk.setIopsRate(volume.getIopsRate());
+ if (volume.getBytesReadRate() > 0)
+ disk.setBytesReadRate(volume.getBytesReadRate());
+ if (volume.getBytesWriteRate() > 0)
+ disk.setBytesWriteRate(volume.getBytesWriteRate());
+ if (volume.getIopsReadRate() > 0)
+ disk.setIopsReadRate(volume.getIopsReadRate());
+ if (volume.getIopsWriteRate() > 0)
+ disk.setIopsWriteRate(volume.getIopsWriteRate());
vm.getDevices().addDevice(disk);
}
@@ -3635,7 +3641,7 @@ ServerResource {
protected synchronized String attachOrDetachDisk(Connect conn,
boolean attach, String vmName, KVMPhysicalDisk attachingDisk,
- int devId, long bytesRate, long iopsRate) throws LibvirtException, InternalErrorException {
+ int devId, long bytesReadRate, long bytesWriteRate, long iopsReadRate, long iopsWriteRate) throws LibvirtException, InternalErrorException {
List<DiskDef> disks = null;
Domain dm = null;
DiskDef diskdef = null;
@@ -3675,10 +3681,14 @@ ServerResource {
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId,
DiskDef.diskBus.VIRTIO);
}
- if (bytesRate > 0)
- diskdef.setBytesRate(bytesRate);
- if (iopsRate > 0)
- diskdef.setIopsRate(iopsRate);
+ if (bytesReadRate > 0)
+ diskdef.setBytesReadRate(bytesReadRate);
+ if (bytesWriteRate > 0)
+ diskdef.setBytesWriteRate(bytesWriteRate);
+ if (iopsReadRate > 0)
+ diskdef.setIopsReadRate(iopsReadRate);
+ if (iopsWriteRate > 0)
+ diskdef.setIopsWriteRate(iopsWriteRate);
}
String xml = diskdef.toString();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
index cccdc39..c364cd4 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
@@ -108,15 +108,25 @@ public class LibvirtDomainXMLParser {
NodeList iotune = disk.getElementsByTagName("iotune");
if ((iotune != null) && (iotune.getLength() !=0)) {
- String bytesRateStr = getTagValue("total_bytes_sec", (Element)iotune.item(0));
- if (bytesRateStr != null) {
- Long bytesRate = Long.parseLong(bytesRateStr);
- def.setBytesRate(bytesRate);
+ String bytesReadRateStr = getTagValue("read_bytes_sec", (Element)iotune.item(0));
+ if (bytesReadRateStr != null) {
+ Long bytesReadRate = Long.parseLong(bytesReadRateStr);
+ def.setBytesReadRate(bytesReadRate);
}
- String iopsRateStr = getTagValue("total_iops_sec", (Element)iotune.item(0));
- if (iopsRateStr != null) {
- Long iopsRate = Long.parseLong(iopsRateStr);
- def.setIopsRate(iopsRate);
+ String bytesWriteRateStr = getTagValue("write_bytes_sec", (Element)iotune.item(0));
+ if (bytesWriteRateStr != null) {
+ Long bytesWriteRate = Long.parseLong(bytesWriteRateStr);
+ def.setBytesWriteRate(bytesWriteRate);
+ }
+ String iopsReadRateStr = getTagValue("read_iops_sec", (Element)iotune.item(0));
+ if (iopsReadRateStr != null) {
+ Long iopsReadRate = Long.parseLong(iopsReadRateStr);
+ def.setIopsReadRate(iopsReadRate);
+ }
+ String iopsWriteRateStr = getTagValue("write_iops_sec", (Element)iotune.item(0));
+ if (iopsWriteRateStr != null) {
+ Long iopsWriteRate = Long.parseLong(iopsWriteRateStr);
+ def.setIopsWriteRate(iopsWriteRate);
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
index 2959821..a347fee 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
@@ -441,8 +441,10 @@ public class LibvirtVMDef {
private boolean _readonly = false;
private boolean _shareable = false;
private boolean _deferAttach = false;
- private Long _bytesRate;
- private Long _iopsRate;
+ private Long _bytesReadRate;
+ private Long _bytesWriteRate;
+ private Long _iopsReadRate;
+ private Long _iopsWriteRate;
public void setDeviceType(deviceType deviceType) {
_deviceType = deviceType;
@@ -588,12 +590,20 @@ public class LibvirtVMDef {
return suffix - 'a';
}
- public void setBytesRate(Long bytesRate) {
- _bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ _bytesReadRate = bytesReadRate;
}
-
- public void setIopsRate(Long iopsRate) {
- _iopsRate = iopsRate;
+
+ public void setBytesWriteRate(long bytesWriteRate) {
+ _bytesWriteRate = bytesWriteRate;
+ }
+
+ public void setIopsReadRate(long iopsReadRate) {
+ _iopsReadRate = iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ _iopsWriteRate = iopsWriteRate;
}
@Override
@@ -643,7 +653,8 @@ public class LibvirtVMDef {
String libvirtVersion = Script.runSimpleBashScript("virsh version |grep API | awk '{print $4}'");
String qemuVersion = Script.runSimpleBashScript("virsh version |grep hypervisor | awk '{print $4}'");
if ((_deviceType != deviceType.CDROM) && (libvirtVersion != null) && (qemuVersion != null)
- && (((_bytesRate != null) && (_bytesRate > 0)) || ((_iopsRate != null) && (_iopsRate > 0)))) { // not CDROM, from libvirt 0.9.8 and QEMU 1.1.0
+ && (((_bytesReadRate != null) && (_bytesReadRate > 0)) || ((_bytesWriteRate != null) && (_bytesWriteRate > 0))
+ || ((_iopsReadRate != null) && (_iopsReadRate > 0)) || ((_iopsWriteRate != null) && (_iopsWriteRate > 0)) )) { // not CDROM, from libvirt 0.9.8 and QEMU 1.1.0
String[] libvirtVersions = libvirtVersion.split("\\.");
String[] qemuVersions = qemuVersion.split("\\.");
if (((libvirtVersions != null) && (libvirtVersions.length == 3) && ((Integer.valueOf(libvirtVersions[0]) > 0)
@@ -653,10 +664,14 @@ public class LibvirtVMDef {
|| ((Integer.valueOf(qemuVersions[0]) == 1) && (Integer.valueOf(qemuVersions[1]) > 1))
|| ((Integer.valueOf(qemuVersions[0]) == 1) && (Integer.valueOf(qemuVersions[1]) == 1) && (Integer.valueOf(qemuVersions[1]) >= 0))))) {
diskBuilder.append("<iotune>\n");
- if ((_bytesRate != null) && (_bytesRate > 0))
- diskBuilder.append("<total_bytes_sec>" + _bytesRate + "</total_bytes_sec>\n");
- if ((_iopsRate != null) && (_iopsRate > 0))
- diskBuilder.append("<total_iops_sec>" + _iopsRate + "</total_iops_sec>\n");
+ if ((_bytesReadRate != null) && (_bytesReadRate > 0))
+ diskBuilder.append("<read_bytes_sec>" + _bytesReadRate + "</read_bytes_sec>\n");
+ if ((_bytesWriteRate != null) && (_bytesWriteRate > 0))
+ diskBuilder.append("<write_bytes_sec>" + _bytesWriteRate + "</write_bytes_sec>\n");
+ if ((_iopsReadRate != null) && (_iopsReadRate > 0))
+ diskBuilder.append("<read_iops_sec>" + _iopsReadRate + "</read_iops_sec>\n");
+ if ((_iopsWriteRate != null) && (_iopsWriteRate > 0))
+ diskBuilder.append("<write_iops_sec>" + _iopsWriteRate + "</write_iops_sec>\n");
diskBuilder.append("</iotune>\n");
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java
index bfae58b..7022ee6 100644
--- a/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java
@@ -75,9 +75,12 @@ public class DiskOfferingJoinDaoImpl extends GenericDaoBase<DiskOfferingJoinVO,
diskOfferingResponse.setTags(offering.getTags());
diskOfferingResponse.setCustomized(offering.isCustomized());
diskOfferingResponse.setStorageType(offering.isUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString());
+ diskOfferingResponse.setBytesReadRate(offering.getBytesReadRate());
+ diskOfferingResponse.setBytesWriteRate(offering.getBytesWriteRate());
+ diskOfferingResponse.setIopsReadRate(offering.getIopsReadRate());
+ diskOfferingResponse.setIopsWriteRate(offering.getIopsWriteRate());
diskOfferingResponse.setObjectName("diskoffering");
- diskOfferingResponse.setBytesRate(offering.getBytesRate());
- diskOfferingResponse.setIopsRate(offering.getIopsRate());
+
return diskOfferingResponse;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
index ec67175..6f6e277 100644
--- a/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
@@ -75,9 +75,11 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase<ServiceOfferingJo
offeringResponse.setNetworkRate(offering.getRateMbps());
offeringResponse.setHostTag(offering.getHostTag());
offeringResponse.setDeploymentPlanner(offering.getDeploymentPlanner());
+ offeringResponse.setBytesReadRate(offering.getBytesReadRate());
+ offeringResponse.setBytesWriteRate(offering.getBytesWriteRate());
+ offeringResponse.setIopsReadRate(offering.getIopsReadRate());
+ offeringResponse.setIopsWriteRate(offering.getIopsWriteRate());
offeringResponse.setObjectName("serviceoffering");
- offeringResponse.setBytesRate(offering.getBytesRate());
- offeringResponse.setIopsRate(offering.getIopsRate());
return offeringResponse;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
index e65f78a..453e82e 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -160,8 +160,11 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
}
volResponse.setStorageType(volume.isUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared
.toString());
- volResponse.setBytesRate(volume.getBytesRate());
- volResponse.setIopsRate(volume.getIopsRate());
+ volResponse.setBytesReadRate(volume.getBytesReadRate());
+ volResponse.setBytesWriteRate(volume.getBytesReadRate());
+ volResponse.setIopsReadRate(volume.getIopsWriteRate());
+ volResponse.setIopsWriteRate(volume.getIopsWriteRate());
+
}
Long poolId = volume.getPoolId();
String poolName = (poolId == null) ? "none" : volume.getPoolName();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java b/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java
index c44c171..baebc48 100644
--- a/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java
@@ -64,11 +64,17 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
@Column(name="sort_key")
int sortKey;
- @Column(name="bytes_rate")
- long bytesRate;
+ @Column(name="bytes_read_rate")
+ long bytesReadRate;
- @Column(name="iops_rate")
- long iopsRate;
+ @Column(name="bytes_write_rate")
+ long bytesWriteRate;
+
+ @Column(name="iops_read_rate")
+ long iopsReadRate;
+
+ @Column(name="iops_write_rate")
+ long iopsWriteRate;
@Column(name="type")
Type type;
@@ -245,21 +251,36 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
this.type = type;
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
- public long getBytesRate() {
- return bytesRate;
+ public long getBytesReadRate() {
+ return bytesReadRate;
}
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
}
- public long getIopsRate() {
- return iopsRate;
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
}
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
+ }
+
+ public long getIopsReadRate() {
+ return iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
+ }
+
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java b/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
index 89c665e..4011c6a 100644
--- a/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
@@ -90,11 +90,17 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
@Column(name="sort_key")
int sortKey;
- @Column(name="bytes_rate")
- long bytesRate;
+ @Column(name="bytes_read_rate")
+ long bytesReadRate;
- @Column(name="iops_rate")
- long iopsRate;
+ @Column(name="bytes_write_rate")
+ long bytesWriteRate;
+
+ @Column(name="iops_read_rate")
+ long iopsReadRate;
+
+ @Column(name="iops_write_rate")
+ long iopsWriteRate;
@Column(name=GenericDao.CREATED_COLUMN)
private Date created;
@@ -334,20 +340,35 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
this.volatileVm = volatileVm;
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
- public long getBytesRate() {
- return bytesRate;
+ public long getBytesReadRate() {
+ return bytesReadRate;
}
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
}
- public long getIopsRate() {
- return iopsRate;
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
}
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
+ }
+
+ public long getIopsReadRate() {
+ return iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
+ }
+
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
index 5831659..7aeb0b3 100644
--- a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
@@ -184,11 +184,17 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
@Column(name="use_local_storage")
private boolean useLocalStorage;
- @Column(name="bytes_rate")
- long bytesRate;
+ @Column(name="bytes_read_rate")
+ long bytesReadRate;
- @Column(name="iops_rate")
- long iopsRate;
+ @Column(name="bytes_write_rate")
+ long bytesWriteRate;
+
+ @Column(name="iops_read_rate")
+ long iopsReadRate;
+
+ @Column(name="iops_write_rate")
+ long iopsWriteRate;
@Column(name="pool_id")
private long poolId;
@@ -748,22 +754,37 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
}
- public void setBytesRate(long bytesRate) {
- this.bytesRate = bytesRate;
+ public void setBytesReadRate(long bytesReadRate) {
+ this.bytesReadRate = bytesReadRate;
}
- public long getBytesRate() {
- return bytesRate;
+ public long getBytesReadRate() {
+ return bytesReadRate;
}
- public void setIopsRate(long iopsRate) {
- this.iopsRate = iopsRate;
+ public void setBytesWriteRate(long bytesWriteRate) {
+ this.bytesWriteRate = bytesWriteRate;
}
- public long getIopsRate() {
- return iopsRate;
+ public long getBytesWriteRate() {
+ return bytesWriteRate;
}
+ public void setIopsReadRate(long iopsReadRate) {
+ this.iopsReadRate = iopsReadRate;
+ }
+
+ public long getIopsReadRate() {
+ return iopsReadRate;
+ }
+
+ public void setIopsWriteRate(long iopsWriteRate) {
+ this.iopsWriteRate = iopsWriteRate;
+ }
+
+ public long getIopsWriteRate() {
+ return iopsWriteRate;
+ }
public long getPoolId() {
return poolId;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index d822ae2..7a2127a 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -232,8 +232,10 @@ public enum Config {
VmDiskStatsInterval("Advanced", ManagementServer.class, Integer.class, "vm.disk.stats.interval", "0", "Interval (in seconds) to report vm disk statistics.", null),
VmTransitionWaitInterval("Advanced", ManagementServer.class, Integer.class, "vm.tranisition.wait.interval", "3600", "Time (in seconds) to wait before taking over a VM in transition state", null),
VmDestroyForcestop("Advanced", ManagementServer.class, Boolean.class, "vm.destroy.forcestop", "false", "On destroy, force-stop takes this value ", null),
- VmDiskThrottlingIORate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.iops_rate", "0", "Default disk I/O rate in requests per second allowed in User vm's disk.", null),
- VmDiskThrottlingBytesRate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.bytes_rate", "0", "Default disk I/O rate in bytes per second allowed in User vm's disk.", null),
+ VmDiskThrottlingIopsReadRate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.iops_read_rate", "0", "Default disk I/O read rate in requests per second allowed in User vm's disk.", null),
+ VmDiskThrottlingIopsWriteRate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.iops_write_rate", "0", "Default disk I/O writerate in requests per second allowed in User vm's disk.", null),
+ VmDiskThrottlingBytesReadRate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.bytes_read_rate", "0", "Default disk I/O read rate in bytes per second allowed in User vm's disk.", null),
+ VmDiskThrottlingBytesWriteRate("Advanced", ManagementServer.class, Integer.class, "vm.disk.throttling.bytes_write_rate", "0", "Default disk I/O writerate in bytes per second allowed in User vm's disk.", null),
ControlCidr("Advanced", ManagementServer.class, String.class, "control.cidr", "169.254.0.0/16", "Changes the cidr for the control network traffic. Defaults to using link local. Must be unique within pods", null),
ControlGateway("Advanced", ManagementServer.class, String.class, "control.gateway", "169.254.0.1", "gateway for the control network traffic", null),
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/configuration/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManager.java b/server/src/com/cloud/configuration/ConfigurationManager.java
index 975fad1..93cadfa 100755
--- a/server/src/com/cloud/configuration/ConfigurationManager.java
+++ b/server/src/com/cloud/configuration/ConfigurationManager.java
@@ -81,10 +81,15 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
* @param useVirtualNetwork
* @param deploymentPlanner
* @param details
+ * @param bytesReadRate
+ * @param bytesWriteRate
+ * @param iopsReadRate
+ * @param iopsWriteRate
* @return ID
*/
ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vm_typeType, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired,
- boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details, Long bytesRate, Long iopsRate);
+ boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details,
+ Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate);
/**
* Creates a new disk offering
@@ -97,9 +102,14 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
* @param isCustomized
* @param localStorageRequired
* @param isDisplayOfferingEnabled
+ * @param bytesReadRate
+ * @param bytesWriteRate
+ * @param iopsReadRate
+ * @param iopsWriteRate
* @return newly created disk offering
*/
- DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled, Long bytesRate, Long iopsRate);
+ DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled,
+ Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate);
/**
* Creates a new pod
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 0bfd286..e5dbf3a 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -2032,7 +2032,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
cpuNumber.intValue(), memory.intValue(), cpuSpeed.intValue(), cmd.getDisplayText(),
localStorageRequired, offerHA, limitCpuUse, volatileVm, cmd.getTags(), cmd.getDomainId(),
cmd.getHostTag(), cmd.getNetworkRate(), cmd.getDeploymentPlanner(), cmd.getDetails(),
- cmd.getBytesRate(), cmd.getIopsRate());
+ cmd.getBytesReadRate(), cmd.getBytesWriteRate(), cmd.getIopsReadRate(), cmd.getIopsWriteRate());
}
@Override
@@ -2040,15 +2040,19 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
public ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vm_type,
String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired,
boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag,
- Integer networkRate, String deploymentPlanner, Map<String, String> details, Long bytesRate, Long iopsRate) {
+ Integer networkRate, String deploymentPlanner, Map<String, String> details, Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) {
tags = cleanupTags(tags);
ServiceOfferingVO offering = new ServiceOfferingVO(name, cpu, ramSize, speed, networkRate, null, offerHA, limitResourceUse, volatileVm, displayText, localStorageRequired, false, tags, isSystem, vm_type,
domainId, hostTag, deploymentPlanner);
- if ((bytesRate != null) && (bytesRate > 0))
- offering.setBytesRate(bytesRate);
- if ((iopsRate != null) && (iopsRate > 0))
- offering.setIopsRate(iopsRate);
+ if (bytesReadRate != null && (bytesReadRate > 0))
+ offering.setBytesReadRate(bytesReadRate);
+ if (bytesWriteRate != null && (bytesWriteRate > 0))
+ offering.setBytesWriteRate(bytesWriteRate);
+ if (iopsReadRate != null && (iopsReadRate > 0))
+ offering.setIopsReadRate(iopsReadRate);
+ if (iopsWriteRate != null && (iopsWriteRate > 0))
+ offering.setIopsWriteRate(iopsWriteRate);
if ((offering = _serviceOfferingDao.persist(offering)) != null) {
if (details != null) {
@@ -2135,7 +2139,8 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
@Override
@ActionEvent(eventType = EventTypes.EVENT_DISK_OFFERING_CREATE, eventDescription = "creating disk offering")
- public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled, Long bytesRate, Long iopsRate) {
+ public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled,
+ Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) {
long diskSize = 0;// special case for custom disk offerings
if (numGibibytes != null && (numGibibytes <= 0)) {
throw new InvalidParameterValueException("Please specify a disk size of at least 1 Gb.");
@@ -2155,10 +2160,18 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
DiskOfferingVO newDiskOffering = new DiskOfferingVO(domainId, name, description, diskSize, tags, isCustomized);
newDiskOffering.setUseLocalStorage(localStorageRequired);
newDiskOffering.setDisplayOffering(isDisplayOfferingEnabled);
- if (bytesRate != null && (bytesRate > 0))
- newDiskOffering.setBytesRate(bytesRate);
- if (iopsRate != null && (iopsRate > 0))
- newDiskOffering.setIopsRate(iopsRate);
+
+ if (bytesReadRate != null && (bytesReadRate > 0))
+ newDiskOffering.setBytesReadRate(bytesReadRate);
+ if (bytesWriteRate != null && (bytesWriteRate > 0))
+ newDiskOffering.setBytesWriteRate(bytesWriteRate);
+ if (iopsReadRate != null && (iopsReadRate > 0))
+ newDiskOffering.setIopsReadRate(iopsReadRate);
+ if (iopsWriteRate != null && (iopsWriteRate > 0))
+ newDiskOffering.setIopsWriteRate(iopsWriteRate);
+ s_logger.warn("bytesReadRate =" + bytesReadRate);
+ s_logger.warn("newDiskOffering.getBytesReadRate" + newDiskOffering.getBytesReadRate());
+
UserContext.current().setEventDetails("Disk offering id=" + newDiskOffering.getId());
DiskOfferingVO offering = _diskOfferingDao.persist(newDiskOffering);
if (offering != null) {
@@ -2199,9 +2212,11 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
}
}
- Long bytesRate = cmd.getBytesRate();
- Long iopsRate = cmd.getIopsRate();
- return createDiskOffering(domainId, name, description, numGibibytes, tags, isCustomized, localStorageRequired, isDisplayOfferingEnabled, bytesRate, iopsRate);
+ Long bytesReadRate = cmd.getBytesReadRate();
+ Long bytesWriteRate = cmd.getBytesWriteRate();
+ Long iopsReadRate = cmd.getIopsReadRate();
+ Long iopsWriteRate = cmd.getIopsWriteRate();
+ return createDiskOffering(domainId, name, description, numGibibytes, tags, isCustomized, localStorageRequired, isDisplayOfferingEnabled, bytesReadRate, bytesWriteRate, iopsReadRate, iopsWriteRate);
}
@Override
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/storage/StorageManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManager.java b/server/src/com/cloud/storage/StorageManager.java
index 7f5b3ff..29c7ebc 100755
--- a/server/src/com/cloud/storage/StorageManager.java
+++ b/server/src/com/cloud/storage/StorageManager.java
@@ -125,7 +125,11 @@ public interface StorageManager extends StorageService {
BigDecimal getStorageOverProvisioningFactor(Long dcId);
- Long getDiskBytesRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering);
+ Long getDiskBytesReadRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering);
- Long getDiskIORate(ServiceOfferingVO offering, DiskOfferingVO diskOffering);
+ Long getDiskBytesWriteRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering);
+
+ Long getDiskIopsReadRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering);
+
+ Long getDiskIopsWriteRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index cdfc19a..b905d9e 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -1885,36 +1885,67 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
return null;
}
- // get bytesRate from disk_offering and vm.disk.throttling.bytes_rate
+ // get bytesReadRate from service_offering, disk_offering and vm.disk.throttling.bytes_read_rate
@Override
- public Long getDiskBytesRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) {
- if ((offering != null) && (offering.getBytesRate() > 0)) {
- return offering.getBytesRate();
- } else if ((diskOffering != null) && (diskOffering.getBytesRate() > 0)) {
- return diskOffering.getBytesRate();
+ public Long getDiskBytesReadRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) {
+ if ((offering != null) && (offering.getBytesReadRate() > 0)) {
+ return offering.getBytesReadRate();
+ } else if ((diskOffering != null) && (diskOffering.getBytesReadRate() > 0)) {
+ return diskOffering.getBytesReadRate();
} else {
- Long bytesRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingBytesRate.key()));
- if (bytesRate > 0) {
- return bytesRate;
+ Long bytesReadRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingBytesReadRate.key()));
+ if ((bytesReadRate > 0) && ((offering == null) || (! offering.getSystemUse()))) {
+ return bytesReadRate;
}
}
return 0L;
}
- // get iopsRate from disk_offering and vm.disk.throttling.io_rate
+ // get bytesWriteRate from service_offering, disk_offering and vm.disk.throttling.bytes_write_rate
@Override
- public Long getDiskIORate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) {
- if ((offering != null) && (offering.getIopsRate() > 0)) {
- return offering.getIopsRate();
- } else if ((diskOffering != null) && (diskOffering.getIopsRate() > 0)) {
- return diskOffering.getIopsRate();
+ public Long getDiskBytesWriteRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) {
+ if ((offering != null) && (offering.getBytesWriteRate() > 0)) {
+ return offering.getBytesWriteRate();
+ } else if ((diskOffering != null) && (diskOffering.getBytesWriteRate() > 0)) {
+ return diskOffering.getBytesWriteRate();
} else {
- Long iopsRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingIORate.key()));
- if (iopsRate > 0) {
- return iopsRate;
+ Long bytesWriteRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingBytesWriteRate.key()));
+ if ((bytesWriteRate > 0) && ((offering == null) || (! offering.getSystemUse()))) {
+ return bytesWriteRate;
}
}
return 0L;
}
+ // get iopsReadRate from service_offering, disk_offering and vm.disk.throttling.iops_read_rate
+ @Override
+ public Long getDiskIopsReadRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) {
+ if ((offering != null) && (offering.getIopsReadRate() > 0)) {
+ return offering.getIopsReadRate();
+ } else if ((diskOffering != null) && (diskOffering.getIopsReadRate() > 0)) {
+ return diskOffering.getIopsReadRate();
+ } else {
+ Long iopsReadRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingIopsReadRate.key()));
+ if ((iopsReadRate > 0) && ((offering == null) || (! offering.getSystemUse()))) {
+ return iopsReadRate;
+ }
+ }
+ return 0L;
+ }
+
+ // get iopsWriteRate from service_offering, disk_offering and vm.disk.throttling.iops_write_rate
+ @Override
+ public Long getDiskIopsWriteRate(ServiceOfferingVO offering, DiskOfferingVO diskOffering) {
+ if ((offering != null) && (offering.getIopsWriteRate() > 0)) {
+ return offering.getIopsWriteRate();
+ } else if ((diskOffering != null) && (diskOffering.getIopsWriteRate() > 0)) {
+ return diskOffering.getIopsWriteRate();
+ } else {
+ Long iopsWriteRate = Long.parseLong(_configDao.getValue(Config.VmDiskThrottlingIopsWriteRate.key()));
+ if ((iopsWriteRate > 0) && ((offering == null) || (! offering.getSystemUse()))) {
+ return iopsWriteRate;
+ }
+ }
+ return 0L;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 63f3254..f3c94ab 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -337,8 +337,10 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
diskOffering.getUseLocalStorage(),
diskOffering.isRecreatable(), null);
dskCh.setHyperType(dataDiskHyperType);
- dskCh.setBytesRate(storageMgr.getDiskBytesRate(null, diskOffering));
- dskCh.setIopsRate(storageMgr.getDiskIORate(null, diskOffering));
+ dskCh.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ dskCh.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ dskCh.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ dskCh.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
DataCenterVO destPoolDataCenter = _dcDao.findById(destPoolDcId);
HostPodVO destPoolPod = _podDao.findById(destPoolPodId);
@@ -515,8 +517,10 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
DataCenterVO dc = _dcDao.findById(volume.getDataCenterId());
DiskProfile dskCh = new DiskProfile(volume, diskOffering,
snapshot.getHypervisorType());
- dskCh.setBytesRate(storageMgr.getDiskBytesRate(null, diskOffering));
- dskCh.setIopsRate(storageMgr.getDiskIORate(null, diskOffering));
+ dskCh.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ dskCh.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ dskCh.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ dskCh.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
// Determine what pod to store the volume in
while ((pod = _resourceMgr.findPod(null, null, dc, account.getId(),
@@ -617,8 +621,11 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
DiskProfile dskCh = createDiskCharacteristics(volume, template, dc,
diskOffering);
dskCh.setHyperType(vm.getHypervisorType());
- dskCh.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering));
- dskCh.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering));
+ dskCh.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ dskCh.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ dskCh.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ dskCh.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
+
// Find a suitable storage to create volume on
StoragePool destPool = storageMgr.findStoragePool(dskCh, dc, pod,
clusterId, null, vm, avoidPools);
@@ -657,15 +664,21 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
if (volume.getVolumeType() == Type.ROOT
&& Storage.ImageFormat.ISO != template.getFormat()) {
dskCh = createDiskCharacteristics(volume, template, dc, offering);
+ dskCh.setBytesReadRate(storageMgr.getDiskBytesReadRate(offering, diskOffering));
+ dskCh.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(offering, diskOffering));
+ dskCh.setIopsReadRate(storageMgr.getDiskIopsReadRate(offering, diskOffering));
+ dskCh.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(offering, diskOffering));
} else {
dskCh = createDiskCharacteristics(volume, template, dc,
diskOffering);
+ dskCh.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ dskCh.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ dskCh.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ dskCh.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
}
dskCh.setHyperType(hyperType);
- dskCh.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering));
- dskCh.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering));
-
+
final HashSet<StoragePool> avoidPools = new HashSet<StoragePool>(
avoids);
@@ -1555,6 +1568,11 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
volume.getFolder(), volume.getPath(), volume.getName(),
deviceId, volume.getChainInfo());
cmd.setPoolUuid(volumePool.getUuid());
+ DiskOfferingVO diskOffering = _diskOfferingDao.findById(volume.getDiskOfferingId());
+ cmd.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ cmd.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ cmd.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ cmd.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
try {
answer = (AttachVolumeAnswer) _agentMgr.send(hostId, cmd);
@@ -1915,6 +1933,11 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
StoragePoolVO volumePool = _storagePoolDao.findById(volume
.getPoolId());
cmd.setPoolUuid(volumePool.getUuid());
+ DiskOfferingVO diskOffering = _diskOfferingDao.findById(volume.getDiskOfferingId());
+ cmd.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ cmd.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ cmd.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ cmd.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
// Collect vm disk statistics from host before stopping Vm
_userVmMgr.collectVmDiskStatistics(vm);
@@ -2245,8 +2268,17 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
ServiceOfferingVO offering = _offeringDao.findById(vm.getServiceOfferingId());
DiskOfferingVO diskOffering = _diskOfferingDao.findById(vol.getDiskOfferingId());
VolumeTO newVolume = new VolumeTO(vol, pool);
- newVolume.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering));
- newVolume.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering));
+ if (vol.getVolumeType() == Type.ROOT) {
+ newVolume.setBytesReadRate(storageMgr.getDiskBytesReadRate(offering, diskOffering));
+ newVolume.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(offering, diskOffering));
+ newVolume.setIopsReadRate(storageMgr.getDiskIopsReadRate(offering, diskOffering));
+ newVolume.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(offering, diskOffering));
+ } else {
+ newVolume.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ newVolume.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ newVolume.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ newVolume.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
+ }
vm.addDisk(newVolume);
}
@@ -2480,8 +2512,17 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
ServiceOfferingVO offering = _offeringDao.findById(vm.getServiceOfferingId());
DiskOfferingVO diskOffering = _diskOfferingDao.findById(vol.getDiskOfferingId());
VolumeTO newVolume = new VolumeTO(vol, pool);
- newVolume.setBytesRate(storageMgr.getDiskBytesRate(offering, diskOffering));
- newVolume.setIopsRate(storageMgr.getDiskIORate(offering, diskOffering));
+ if (vol.getVolumeType() == Type.ROOT) {
+ newVolume.setBytesReadRate(storageMgr.getDiskBytesReadRate(offering, diskOffering));
+ newVolume.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(offering, diskOffering));
+ newVolume.setIopsReadRate(storageMgr.getDiskIopsReadRate(offering, diskOffering));
+ newVolume.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(offering, diskOffering));
+ } else {
+ newVolume.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering));
+ newVolume.setBytesWriteRate(storageMgr.getDiskBytesWriteRate(null, diskOffering));
+ newVolume.setIopsReadRate(storageMgr.getDiskIopsReadRate(null, diskOffering));
+ newVolume.setIopsWriteRate(storageMgr.getDiskIopsWriteRate(null, diskOffering));
+ }
vm.addDisk(newVolume);
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/src/com/cloud/test/DatabaseConfig.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/test/DatabaseConfig.java b/server/src/com/cloud/test/DatabaseConfig.java
index 16829f8..54e41f4 100755
--- a/server/src/com/cloud/test/DatabaseConfig.java
+++ b/server/src/com/cloud/test/DatabaseConfig.java
@@ -918,6 +918,20 @@ public class DatabaseConfig {
}
ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, ha, displayText, useLocalStorage, false, null, false, null, false);
+
+ Long bytesReadRate = Long.parseLong(_currentObjectParams.get("bytesReadRate"));
+ if (bytesReadRate != null && (bytesReadRate > 0))
+ serviceOffering.setBytesReadRate(bytesReadRate);
+ Long bytesWriteRate = Long.parseLong(_currentObjectParams.get("bytesWriteRate"));
+ if (bytesWriteRate != null && (bytesWriteRate > 0))
+ serviceOffering.setBytesWriteRate(bytesWriteRate);
+ Long iopsReadRate = Long.parseLong(_currentObjectParams.get("iopsReadRate"));
+ if (iopsReadRate != null && (iopsReadRate > 0))
+ serviceOffering.setIopsReadRate(iopsReadRate);
+ Long iopsWriteRate = Long.parseLong(_currentObjectParams.get("iopsWriteRate"));
+ if (iopsWriteRate != null && (iopsWriteRate > 0))
+ serviceOffering.setIopsWriteRate(iopsWriteRate);
+
ServiceOfferingDaoImpl dao = ComponentContext.inject(ServiceOfferingDaoImpl.class);
try {
dao.persist(serviceOffering);
@@ -967,12 +981,20 @@ public class DatabaseConfig {
}
DiskOfferingVO diskOffering = new DiskOfferingVO(domainId, name, displayText, diskSpace , tags, false);
diskOffering.setUseLocalStorage(local);
- Long bytesRate = Long.parseLong(_currentObjectParams.get("bytesRate"));
- if (bytesRate != null && (bytesRate > 0))
- diskOffering.setBytesRate(bytesRate);
- Long iopsRate = Long.parseLong(_currentObjectParams.get("iopsRate"));
- if (iopsRate != null && (iopsRate > 0))
- diskOffering.setIopsRate(iopsRate);
+
+ Long bytesReadRate = Long.parseLong(_currentObjectParams.get("bytesReadRate"));
+ if (bytesReadRate != null && (bytesReadRate > 0))
+ diskOffering.setBytesReadRate(bytesReadRate);
+ Long bytesWriteRate = Long.parseLong(_currentObjectParams.get("bytesWriteRate"));
+ if (bytesWriteRate != null && (bytesWriteRate > 0))
+ diskOffering.setBytesWriteRate(bytesWriteRate);
+ Long iopsReadRate = Long.parseLong(_currentObjectParams.get("iopsReadRate"));
+ if (iopsReadRate != null && (iopsReadRate > 0))
+ diskOffering.setIopsReadRate(iopsReadRate);
+ Long iopsWriteRate = Long.parseLong(_currentObjectParams.get("iopsWriteRate"));
+ if (iopsWriteRate != null && (iopsWriteRate > 0))
+ diskOffering.setIopsWriteRate(iopsWriteRate);
+
DiskOfferingDaoImpl offering = ComponentContext.inject(DiskOfferingDaoImpl.class);
try {
offering.persist(diskOffering);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
index 686040b..6e3d187 100755
--- a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
@@ -489,7 +489,8 @@ public class MockConfigurationManagerImpl extends ManagerBase implements Configu
*/
@Override
public ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, Type vm_typeType, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, boolean offerHA,
- boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details, Long bytesRate, Long iopsRate) {
+ boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map<String, String> details,
+ Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) {
// TODO Auto-generated method stub
return null;
}
@@ -654,7 +655,8 @@ public class MockConfigurationManagerImpl extends ManagerBase implements Configu
* @see com.cloud.configuration.ConfigurationManager#createDiskOffering(java.lang.Long, java.lang.String, java.lang.String, java.lang.Long, java.lang.String, boolean, boolean, boolean)
*/
@Override
- public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled, Long bytesRate, Long iopsRate) {
+ public DiskOfferingVO createDiskOffering(Long domainId, String name, String description, Long numGibibytes, String tags, boolean isCustomized, boolean localStorageRequired, boolean isDisplayOfferingEnabled,
+ Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) {
// TODO Auto-generated method stub
return null;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index a59cf1c..2e52296 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -290,9 +290,13 @@ ALTER TABLE `cloud`.`nics` ADD COLUMN `display_nic` tinyint(1) NOT NULL DEFAULT
ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `display_offering` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Should disk offering be displayed to the end user';
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `bytes_rate` bigint(20) unsigned DEFAULT 0;
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `bytes_read_rate` bigint(20) unsigned DEFAULT 0;
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `iops_rate` bigint(20) unsigned DEFAULT 0;
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `bytes_write_rate` bigint(20) unsigned DEFAULT 0;
+
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `iops_read_rate` bigint(20) unsigned DEFAULT 0;
+
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `iops_write_rate` bigint(20) unsigned DEFAULT 0;
CREATE TABLE `cloud`.`volume_details` (
`id` bigint unsigned NOT NULL auto_increment,
@@ -766,8 +770,10 @@ CREATE VIEW `cloud`.`volume_view` AS
disk_offering.display_text disk_offering_display_text,
disk_offering.use_local_storage,
disk_offering.system_use,
- disk_offering.bytes_rate,
- disk_offering.iops_rate,
+ disk_offering.bytes_read_rate,
+ disk_offering.bytes_write_rate,
+ disk_offering.iops_read_rate,
+ disk_offering.iops_write_rate,
storage_pool.id pool_id,
storage_pool.uuid pool_uuid,
storage_pool.name pool_name,
@@ -1076,8 +1082,10 @@ CREATE VIEW `cloud`.`service_offering_view` AS
disk_offering.removed,
disk_offering.use_local_storage,
disk_offering.system_use,
- disk_offering.bytes_rate,
- disk_offering.iops_rate,
+ disk_offering.bytes_read_rate,
+ disk_offering.bytes_write_rate,
+ disk_offering.iops_read_rate,
+ disk_offering.iops_write_rate,
service_offering.cpu,
service_offering.speed,
service_offering.ram_size,
@@ -1384,8 +1392,10 @@ CREATE VIEW `cloud`.`disk_offering_view` AS
disk_offering.removed,
disk_offering.use_local_storage,
disk_offering.system_use,
- disk_offering.bytes_rate,
- disk_offering.iops_rate,
+ disk_offering.bytes_read_rate,
+ disk_offering.bytes_write_rate,
+ disk_offering.iops_read_rate,
+ disk_offering.iops_write_rate,
disk_offering.sort_key,
disk_offering.type,
disk_offering.display_offering,
@@ -1626,8 +1636,10 @@ CREATE VIEW `cloud`.`volume_view` AS
disk_offering.display_text disk_offering_display_text,
disk_offering.use_local_storage,
disk_offering.system_use,
- disk_offering.bytes_rate,
- disk_offering.iops_rate,
+ disk_offering.bytes_read_rate,
+ disk_offering.bytes_write_rate,
+ disk_offering.iops_read_rate,
+ disk_offering.iops_write_rate,
storage_pool.id pool_id,
storage_pool.uuid pool_uuid,
storage_pool.name pool_name,
@@ -1858,8 +1870,10 @@ CREATE TABLE `cloud_usage`.`usage_vm_disk` (
) ENGINE=InnoDB CHARSET=utf8;
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.disk.stats.interval', 0, 'Interval (in seconds) to report vm disk statistics.');
-INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.disk.throttling.iops_rate', 0, 'Default disk I/O rate in requests per second allowed in User vm\'s disk. ');
-INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.disk.throttling.bytes_rate', 0, 'Default disk I/O rate in bytes per second allowed in User vm\'s disk. ');
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.disk.throttling.iops_read_rate', 0, 'Default disk I/O read rate in requests per second allowed in User vm\'s disk. ');
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.disk.throttling.iops_write_rate', 0, 'Default disk I/O write rate in requests per second allowed in User vm\'s disk. ');
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.disk.throttling.bytes_read_rate', 0, 'Default disk I/O read rate in bytes per second allowed in User vm\'s disk. ');
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.disk.throttling.bytes_write_rate', 0, 'Default disk I/O write rate in bytes per second allowed in User vm\'s disk. ');
-- Re-enable foreign key checking, at the end of the upgrade path
SET foreign_key_checks = 1;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index dd24aa2..7809cdb 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -472,8 +472,10 @@ dictionary = {
'label.disable.vpn': '<fmt:message key="label.disable.vpn" />',
'label.disabling.vpn.access': '<fmt:message key="label.disabling.vpn.access" />',
'label.disk.allocated': '<fmt:message key="label.disk.allocated" />',
-'label.disk.bytes.rate': '<fmt:message key="label.disk.bytes.rate" />',
-'label.disk.iops.rate': '<fmt:message key="label.disk.iops.rate" />',
+'label.disk.bytes.read.rate': '<fmt:message key="label.disk.bytes.read.rate" />',
+'label.disk.bytes.write.rate': '<fmt:message key="label.disk.bytes.write.rate" />',
+'label.disk.iops.write.rate': '<fmt:message key="label.disk.iops.write.rate" />',
+'label.disk.iops.read.rate': '<fmt:message key="label.disk.iops.read.rate" />',
'label.disk.read.bytes': '<fmt:message key="label.disk.read.bytes" />',
'label.disk.read.io': '<fmt:message key="label.disk.read.io" />',
'label.disk.offering': '<fmt:message key="label.disk.offering" />',
[34/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Fixes to test_vpc_lifecycle
- Removing redundant creation of VPC offerings
- Removing cleanup based on configurations.GC should happen by default
- Speed up the run by not waiting for complete gc.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4a99f475
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4a99f475
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4a99f475
Branch: refs/heads/disk_io_throttling
Commit: 4a99f4758136b2e824cc5e6be4aa0cd74c826d6c
Parents: 6607b1e
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 15:40:52 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 15:41:56 2013 +0530
----------------------------------------------------------------------
.../component/test_vpc_vm_life_cycle.py | 80 ++------------------
1 file changed, 6 insertions(+), 74 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a99f475/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index 1fd2724..e198c79 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -212,11 +212,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
cls.api_client,
cls.services["service_offering"]
)
- cls.vpc_off = VpcOffering.create(
- cls.api_client,
- cls.services["vpc_offering"]
- )
- cls.vpc_off.update(cls.api_client, state='Enabled')
cls.account = Account.create(
cls.api_client,
@@ -268,18 +263,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
)
# Enable Network offering
cls.nw_off_no_lb.update(cls.api_client, state='Enabled')
-
- # Creating network using the network offering created
- cls.network_2 = Network.create(
- cls.api_client,
- cls.services["network"],
- accountid=cls.account.name,
- domainid=cls.account.domainid,
- networkofferingid=cls.nw_off_no_lb.id,
- zoneid=cls.zone.id,
- gateway='10.1.2.1',
- vpcid=cls.vpc.id
- )
# Spawn an instance in that network
cls.vm_1 = VirtualMachine.create(
cls.api_client,
@@ -289,7 +272,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
serviceofferingid=cls.service_offering.id,
networkids=[str(cls.network_1.id)]
)
- # Spawn an instance in that network
cls.vm_2 = VirtualMachine.create(
cls.api_client,
cls.services["virtual_machine"],
@@ -298,15 +280,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
serviceofferingid=cls.service_offering.id,
networkids=[str(cls.network_1.id)]
)
- cls.vm_3 = VirtualMachine.create(
- cls.api_client,
- cls.services["virtual_machine"],
- accountid=cls.account.name,
- domainid=cls.account.domainid,
- serviceofferingid=cls.service_offering.id,
- networkids=[str(cls.network_2.id)]
- )
-
cls.public_ip_1 = PublicIPAddress.create(
cls.api_client,
accountid=cls.account.name,
@@ -370,20 +343,15 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
cls.service_offering,
cls.nw_off,
cls.nw_off_no_lb,
+ cls.account
]
return
@classmethod
def tearDownClass(cls):
try:
- cls.account.delete(cls.api_client)
- wait_for_cleanup(cls.api_client, ["account.cleanup.interval"])
#Cleanup resources used
cleanup_resources(cls.api_client, cls._cleanup)
-
- # Waiting for network cleanup to delete vpc offering
- wait_for_cleanup(cls.api_client, ["network.gc.wait", "network.gc.interval"])
- cls.vpc_off.delete(cls.api_client)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@@ -398,10 +366,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
try:
#Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup)
- wait_for_cleanup(self.apiclient, [
- "network.gc.interval",
- "network.gc.wait"])
-
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@@ -1106,16 +1070,14 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
cls.service_offering,
cls.nw_off,
cls.shared_nw_off,
- cls.vpc_off
+ cls.vpc_off,
+ cls.account
]
return
@classmethod
def tearDownClass(cls):
try:
- cls.account.delete(cls.api_client)
- wait_for_cleanup(cls.api_client, ["account.cleanup.interval"])
- #Cleanup resources used
cleanup_resources(cls.api_client, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
@@ -1129,12 +1091,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
def tearDown(self):
try:
- #Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup)
- wait_for_cleanup(self.apiclient, [
- "network.gc.interval",
- "network.gc.wait"])
-
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@@ -1822,16 +1779,14 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
cls.service_offering,
cls.nw_off,
cls.nw_off_no_lb,
- cls.vpc_off
+ cls.vpc_off,
+ cls.account
]
return
@classmethod
def tearDownClass(cls):
try:
- cls.account.delete(cls.api_client)
- wait_for_cleanup(cls.api_client, ["account.cleanup.interval"])
- #Cleanup resources used
cleanup_resources(cls.api_client, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
@@ -1847,10 +1802,6 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
try:
#Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup)
- wait_for_cleanup(self.apiclient, [
- "network.gc.interval",
- "network.gc.wait"])
-
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@@ -2088,11 +2039,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
cls.api_client,
cls.services["service_offering"]
)
- cls.vpc_off = VpcOffering.create(
- cls.api_client,
- cls.services["vpc_offering"]
- )
- cls.vpc_off.update(cls.api_client, state='Enabled')
cls.account = Account.create(
cls.api_client,
@@ -2246,21 +2192,14 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
cls.service_offering,
cls.nw_off,
cls.nw_off_no_lb,
+ cls.account
]
return
@classmethod
def tearDownClass(cls):
try:
- cls.account.delete(cls.api_client)
- wait_for_cleanup(cls.api_client, ["account.cleanup.interval"])
- #Cleanup resources used
cleanup_resources(cls.api_client, cls._cleanup)
-
- # Waiting for network cleanup to delete vpc offering
- wait_for_cleanup(cls.api_client, ["network.gc.wait",
- "network.gc.interval"])
- cls.vpc_off.delete(cls.api_client)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@@ -2289,10 +2228,6 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
try:
#Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup)
- wait_for_cleanup(self.apiclient, [
- "network.gc.interval",
- "network.gc.wait"])
-
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@@ -2806,6 +2741,3 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
"List LB rules should not return anything"
)
return
-
-
-
[03/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-747: Internal LB detailView - Assigned VMs tab - Assign VMs action - Select VM view - refresh assignedVMs data by API call when popping up Select VM view.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/55417858
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/55417858
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/55417858
Branch: refs/heads/disk_io_throttling
Commit: 554178582709e51ef934fa2684b281e83f3a3ed5
Parents: f61d61d
Author: Jessica Wang <je...@apache.org>
Authored: Thu Jun 6 16:04:31 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Jun 6 16:07:49 2013 -0700
----------------------------------------------------------------------
ui/scripts/vpc.js | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/55417858/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index a087baa..399699d 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -651,7 +651,21 @@
listView: $.extend(true, {}, cloudStack.sections.instances.listView, {
type: 'checkbox',
filters: false,
- dataProvider: function(args) {
+ dataProvider: function(args) {
+ var assignedInstances;
+ $.ajax({
+ url: createURL('listLoadBalancers'),
+ data: {
+ id: args.context.internalLoadBalancers[0].id
+ },
+ async: false,
+ success: function(json) {
+ assignedInstances = json.listloadbalancerssresponse.loadbalancer[0].loadbalancerinstance;
+ if(assignedInstances == null)
+ assignedInstances = [];
+ }
+ });
+
$.ajax({
url: createURL('listVirtualMachines'),
data: {
@@ -663,11 +677,9 @@
// Pre-select existing instances in LB rule
$(instances).map(function(index, instance) {
- instance._isSelected = $.grep(
- args.context.internalLoadBalancers[0].loadbalancerinstance,
-
- function(lbInstance) {
- return lbInstance.id == instance.id;
+ instance._isSelected = $.grep(assignedInstances,
+ function(assignedInstance) {
+ return assignedInstance.id == instance.id;
}
).length ? true : false;
});
[14/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-869:Netscaler support as an external LB provider:front end
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bcc5baa1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bcc5baa1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bcc5baa1
Branch: refs/heads/disk_io_throttling
Commit: bcc5baa1636037baa8c5ffbd3bbf70df8af4d024
Parents: e17a0c2
Author: Pranav Saxena <pr...@citrix.com>
Authored: Fri Jun 7 16:23:44 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Fri Jun 7 16:23:44 2013 +0530
----------------------------------------------------------------------
ui/scripts/network.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bcc5baa1/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 050b75c..a3e239b 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4531,7 +4531,21 @@
networkdomain: {
docID: 'helpVPCDomain',
label: 'label.DNS.domain.for.guest.networks'
+ },
+
+ loadbalancer:{ //Support for Netscaler as an external device for load balancing
+ label:'Load Balancer',
+ select:function(args){
+
+ var items = [];
+ items.push({id:'vpcvirtualrouter' , description:'VPC Virtual Router'});
+ items.push({id:'netscaler' , description:'NetScaler'});
+
+ args.response.success({data:items});
}
+
+ }
+
}
},
action: function(args) {
[24/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2912 - adding cd command to rpm build instructions
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/91edeb49
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/91edeb49
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/91edeb49
Branch: refs/heads/disk_io_throttling
Commit: 91edeb49dde411d0e0ec2ea0975c4e254b5bab91
Parents: c30d9be
Author: Ron Wheeler <rw...@artifact-software.com>
Authored: Sun Jun 9 19:31:02 2013 -0400
Committer: David Nalley <da...@gnsa.us>
Committed: Sun Jun 9 19:33:44 2013 -0400
----------------------------------------------------------------------
docs/en-US/build-rpm.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91edeb49/docs/en-US/build-rpm.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/build-rpm.xml b/docs/en-US/build-rpm.xml
index 7caf924..100a06f 100644
--- a/docs/en-US/build-rpm.xml
+++ b/docs/en-US/build-rpm.xml
@@ -48,6 +48,7 @@ under the License.
<section id="generating-rpms">
<title>Generating RPMS</title>
<para>Now that we have the prerequisites and source, you will cd to the <filename>packaging/centos63/</filename> directory.</para>
+ <programlisting><prompt>$</prompt> cd packaging/centos63</programlisting>
<para>Generating RPMs is done using the <filename>package.sh</filename> script:
<programlisting><prompt>$</prompt>./package.sh</programlisting>
</para>
[10/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Merge branch 'master' into disk_io_throttling
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/288c5b61
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/288c5b61
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/288c5b61
Branch: refs/heads/disk_io_throttling
Commit: 288c5b61c969aa58e86c8c44556d33164abdc2a6
Parents: 0beffe8 4f07679
Author: Wei Zhou <w....@leaseweb.com>
Authored: Fri Jun 7 09:05:20 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Fri Jun 7 09:05:20 2013 +0200
----------------------------------------------------------------------
docs/en-US/CloudStack_GSoC_Guide.xml | 1 +
docs/en-US/gsoc-imduffy15.xml | 395 +++++++++++++++++++
docs/en-US/gsoc-tuna.xml | 203 ++++++++++
.../debian/config/etc/iptables/iptables-router | 1 +
.../ExternalFirewallDeviceManagerImpl.java | 2 +-
.../ExternalLoadBalancerDeviceManagerImpl.java | 4 +-
.../src/com/cloud/network/NetworkManager.java | 2 +-
.../com/cloud/network/NetworkManagerImpl.java | 20 +-
.../src/com/cloud/network/NetworkModelImpl.java | 17 +-
.../com/cloud/network/NetworkServiceImpl.java | 1 +
.../cloud/network/guru/DirectNetworkGuru.java | 5 +-
.../network/guru/DirectPodBasedNetworkGuru.java | 2 +-
.../VirtualNetworkApplianceManagerImpl.java | 46 ++-
.../VpcVirtualNetworkApplianceManagerImpl.java | 6 +-
.../network/vpc/NetworkACLManagerImpl.java | 3 +
.../network/vpc/NetworkACLServiceImpl.java | 40 +-
.../cloud/network/MockNetworkManagerImpl.java | 9 +-
.../com/cloud/vpc/MockNetworkManagerImpl.java | 2 +-
test/integration/smoke/test_volumes.py | 5 +
ui/scripts/system.js | 16 +-
ui/scripts/vpc.js | 45 ++-
ui/scripts/zoneWizard.js | 5 +-
22 files changed, 721 insertions(+), 109 deletions(-)
----------------------------------------------------------------------
[31/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2914: lbScheme Public should be specified in NetworkOffering
NetworkOfferings now require a mandatory scheme in the
serviceCapabilityList to create a VPC loadbalancer on the public side.
This commit fixes the test for VPC networks. Additionally there needs to
be a fix for making this the default behaviour so as not to hurt the
backwards compatibility.
test still fails because of CLOUDSTACK-2915 however which is a related
network ACL backwards compat issue. See bug for more details.
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20c1f2c3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20c1f2c3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20c1f2c3
Branch: refs/heads/disk_io_throttling
Commit: 20c1f2c3466926163ccf0fe1487b3ca61d35da07
Parents: 52f9d5e
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 13:36:38 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 13:38:33 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_vpc_network.py | 271 ++++++++++----------
1 file changed, 138 insertions(+), 133 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20c1f2c3/test/integration/component/test_vpc_network.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py
index c321103..a997f43 100644
--- a/test/integration/component/test_vpc_network.py
+++ b/test/integration/component/test_vpc_network.py
@@ -35,139 +35,144 @@ class Services:
def __init__(self):
self.services = {
- "account": {
- "email": "test@test.com",
- "firstname": "Test",
- "lastname": "User",
- "username": "test",
- # Random characters are appended for unique
- # username
- "password": "password",
- },
- "service_offering": {
- "name": "Tiny Instance",
- "displaytext": "Tiny Instance",
- "cpunumber": 1,
- "cpuspeed": 100,
- "memory": 128,
- },
- "network_offering": {
- "name": 'VPC Network offering',
- "displaytext": 'VPC Network off',
- "guestiptype": 'Isolated',
- "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "serviceProviderList": {
- "Vpn": 'VpcVirtualRouter',
- "Dhcp": 'VpcVirtualRouter',
- "Dns": 'VpcVirtualRouter',
- "SourceNat": 'VpcVirtualRouter',
- "PortForwarding": 'VpcVirtualRouter',
- "Lb": 'VpcVirtualRouter',
- "UserData": 'VpcVirtualRouter',
- "StaticNat": 'VpcVirtualRouter',
- "NetworkACL": 'VpcVirtualRouter'
- },
- "servicecapabilitylist": {
- },
- },
- "network_off_netscaler": {
- "name": 'Network offering-netscaler',
- "displaytext": 'Network offering-netscaler',
- "guestiptype": 'Isolated',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "serviceProviderList": {
- "Dhcp": 'VpcVirtualRouter',
- "Dns": 'VpcVirtualRouter',
- "SourceNat": 'VpcVirtualRouter',
- "PortForwarding": 'VpcVirtualRouter',
- "Vpn": 'VpcVirtualRouter',
- "Lb": 'Netscaler',
- "UserData": 'VpcVirtualRouter',
- "StaticNat": 'VpcVirtualRouter',
- },
- },
- "network_off_shared": {
- "name": 'Shared Network offering',
- "displaytext": 'Shared Network offering',
- "guestiptype": 'Shared',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "useVpc": 'on',
- "specifyIpRanges": True,
- "specifyVlan": True
- },
- "vpc_offering": {
- "name": 'VPC off',
- "displaytext": 'VPC off',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat',
- },
- "vpc": {
- "name": "TestVPC",
- "displaytext": "TestVPC",
- "cidr": '10.0.0.1/24'
- },
- "network": {
- "name": "Test Network",
- "displaytext": "Test Network",
- "netmask": '255.255.255.0'
- },
- "lbrule": {
- "name": "SSH",
- "alg": "leastconn",
- # Algorithm used for load balancing
- "privateport": 22,
- "publicport": 2222,
- "openfirewall": False,
- "startport": 22,
- "endport": 2222,
- "protocol": "TCP",
- "cidrlist": '0.0.0.0/0',
- },
- "natrule": {
- "privateport": 22,
- "publicport": 22,
- "startport": 22,
- "endport": 22,
- "protocol": "TCP",
- "cidrlist": '0.0.0.0/0',
- },
- "fw_rule": {
- "startport": 1,
- "endport": 6000,
- "cidr": '0.0.0.0/0',
- # Any network (For creating FW rule)
- "protocol": "TCP"
- },
- "http_rule": {
- "startport": 80,
- "endport": 80,
- "cidrlist": '0.0.0.0/0',
- "protocol": "ICMP"
- },
- "virtual_machine": {
- "displayname": "Test VM",
- "username": "root",
- "password": "password",
- "ssh_port": 22,
- "hypervisor": 'XenServer',
- # Hypervisor type should be same as
- # hypervisor type of cluster
- "privateport": 22,
- "publicport": 22,
- "protocol": 'TCP',
- },
- "ostype": 'CentOS 5.3 (64-bit)',
- # Cent OS 5.3 (64 bit)
- "sleep": 60,
- "timeout": 10,
- "mode": 'advanced'
- }
+ "account": {
+ "email": "test@test.com",
+ "firstname": "Test",
+ "lastname": "User",
+ "username": "test",
+ # Random characters are appended for unique
+ # username
+ "password": "password",
+ },
+ "service_offering": {
+ "name": "Tiny Instance",
+ "displaytext": "Tiny Instance",
+ "cpunumber": 1,
+ "cpuspeed": 100,
+ "memory": 128,
+ },
+ "network_offering": {
+ "name": 'VPC Network offering',
+ "displaytext": 'VPC Network off',
+ "guestiptype": 'Isolated',
+ "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "serviceProviderList": {
+ "Vpn": 'VpcVirtualRouter',
+ "Dhcp": 'VpcVirtualRouter',
+ "Dns": 'VpcVirtualRouter',
+ "SourceNat": 'VpcVirtualRouter',
+ "PortForwarding": 'VpcVirtualRouter',
+ "Lb": 'VpcVirtualRouter',
+ "UserData": 'VpcVirtualRouter',
+ "StaticNat": 'VpcVirtualRouter',
+ "NetworkACL": 'VpcVirtualRouter'
+ },
+ "serviceCapabilityList": {
+ "SourceNat": {"SupportedSourceNatTypes": "peraccount"},
+ "Lb": {"lbSchemes": "public", "SupportedLbIsolation": "dedicated"}
+ },
+ },
+ "network_off_netscaler": {
+ "name": 'Network offering-netscaler',
+ "displaytext": 'Network offering-netscaler',
+ "guestiptype": 'Isolated',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "serviceProviderList": {
+ "Dhcp": 'VpcVirtualRouter',
+ "Dns": 'VpcVirtualRouter',
+ "SourceNat": 'VpcVirtualRouter',
+ "PortForwarding": 'VpcVirtualRouter',
+ "Vpn": 'VpcVirtualRouter',
+ "Lb": 'Netscaler',
+ "UserData": 'VpcVirtualRouter',
+ "StaticNat": 'VpcVirtualRouter',
+ },
+ "serviceCapabilityList": {
+ "SourceNat": {"SupportedSourceNatTypes": "peraccount"},
+ "Lb": {"lbSchemes": "public", "SupportedLbIsolation": "dedicated"}
+ },
+ },
+ "network_off_shared": {
+ "name": 'Shared Network offering',
+ "displaytext": 'Shared Network offering',
+ "guestiptype": 'Shared',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "useVpc": 'on',
+ "specifyIpRanges": True,
+ "specifyVlan": True
+ },
+ "vpc_offering": {
+ "name": 'VPC off',
+ "displaytext": 'VPC off',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat',
+ },
+ "vpc": {
+ "name": "TestVPC",
+ "displaytext": "TestVPC",
+ "cidr": '10.0.0.1/24'
+ },
+ "network": {
+ "name": "Test Network",
+ "displaytext": "Test Network",
+ "netmask": '255.255.255.0'
+ },
+ "lbrule": {
+ "name": "SSH",
+ "alg": "leastconn",
+ # Algorithm used for load balancing
+ "privateport": 22,
+ "publicport": 2222,
+ "openfirewall": False,
+ "startport": 22,
+ "endport": 2222,
+ "protocol": "TCP",
+ "cidrlist": '0.0.0.0/0',
+ },
+ "natrule": {
+ "privateport": 22,
+ "publicport": 22,
+ "startport": 22,
+ "endport": 22,
+ "protocol": "TCP",
+ "cidrlist": '0.0.0.0/0',
+ },
+ "fw_rule": {
+ "startport": 1,
+ "endport": 6000,
+ "cidr": '0.0.0.0/0',
+ # Any network (For creating FW rule)
+ "protocol": "TCP"
+ },
+ "http_rule": {
+ "startport": 80,
+ "endport": 80,
+ "cidrlist": '0.0.0.0/0',
+ "protocol": "ICMP"
+ },
+ "virtual_machine": {
+ "displayname": "Test VM",
+ "username": "root",
+ "password": "password",
+ "ssh_port": 22,
+ "hypervisor": 'XenServer',
+ # Hypervisor type should be same as
+ # hypervisor type of cluster
+ "privateport": 22,
+ "publicport": 22,
+ "protocol": 'TCP',
+ },
+ "ostype": 'CentOS 5.3 (64-bit)',
+ # Cent OS 5.3 (64 bit)
+ "sleep": 60,
+ "timeout": 10,
+ }
class TestVPCNetwork(cloudstackTestCase):
[43/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/50dc67bc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/50dc67bc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/50dc67bc
Branch: refs/heads/disk_io_throttling
Commit: 50dc67bc2e5e15522f299c05e2923b34bbdd1081
Parents: 76ce304 840e14d
Author: Wei Zhou <w....@leaseweb.com>
Authored: Mon Jun 10 15:01:08 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Mon Jun 10 15:01:08 2013 +0200
----------------------------------------------------------------------
docs/en-US/pvlan.xml | 118 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 112 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[11/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2884: str object interpreted as index
Casting to an int for almostEqual comparison
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1c9cd9d3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1c9cd9d3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1c9cd9d3
Branch: refs/heads/disk_io_throttling
Commit: 1c9cd9d36077331a7b25d19e18ae73918e5662f6
Parents: 4f07679
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Fri Jun 7 14:49:00 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Fri Jun 7 14:49:00 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_service_offerings.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c9cd9d3/test/integration/smoke/test_service_offerings.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_service_offerings.py b/test/integration/smoke/test_service_offerings.py
index a56e34d..0213c04 100644
--- a/test/integration/smoke/test_service_offerings.py
+++ b/test/integration/smoke/test_service_offerings.py
@@ -92,7 +92,7 @@ class Services:
"displaytext": "Small Instance",
"cpunumber": 1,
"cpuspeed": 100,
- "memory": 256,
+ "memory": 128,
},
"medium":
{
@@ -433,7 +433,7 @@ class TestServiceOfferings(cloudstackTestCase):
)
self.assertAlmostEqual(
int(total_mem) / 1024, # In MBs
- self.small_offering.memory,
+ int(self.small_offering.memory),
"Check Memory(kb) for small offering"
)
return
[38/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
destroy vm after test in test_advancedsg_networks.py
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8220b986
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8220b986
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8220b986
Branch: refs/heads/disk_io_throttling
Commit: 8220b9867c70166705fc4ed6373ea8266e754678
Parents: 03e283c
Author: Wei Zhou <w....@leaseweb.com>
Authored: Mon Jun 10 14:00:05 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Mon Jun 10 14:00:05 2013 +0200
----------------------------------------------------------------------
test/integration/component/test_advancedsg_networks.py | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8220b986/test/integration/component/test_advancedsg_networks.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_advancedsg_networks.py b/test/integration/component/test_advancedsg_networks.py
index e24254d..229cfd6 100644
--- a/test/integration/component/test_advancedsg_networks.py
+++ b/test/integration/component/test_advancedsg_networks.py
@@ -730,6 +730,7 @@ class TestNetworksInAdvancedSG(cloudstackTestCase):
networkids=self.shared_network_sg.id,
serviceofferingid=self.service_offering.id
)
+ self.cleanup_vms.append(self.shared_network_admin_account_virtual_machine)
vms = VirtualMachine.list(
self.api_client,
id=self.shared_network_admin_account_virtual_machine.id,
[09/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f07679d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f07679d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f07679d
Branch: refs/heads/disk_io_throttling
Commit: 4f07679d4966a0e2de97fb0e3a42fb695436e330
Parents: 1bdb626 c2ac409
Author: Sebastien Goasguen <ru...@gmail.com>
Authored: Fri Jun 7 02:59:48 2013 -0400
Committer: Sebastien Goasguen <ru...@gmail.com>
Committed: Fri Jun 7 02:59:48 2013 -0400
----------------------------------------------------------------------
.../debian/config/etc/iptables/iptables-router | 1 +
.../ExternalFirewallDeviceManagerImpl.java | 2 +-
.../ExternalLoadBalancerDeviceManagerImpl.java | 4 +-
.../src/com/cloud/network/NetworkManager.java | 2 +-
.../com/cloud/network/NetworkManagerImpl.java | 20 +--------
.../src/com/cloud/network/NetworkModelImpl.java | 17 +++++---
.../com/cloud/network/NetworkServiceImpl.java | 1 +
.../cloud/network/guru/DirectNetworkGuru.java | 5 +--
.../network/guru/DirectPodBasedNetworkGuru.java | 2 +-
.../VirtualNetworkApplianceManagerImpl.java | 46 +++++++++++---------
.../VpcVirtualNetworkApplianceManagerImpl.java | 6 +--
.../network/vpc/NetworkACLManagerImpl.java | 3 ++
.../network/vpc/NetworkACLServiceImpl.java | 40 +++++++++--------
.../cloud/network/MockNetworkManagerImpl.java | 9 +---
.../com/cloud/vpc/MockNetworkManagerImpl.java | 2 +-
test/integration/smoke/test_volumes.py | 5 +++
ui/scripts/system.js | 16 +++----
ui/scripts/vpc.js | 45 +++++++++++++------
ui/scripts/zoneWizard.js | 5 ++-
19 files changed, 122 insertions(+), 109 deletions(-)
----------------------------------------------------------------------
[32/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Improve debug message when failing the test
Added the listVM response as part of debug logging
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/52f9d5ef
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/52f9d5ef
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/52f9d5ef
Branch: refs/heads/disk_io_throttling
Commit: 52f9d5efe238c5fe7a36c2d7094f3f73ca9357cd
Parents: 6e24542
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 13:36:13 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 13:38:33 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_vm_life_cycle.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52f9d5ef/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index afe9b8a..9aaa13f 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -687,10 +687,12 @@ class TestVMLifeCycle(cloudstackTestCase):
else:
break
+ self.debug("listVirtualMachines response: %s" % list_vm_response)
+
self.assertEqual(
list_vm_response,
None,
- "Check Expunged virtual machine is listVirtualMachines"
+ "Check Expunged virtual machine is in listVirtualMachines response"
)
return
[13/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
[GSoC]: Proposal from Dharmesh Kakadia
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e17a0c23
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e17a0c23
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e17a0c23
Branch: refs/heads/disk_io_throttling
Commit: e17a0c23b8d4d7cbbcbf4a95cf545b0d8ae59aaa
Parents: 302741d
Author: Sebastien Goasguen <ru...@gmail.com>
Authored: Fri Jun 7 06:03:42 2013 -0400
Committer: Sebastien Goasguen <ru...@gmail.com>
Committed: Fri Jun 7 06:03:42 2013 -0400
----------------------------------------------------------------------
docs/en-US/CloudStack_GSoC_Guide.xml | 1 +
docs/en-US/gsoc-dharmesh.xml | 149 ++++++++++++++++++++++
docs/en-US/images/mesos-integration-arch.jpg | 0
3 files changed, 150 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e17a0c23/docs/en-US/CloudStack_GSoC_Guide.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/CloudStack_GSoC_Guide.xml b/docs/en-US/CloudStack_GSoC_Guide.xml
index b7ba61f..243a0ca 100644
--- a/docs/en-US/CloudStack_GSoC_Guide.xml
+++ b/docs/en-US/CloudStack_GSoC_Guide.xml
@@ -48,6 +48,7 @@
</bookinfo>
<xi:include href="gsoc-tuna.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gsoc-imduffy15.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="gsoc-dharmesh.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e17a0c23/docs/en-US/gsoc-dharmesh.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/gsoc-dharmesh.xml b/docs/en-US/gsoc-dharmesh.xml
new file mode 100644
index 0000000..5e2bf73
--- /dev/null
+++ b/docs/en-US/gsoc-dharmesh.xml
@@ -0,0 +1,149 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "CloudStack_GSoC_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<chapter id="gsoc-dharmesh">
+ <title>Dharmesh's 2013 GSoC Proposal</title>
+ <para>This chapter describes Dharmrsh's 2013 Google Summer of Code project within the &PRODUCT; ASF project. It is a copy paste of the submitted proposal.</para>
+ <section id="abstract-dharmesh">
+ <title>Abstract</title>
+ <para>
+ The project aims to bring <ulink url="http://aws.amazon.com/cloudformation/"><citetitle>cloudformation</citetitle></ulink> like service to cloudstack. One of the prime use-case is cluster computing frameworks on cloudstack. A cloudformation service will give users and administrators of cloudstack ability to manage and control a set of resources easily. The cloudformation will allow booting and configuring a set of VMs and form a cluster. Simple example would be LAMP stack. More complex clusters such as mesos or hadoop cluster requires a little more advanced configuration. There is already some work done by Chiradeep Vittal at this front [5]. In this project, I will implement server side cloudformation service for cloudstack and demonstrate how to run mesos cluster using it.
+ </para>
+ </section>
+
+ <section id="mesos">
+ <title>Mesos</title>
+ <para>
+ <ulink url="http://incubator.apache.org/mesos/"><citetitle>Mesos</citetitle></ulink> is a resource management platform for clusters. It aims to increase resource utilization of clusters by sharing cluster resources among multiple processing frameworks(like MapReduce, MPI, Graph Processing) or multiple instances of same framework. It provides efficient resource isolation through use of containers. Uses zookeeper for state maintenance and fault tolerance.
+ </para>
+ </section>
+
+ <section id="mesos-use">
+ <title>What can run on mesos ?</title>
+
+ <para><emphasis role="bold">Spark:</emphasis> A cluster computing framework based on the Resilient Distributed Datasets (RDDs) abstraction. RDD is more generalized than MapReduce and can support iterative and interactive computation while retaining fault tolerance, scalability, data locality etc.</para>
+
+ <para><emphasis role="bold">Hadoop:</emphasis>: Hadoop is fault tolerant and scalable distributed computing framework based on MapReduce abstraction.</para>
+
+ <para><emphasis role="bold">Begel:</emphasis>: A graph processing framework based on pregel.</para>
+
+ <para>and other frameworks like MPI, Hypertable.</para>
+ </section>
+
+ <section id="mesos-deploy">
+ <title>How to deploy mesos ?</title>
+
+ <para>Mesos provides cluster installation <ulink url="https://github.com/apache/mesos/blob/trunk/docs/Deploy-Scripts.textile"><citetitle>scripts</citetitle></ulink> for cluster deployment. There are also scripts available to deploy a cluster on <ulink url="https://github.com/apache/mesos/blob/trunk/docs/EC2-Scripts.textile"><citetitle>Amazon EC2</citetitle></ulink>. It would be interesting to see if this scripts can be leveraged in anyway.</para>
+ </section>
+
+ <section id="deliverables-dharmesh">
+ <title>Deliverables</title>
+ <orderedlist>
+ <listitem>
+ <para>Deploy CloudStack and understand instance configuration/contextualization</para>
+ </listitem>
+ <listitem>
+ <para>Test and deploy Mesos on a set of CloudStack based VM, manually. Design/propose an automation framework</para>
+ </listitem>
+ <listitem>
+ <para>Test stackmate and engage chiradeep (report bugs, make suggestion, make pull request)</para>
+ </listitem>
+ <listitem>
+ <para>Create cloudformation template to provision a Mesos Cluster</para>
+ </listitem>
+ <listitem>
+ <para>Compare with Apache Whirr or other cluster provisioning tools for server side implementation of cloudformation service.</para>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section id="arch-and-tools">
+ <title>Architecture and Tools</title>
+
+ <para>The high level architecture is as follows:</para>
+
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mesos-integration-arch.jpg"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+
+
+ <para>It includes following components:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>CloudFormation Query API server:</para>
+ <para>This acts as a point of contact to and exposes CloudFormation functionality as Query API. This can be accessed directly or through existing tools from Amazon AWS for their cloudformation service. It will be easy to start as a module which resides outside cloudstack at first and I plan to use dropwizard [3] to start with. Later may be the API server can be merged with cloudstack core. I plan to use mysql for storing details of clusters.</para>
+ </listitem>
+
+ <listitem>
+ <para>Provisioning:</para>
+
+ <para>Provisioning module is responsible for handling the booting process of the VMs through cloudstack. This uses the cloudstack APIs for launching VMs. I plan to use preconfigured templates/images with required dependencies installed, which will make cluster creation process much faster even for large clusters. Error handling is very important part of this module. For example, what you do if few VMs fail to boot in cluster ?</para>
+ </listitem>
+
+ <listitem>
+ <para>Configuration:</para>
+
+ <para>This module deals with configuring the VMs to form a cluster. This can be done via manual scripts/code or via configuration management tools like chef/ironfan/knife. Potentially workflow automation tools like rundeck [4] also can be used. Also Apache whirr and Provisionr are options. I plan to explore this tools and select suitable ones.</para>
+ </listitem>
+
+ </orderedlist>
+ </section>
+
+ <section id="api">
+ <title>API</title>
+
+ <para>Query <ulink url="http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Operations.html"><citetitle>API</citetitle></ulink> will be based on Amazon AWS cloudformation service. This will allow leveraging existing <ulink url="http://aws.amazon.com/developertools/AWS-CloudFormation"><citetitle>tools</citetitle></ulink> for AWS.</para>
+ </section>
+
+ <section id="timeline">
+ <title>Timeline</title>
+ <para>1-1.5 week : project design. Architecture, tools selection, API design</para>
+ <para>1-1.5 week : getting familiar with cloudstack and stackmate codebase and architecture details</para>
+ <para>1-1.5 week : getting familiar with mesos internals</para>
+ <para>1-1.5 week : setting up the dev environment and create mesos templates</para>
+ <para>2-3 week : build provisioning and configuration module</para>
+ <para>Midterm evaluation: provisioning module, configuration module</para>
+ <para>2-3 week : develope cloudformation server side implementation</para>
+ <para>2-3 week : test and integrate</para>
+ </section>
+
+ <section id="future-work">
+ <title>Future Work</title>
+ <orderedlist>
+ <listitem>
+ <para><emphasis role="bold">Auto Scaling:</emphasis></para>
+ <para>Automatically adding or removing VMs from mesos cluster based on various conditions like utilization going above/below a static threshold. There can be more sophisticated strategies based on prediction or fine grained metric collection with tight integration with mesos framework.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Cluster Simulator:</emphasis></para>
+ <para>Integrating with existing simulator to simulate mesos clusters. This can be useful in various scenarios, for example while developing a new scheduling algorithm, testing autoscaling etc.</para>
+ </listitem>
+ </orderedlist>
+ </section>
+</chapter>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e17a0c23/docs/en-US/images/mesos-integration-arch.jpg
----------------------------------------------------------------------
diff --git a/docs/en-US/images/mesos-integration-arch.jpg b/docs/en-US/images/mesos-integration-arch.jpg
new file mode 100644
index 0000000..e69de29
[22/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Debian repository (backports) now has latest haproxy, re-introduce into systemvm
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cb80ae24
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb80ae24
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb80ae24
Branch: refs/heads/disk_io_throttling
Commit: cb80ae2440aec8586cb34834cc3939d93a12beea
Parents: 8c9f681
Author: Chiradeep Vittal <ch...@apache.org>
Authored: Fri Jun 7 17:28:53 2013 -0700
Committer: Chiradeep Vittal <ch...@apache.org>
Committed: Fri Jun 7 17:29:14 2013 -0700
----------------------------------------------------------------------
.../definitions/systemvmtemplate/postinstall.sh | 13 +++++++++----
.../definitions/systemvmtemplate64/postinstall.sh | 15 +++++++++++----
2 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb80ae24/tools/appliance/definitions/systemvmtemplate/postinstall.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
index e052cf9..203cf54 100644
--- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh
+++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
@@ -21,6 +21,12 @@ ROOTPW=password
HOSTNAME=systemvm
CLOUDSTACK_RELEASE=4.2.0
+add_backports () {
+ sed -i '/backports/d' /etc/apt/sources.list
+ echo 'deb http://http.us.debian.org/debian wheezy-backports main' >> /etc/apt/sources.list
+ apt-get update
+}
+
install_packages() {
DEBIAN_FRONTEND=noninteractive
DEBIAN_PRIORITY=critical
@@ -81,10 +87,7 @@ install_packages() {
# rm -fr /opt/vmware-tools-distrib
# apt-get -q -y --force-yes purge build-essential
- # haproxy. Wheezy doesn't have haproxy, install from backports
- #apt-get --no-install-recommends -q -y --force-yes install haproxy
- wget http://ftp.us.debian.org/debian/pool/main/h/haproxy/haproxy_1.4.8-1_i386.deb
- dpkg -i haproxy_1.4.8-1_i386.deb
+ apt-get --no-install-recommends -q -y --force-yes install haproxy
}
setup_accounts() {
@@ -223,6 +226,8 @@ do_signature() {
begin=$(date +%s)
+echo "*************ADDING BACKPORTS********************"
+add_backports
echo "*************INSTALLING PACKAGES********************"
install_packages
echo "*************DONE INSTALLING PACKAGES********************"
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb80ae24/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate64/postinstall.sh b/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
index 786d38d..cbcd282 100644
--- a/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
+++ b/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
@@ -21,6 +21,13 @@ ROOTPW=password
HOSTNAME=systemvm
CLOUDSTACK_RELEASE=4.2.0
+add_backports () {
+ sed -i '/backports/d' /etc/apt/sources.list
+ echo 'deb http://http.us.debian.org/debian wheezy-backports main' >> /etc/apt/sources.list
+ apt-get update
+}
+
+
install_packages() {
DEBIAN_FRONTEND=noninteractive
DEBIAN_PRIORITY=critical
@@ -80,10 +87,8 @@ install_packages() {
# rm -fr /opt/vmware-tools-distrib
# apt-get -q -y --force-yes purge build-essential
- # haproxy. Wheezy doesn't have haproxy temporarily, install from backports
- #apt-get --no-install-recommends -q -y --force-yes install haproxy
- wget http://ftp.us.debian.org/debian/pool/main/h/haproxy/haproxy_1.4.8-1_amd64.deb
- dpkg -i haproxy_1.4.8-1_amd64.deb
+ apt-get --no-install-recommends -q -y --force-yes install haproxy
+
}
setup_accounts() {
@@ -222,6 +227,8 @@ do_signature() {
begin=$(date +%s)
+echo "*************ADDING BACKPORTS********************"
+add_backports
echo "*************INSTALLING PACKAGES********************"
install_packages
echo "*************DONE INSTALLING PACKAGES********************"
[08/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
my gsoc proposal document
Signed-off-by: Sebastien Goasguen <ru...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1bdb6266
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1bdb6266
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1bdb6266
Branch: refs/heads/disk_io_throttling
Commit: 1bdb6266c6b263684db229accd4f0a4a330f203a
Parents: cc7e9ee
Author: tuna <ng...@gmail.com>
Authored: Thu Jun 6 23:46:18 2013 +0700
Committer: Sebastien Goasguen <ru...@gmail.com>
Committed: Fri Jun 7 02:59:17 2013 -0400
----------------------------------------------------------------------
docs/en-US/gsoc-tuna.xml | 203 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 203 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1bdb6266/docs/en-US/gsoc-tuna.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/gsoc-tuna.xml b/docs/en-US/gsoc-tuna.xml
index 68032a8..0988734 100644
--- a/docs/en-US/gsoc-tuna.xml
+++ b/docs/en-US/gsoc-tuna.xml
@@ -25,4 +25,207 @@
<chapter id="gsoc-tuna">
<title>Nguyen's 2013 GSoC Proposal</title>
<para>This chapter describes Nguyen 2013 Google Summer of Code project within the &PRODUCT; ASF project. It is a copy paste of the submitted proposal.</para>
+ <section id="add-xen-xcp-support-for-gre-sdn-controller">
+ <title>Add Xen/XCP support for GRE SDN controller</title>
+ <para>
+ "This project aims to enhance the current native SDN controller in supporting Xen/XCP and integrate successfully the open source SDN controller (FloodLight) driving Open vSwitch through its interfaces."
+ </para>
+ </section>
+ <section id="Abstract">
+ <title>Abstract</title>
+ <para>
+ SDN, standing for Software-Defined Networking, is an approach to building data network equipments and softwares. It were invented by ONRC, Stanford University. SDN basically decouples the control from physical networking boxes and given to a software application called a controller. SDN has three parts: controller, protocols and switch; In which, OpenFlow is an open standard to deploy innovative protocols. Nowaday, more and more datacenters use SDN instead of traditional physical networking boxes. For example, Google announced that they completely built its own switches and SDN confrollers for use in its internal backbone network.
+ </para>
+ <para>
+ OpenvSwitch, an open source software switch, is widely used as a virtual switch in virtualized server environments. It can currently run on any Linux-based virtualization platform, such as: KVM, Xen (XenServer, XCP, Xen hypervisor), VirtualBox... It also has been ported to a number of different operating systems and hardware platforms: Linux, FreeBSD, Windows and even non-POSIX embedded systems. In cloud computing IaaS, using OpenvSwitch instead of Linux bridge on compute nodes becomes an inevitable trend because of its powerful features and the ability of OpenFlow integration as well.
+ </para>
+ <para>
+ In CloudStack, we already have a native SDN controller. With KVM hypervisor, developers can easily install OpenvSwitch module; whereas, Xen even has a build-in one. The combination of SDN controller and OpenvSwitch gives us many advanced things. For example, creating GRE tunnels as an isolation method instead of VLAN is a good try. In this project, we are planning to support GRE tunnels in Xen/XCP hypervisor with the native SDN controller. When it's done, substituting open-sources SDN controllers (floodlight, beacon, pox, nox) for the current one is an amazing next step.
+ </para>
+ </section>
+ <section id="design-desription">
+ <title>Design description</title>
+ <para>
+ CloudStack currently has a native SDN Controller that is used to build meshes of GRE tunnels between Xen hosts. There consists of 4 parts: OVS tunnel manager, OVS Dao/VO, Command/Answer and Ovs tunnel plugin. The details are as follow:
+ </para>
+ <para>
+ <emphasis role="bold">OVS tunnel manager:</emphasis> Consist of OvsElement and OvsTunnelManager.
+ </para>
+ <para>
+ OvsElement is used for controlling Ovs tunnel lifecycle (prepare, release)
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>prepare(network, nic, vm, dest): create tunnel for vm on network to dest</para>
+ </listitem>
+ <listitem>
+ <para>release(network, nic, vm): destroy tunnel for vm on network</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ OvsTunnelManager drives bridge configuration and tunnel creation via calling respective commands to Agent.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>destroyTunnel(vm, network): call OvsDestroyTunnelCommand to destroy tunnel for vm on network</para>
+ </listitem>
+ <listitem>
+ <para>createTunnel(vm, network, dest): call OvsCreateTunnelCommand to create tunnel for vm on network to dest</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">OVS tunnel plugin:</emphasis> These are ovstunnel and ovs-vif-flows.py script, writen as XAPI plugin. The OVS tunnel manager will call them via XML-RPC.
+ </para>
+ <para>
+ Ovstunnel plugin calls corresponding vsctl commands for setting up the OVS bridge, creating GRE tunnels or destroying them.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>setup_ovs_bridge()</para>
+ </listitem>
+ <listitem>
+ <para>destroy_ovs_bridge()</para>
+ </listitem>
+ <listitem>
+ <para>create_tunnel()</para>
+ </listitem>
+ <listitem>
+ <para>destroy_tunnel()</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Ovs-vif-flow.py clears or applies rule for VIFs every time it is plugged or unplugged from a OVS bridge.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>clear_flow()</para>
+ </listitem>
+ <listitem>
+ <para>apply_flow()</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">OVS command/answer:</emphasis> It is designed under the format of requests and answers between Manager and Plugin. These commands will correspondence exactly the mentioned manipulations.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>OvsSetupBridgeCommand</para>
+ </listitem>
+ <listitem>
+ <para>OvsSetupBridgeAnswer</para>
+ </listitem>
+ <listitem>
+ <para>OvsDestroyBridgeCommand</para>
+ </listitem>
+ <listitem>
+ <para>OvsDestroyBridgeAnswer</para>
+ </listitem>
+ <listitem>
+ <para>OvsCreateTunnelCommand</para>
+ </listitem>
+ <listitem>
+ <para>OvsCreateTunnelAnswer</para>
+ </listitem>
+ <listitem>
+ <para>OvsDestroyTunnelCommand</para>
+ </listitem>
+ <listitem>
+ <para>OvsDestroyTunnelAnswer</para>
+ </listitem>
+ <listitem>
+ <para>OvsFetchInterfaceCommand</para>
+ </listitem>
+ <listitem>
+ <para>OvsFetchInterfaceAnswer</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">OVS Dao/VO</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>OvsTunnelInterfaceDao</para>
+ </listitem>
+ <listitem>
+ <para>OvsTunnelInterfaceVO</para>
+ </listitem>
+ <listitem>
+ <para>OvsTunnelNetworkDao</para>
+ </listitem>
+ <listitem>
+ <para>OvsTunnelNetworkVO</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="integrate-floodLight-as-sdn-controller">
+ <title>Integrate FloodLight as SDN controller</title>
+ <para>
+ I think that we maybe deploy FloodLight Server as a new SystemVM. This VM acts like current SystemVMs. One Floodlight SystemVM per Zone, so it can manage for virtual switches under this zone.
+ </para>
+ </section>
+ <section id="Deliverables">
+ <title>Deliverables</title>
+ <para>
+ GRE has been used as isolation method in CloudStack when deploy with Xen/XCP hosts.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>User set sdn.ovs.controller parameter in Global Setting to true. He deploys Advance Networking and chooses GRE as isolation method</para>
+ </listitem>
+ <listitem>
+ <para>Make use of Floodlight instead of native SDN controller.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="About-me">
+ <title>About me</title>
+ <para>
+ My name is Nguyen Anh Tu, a young and enthusiastic researcher in Cloud Computing Center - Viettel Research and Development Institute, Vietnam. Since last year, we has built Cloud Platform based on CloudStack, starting with version 3.0.2. As the results, some advanced modules were successfully developed, consists of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Encrypt Data Volume for VMs.</para>
+ </listitem>
+ <listitem>
+ <para>Dynamic Allocate Memory for VMs by changing policy on Squeeze Daemon.</para>
+ </listitem>
+ <listitem>
+ <para>AutoScale without using NetScale.</para>
+ </listitem>
+ <listitem>
+ <para>Deploy a new SystemVM type for Intrustion Detection System.</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Given the working experience and recent researches, I have obtained remarkably the understanding of specific knowledges to carry on this project, details as follow:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Java source code on CloudStack: Design Pattern, Spring framework.</para>
+ </listitem>
+ <listitem>
+ <para>Bash, Python programming.</para>
+ </listitem>
+ <listitem>
+ <para>XAPI plugin.</para>
+ </listitem>
+ <listitem>
+ <para>XML-RPC.</para>
+ </listitem>
+ <listitem>
+ <para>OpenVSwitch on Xen.</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Other knowledges:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>XAPI RRD, XenStore.</para>
+ </listitem>
+ <listitem>
+ <para>Ocaml Programming (XAPI functions).</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
[42/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2707: use executeBatch instead of persist in Usage Server
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/76ce3044
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/76ce3044
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/76ce3044
Branch: refs/heads/disk_io_throttling
Commit: 76ce304411259dc4a29e0e070de829b79b46efe2
Parents: c2b20a4
Author: Wei Zhou <w....@leaseweb.com>
Authored: Mon Jun 10 15:00:08 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Mon Jun 10 15:00:08 2013 +0200
----------------------------------------------------------------------
.../src/com/cloud/usage/dao/UsageDao.java | 5 +-
.../src/com/cloud/usage/dao/UsageDaoImpl.java | 64 ++++++++++++++++++++
server/src/com/cloud/api/ApiResponseHelper.java | 4 +-
.../cloud/usage/parser/NetworkUsageParser.java | 11 +++-
.../cloud/usage/parser/VmDiskUsageParser.java | 43 +++++++------
5 files changed, 104 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/engine/schema/src/com/cloud/usage/dao/UsageDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDao.java b/engine/schema/src/com/cloud/usage/dao/UsageDao.java
index 8a80655..f571b63 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDao.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDao.java
@@ -38,6 +38,7 @@ public interface UsageDao extends GenericDao<UsageVO, Long> {
Long getLastUserStatsId();
List<Long> listPublicTemplatesByAccount(long accountId);
Long getLastVmDiskStatsId();
- void updateVmDiskStats(List<VmDiskStatisticsVO> vmNetStats);
- void saveVmDiskStats(List<VmDiskStatisticsVO> vmNetStats);
+ void updateVmDiskStats(List<VmDiskStatisticsVO> vmDiskStats);
+ void saveVmDiskStats(List<VmDiskStatisticsVO> vmDiskStats);
+ void saveUsageRecords(List<UsageVO> usageRecords);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
index f7d5069..2237d56 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
@@ -18,6 +18,7 @@ package com.cloud.usage.dao;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
+import java.sql.Timestamp;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Date;
@@ -63,6 +64,8 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
" VALUES (?,?,?,?,?,?,?,?,?,?, ?, ?, ?, ?,?, ?, ?)";
private static final String UPDATE_VM_DISK_STATS = "UPDATE cloud_usage.vm_disk_statistics SET net_io_read=?, net_io_write=?, current_io_read=?, current_io_write=?, agg_io_read=?, agg_io_write=?, " +
"net_bytes_read=?, net_bytes_write=?, current_bytes_read=?, current_bytes_write=?, agg_bytes_read=?, agg_bytes_write=? WHERE id=?";
+ private static final String INSERT_USGAE_RECORDS = "INSERT INTO cloud_usage.cloud_usage (zone_id, account_id, domain_id, description, usage_display, usage_type, raw_usage, vm_instance_id, vm_name, offering_id, template_id, " +
+ "usage_id, type, size, network_id, start_date, end_date) VALUES (?,?,?,?,?,?,?,?,?, ?, ?, ?,?,?,?,?,?)";
protected final static TimeZone s_gmtTimeZone = TimeZone.getTimeZone("GMT");
@@ -375,4 +378,65 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
}
}
+
+ @Override
+ public void saveUsageRecords(List<UsageVO> usageRecords) {
+ Transaction txn = Transaction.currentTxn();
+ try {
+ txn.start();
+ String sql = INSERT_USGAE_RECORDS;
+ PreparedStatement pstmt = null;
+ pstmt = txn.prepareAutoCloseStatement(sql); // in reality I just want CLOUD_USAGE dataSource connection
+ for (UsageVO usageRecord : usageRecords) {
+ pstmt.setLong(1, usageRecord.getZoneId());
+ pstmt.setLong(2, usageRecord.getAccountId());
+ pstmt.setLong(3, usageRecord.getDomainId());
+ pstmt.setString(4, usageRecord.getDescription());
+ pstmt.setString(5, usageRecord.getUsageDisplay());
+ pstmt.setInt(6, usageRecord.getUsageType());
+ pstmt.setDouble(7, usageRecord.getRawUsage());
+ if(usageRecord.getVmInstanceId() != null){
+ pstmt.setLong(8, usageRecord.getVmInstanceId());
+ } else {
+ pstmt.setNull(8, Types.BIGINT);
+ }
+ pstmt.setString(9, usageRecord.getVmName());
+ if(usageRecord.getOfferingId() != null){
+ pstmt.setLong(10, usageRecord.getOfferingId());
+ } else {
+ pstmt.setNull(10, Types.BIGINT);
+ }
+ if(usageRecord.getTemplateId() != null){
+ pstmt.setLong(11, usageRecord.getTemplateId());
+ } else {
+ pstmt.setNull(11, Types.BIGINT);
+ }
+ if(usageRecord.getUsageId() != null){
+ pstmt.setLong(12, usageRecord.getUsageId());
+ } else {
+ pstmt.setNull(12, Types.BIGINT);
+ }
+ pstmt.setString(13, usageRecord.getType());
+ if(usageRecord.getSize() != null){
+ pstmt.setLong(14, usageRecord.getSize());
+ } else {
+ pstmt.setNull(14, Types.BIGINT);
+ }
+ if(usageRecord.getNetworkId() != null){
+ pstmt.setLong(15, usageRecord.getNetworkId());
+ } else {
+ pstmt.setNull(15, Types.BIGINT);
+ }
+ pstmt.setTimestamp(16, new Timestamp(usageRecord.getStartDate().getTime()));
+ pstmt.setTimestamp(17, new Timestamp(usageRecord.getEndDate().getTime()));
+ pstmt.addBatch();
+ }
+ pstmt.executeBatch();
+ txn.commit();
+ } catch (Exception ex) {
+ txn.rollback();
+ s_logger.error("error saving usage records to cloud_usage db", ex);
+ throw new CloudRuntimeException(ex.getMessage());
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index bcc1605..0c98abc 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -3404,8 +3404,8 @@ public class ApiResponseHelper implements ResponseGenerator {
//Device Type
usageRecResponse.setType(usageRecord.getType());
//VM Instance Id
- VMInstanceVO vm = _entityMgr.findByIdIncludingRemoved(VMInstanceVO.class, usageRecord.getUsageId().toString());
- usageRecResponse.setUsageId(vm.getUuid());
+ VMInstanceVO vm = _entityMgr.findByIdIncludingRemoved(VMInstanceVO.class, usageRecord.getVmInstanceId().toString());
+ usageRecResponse.setVirtualMachineId(vm.getUuid());
//Volume ID
VolumeVO volume = _entityMgr.findByIdIncludingRemoved(VolumeVO.class, usageRecord.getUsageId().toString());
usageRecResponse.setUsageId(volume.getUuid());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/usage/src/com/cloud/usage/parser/NetworkUsageParser.java
----------------------------------------------------------------------
diff --git a/usage/src/com/cloud/usage/parser/NetworkUsageParser.java b/usage/src/com/cloud/usage/parser/NetworkUsageParser.java
index 3da6854..f2f24e4 100644
--- a/usage/src/com/cloud/usage/parser/NetworkUsageParser.java
+++ b/usage/src/com/cloud/usage/parser/NetworkUsageParser.java
@@ -16,6 +16,7 @@
// under the License.
package com.cloud.usage.parser;
+import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -89,6 +90,7 @@ public static final Logger s_logger = Logger.getLogger(NetworkUsageParser.class.
networkUsageByZone.put(key, new NetworkInfo(zoneId, usageNetwork.getHostId(), usageNetwork.getHostType(), usageNetwork.getNetworkId(), bytesSent, bytesReceived));
}
+ List<UsageVO> usageRecords = new ArrayList<UsageVO>();
for (String key : networkUsageByZone.keySet()) {
NetworkInfo networkInfo = networkUsageByZone.get(key);
long totalBytesSent = networkInfo.getBytesSent();
@@ -110,7 +112,7 @@ public static final Logger s_logger = Logger.getLogger(NetworkUsageParser.class.
}
UsageVO usageRecord = new UsageVO(networkInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, totalBytesSent + " bytes sent",
UsageTypes.NETWORK_BYTES_SENT, new Double(totalBytesSent), hostId, networkInfo.getHostType(), networkInfo.getNetworkId(), startDate, endDate);
- m_usageDao.persist(usageRecord);
+ usageRecords.add(usageRecord);
// Create the usage record for bytes received
usageDesc = "network bytes received";
@@ -119,7 +121,7 @@ public static final Logger s_logger = Logger.getLogger(NetworkUsageParser.class.
}
usageRecord = new UsageVO(networkInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, totalBytesReceived + " bytes received",
UsageTypes.NETWORK_BYTES_RECEIVED, new Double(totalBytesReceived), hostId, networkInfo.getHostType(), networkInfo.getNetworkId(), startDate, endDate);
- m_usageDao.persist(usageRecord);
+ usageRecords.add(usageRecord);
} else {
// Don't charge anything if there were zero bytes processed
if (s_logger.isDebugEnabled()) {
@@ -127,6 +129,11 @@ public static final Logger s_logger = Logger.getLogger(NetworkUsageParser.class.
}
}
}
+ try {
+ m_usageDao.saveUsageRecords(usageRecords);
+ } catch (Exception ex) {
+ s_logger.error("Exception in usage manager", ex);
+ }
return true;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
----------------------------------------------------------------------
diff --git a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
index b8a5f98..74fa214 100644
--- a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
+++ b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
@@ -16,6 +16,7 @@
// under the License.
package com.cloud.usage.parser;
+import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -93,6 +94,7 @@ public static final Logger s_logger = Logger.getLogger(VmDiskUsageParser.class.g
vmDiskUsageByZone.put(key, new VmDiskInfo(zoneId, usageVmDisk.getVmId(), usageVmDisk.getVolumeId(), ioRead, ioWrite, bytesRead, bytesWrite));
}
+ List<UsageVO> usageRecords = new ArrayList<UsageVO>();
for (String key : vmDiskUsageByZone.keySet()) {
VmDiskInfo vmDiskInfo = vmDiskUsageByZone.get(key);
long ioRead = vmDiskInfo.getIORead();
@@ -107,44 +109,45 @@ public static final Logger s_logger = Logger.getLogger(VmDiskUsageParser.class.g
}
Long vmId = null;
+ Long volumeId = null;
// Create the usage record for bytes read
String usageDesc = "disk bytes read";
- if(vmDiskInfo.getVmId() != 0){
+ if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() != 0)){
vmId = vmDiskInfo.getVmId();
- usageDesc += " for Vm: "+vmDiskInfo.getVmId()+" and Volume: "+ vmDiskInfo.getVolumeId();
+ volumeId = vmDiskInfo.getVolumeId();
+ usageDesc += " for Vm: " + vmId + " and Volume: " + volumeId;
}
UsageVO usageRecord = new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, ioRead + " io read",
- UsageTypes.VM_DISK_IO_READ, new Double(ioRead), vmId, "VirtualMachine", vmDiskInfo.getVolumeId(), startDate, endDate);
- m_usageDao.persist(usageRecord);
+ UsageTypes.VM_DISK_IO_READ, new Double(ioRead), vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, "VirtualMachine");
+ usageRecords.add(usageRecord);
// Create the usage record for bytes write
usageDesc = "disk bytes write";
- if(vmDiskInfo.getVmId() != 0){
- usageDesc += " for Vm: "+vmDiskInfo.getVmId()+" and Volume: "+ vmDiskInfo.getVolumeId();
+ if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() != 0)){
+ usageDesc += " for Vm: " + vmId + " and Volume: " + volumeId;
}
usageRecord = new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, ioWrite + " io write",
- UsageTypes.VM_DISK_BYTES_WRITE, new Double(ioWrite), vmId, "VirtualMachine", vmDiskInfo.getVolumeId(), startDate, endDate);
- m_usageDao.persist(usageRecord);
+ UsageTypes.VM_DISK_BYTES_WRITE, new Double(ioWrite), vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, "VirtualMachine");
+ usageRecords.add(usageRecord);
// Create the usage record for bytes read
usageDesc = "disk bytes read";
- if(vmDiskInfo.getVmId() != 0){
- vmId = vmDiskInfo.getVmId();
- usageDesc += " for Vm: "+vmDiskInfo.getVmId()+" and Volume: "+ vmDiskInfo.getVolumeId();
+ if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() != 0)){
+ usageDesc += " for Vm: " + vmId + " and Volume: " + volumeId;
}
usageRecord = new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, bytesRead + " bytes read",
- UsageTypes.VM_DISK_BYTES_READ, new Double(bytesRead), vmId, "VirtualMachine", vmDiskInfo.getVolumeId(), startDate, endDate);
- m_usageDao.persist(usageRecord);
+ UsageTypes.VM_DISK_BYTES_READ, new Double(bytesRead), vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, "VirtualMachine");
+ usageRecords.add(usageRecord);
// Create the usage record for bytes write
usageDesc = "disk bytes write";
- if(vmDiskInfo.getVmId() != 0){
- usageDesc += " for Vm: "+vmDiskInfo.getVmId()+" and Volume: "+ vmDiskInfo.getVolumeId();
+ if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() != 0)){
+ usageDesc += " for Vm: " + vmId + " and Volume: " + volumeId;
}
usageRecord = new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, bytesWrite + " bytes write",
- UsageTypes.VM_DISK_BYTES_WRITE, new Double(bytesWrite), vmId, "VirtualMachine", vmDiskInfo.getVolumeId(), startDate, endDate);
- m_usageDao.persist(usageRecord);
+ UsageTypes.VM_DISK_BYTES_WRITE, new Double(bytesWrite), vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, "VirtualMachine");
+ usageRecords.add(usageRecord);
} else {
// Don't charge anything if there were zero bytes processed
@@ -154,6 +157,12 @@ public static final Logger s_logger = Logger.getLogger(VmDiskUsageParser.class.g
}
}
+ try {
+ m_usageDao.saveUsageRecords(usageRecords);
+ } catch (Exception ex) {
+ s_logger.error("Exception in usage manager", ex);
+ }
+
return true;
}
[35/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Unskip skipped tests
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/03e283c4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/03e283c4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/03e283c4
Branch: refs/heads/disk_io_throttling
Commit: 03e283c4b3ed0046a47777b9dc1ad4ab948254af
Parents: 4a99f47
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 10 15:50:50 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 10 15:50:50 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_vpc_vm_life_cycle.py | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03e283c4/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index e198c79..39fb533 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -880,7 +880,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
)
return
-@unittest.skip("debugging")
class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
@classmethod
@@ -1681,7 +1680,6 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
return
-@unittest.skip("debugging")
class TestVMLifeCycleBothIsolated(cloudstackTestCase):
@classmethod
@@ -2014,7 +2012,6 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
return
-@unittest.skip("debugging")
class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
@classmethod
[16/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-1647: IP Reservation should not happen if the guest-vm cidr and network cidr is not same but their start ip and end ip are same.
Signed-off-by: Sateesh Chodapuneedi <sa...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5dc7387d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5dc7387d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5dc7387d
Branch: refs/heads/disk_io_throttling
Commit: 5dc7387d3b6b1abd841abc92e3c76a3894213d82
Parents: 5233e32
Author: Saksham Srivastava <sa...@citrix.com>
Authored: Wed Jun 5 16:28:05 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Fri Jun 7 16:54:40 2013 +0530
----------------------------------------------------------------------
.../com/cloud/network/NetworkServiceImpl.java | 15 +++++++++++
utils/src/com/cloud/utils/net/NetUtils.java | 28 ++++++++++++++++++++
.../test/com/cloud/utils/net/NetUtilsTest.java | 19 +++++++++++++
3 files changed, 62 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5dc7387d/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 29a36b9..c2af8e8 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -2116,6 +2116,21 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
}
}
+ // In some scenarios even though guesVmCidr and network CIDR do not appear similar but
+ // the IP ranges exactly matches, in these special cases make sure no Reservation gets applied
+ if (network.getNetworkCidr() == null) {
+ if (NetUtils.isSameIpRange(guestVmCidr, network.getCidr()) && !guestVmCidr.equals(network.getCidr())) {
+ throw new InvalidParameterValueException("The Start IP and End IP of guestvmcidr: "+ guestVmCidr + " and CIDR: " + network.getCidr() + " are same, " +
+ "even though both the cidrs appear to be different. As a precaution no IP Reservation will be applied.");
+ }
+ } else {
+ if(NetUtils.isSameIpRange(guestVmCidr, network.getNetworkCidr()) && !guestVmCidr.equals(network.getNetworkCidr())) {
+ throw new InvalidParameterValueException("The Start IP and End IP of guestvmcidr: "+ guestVmCidr + " and Network CIDR: " + network.getNetworkCidr() + " are same, " +
+ "even though both the cidrs appear to be different. As a precaution IP Reservation will not be affected. If you want to reset IP Reservation, " +
+ "specify guestVmCidr to be: " + network.getNetworkCidr());
+ }
+ }
+
// When reservation is applied for the first time, network_cidr will be null
// Populate it with the actual network cidr
if (network.getNetworkCidr() == null) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5dc7387d/utils/src/com/cloud/utils/net/NetUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/net/NetUtils.java b/utils/src/com/cloud/utils/net/NetUtils.java
index 8c094c8..12ac3e6 100755
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java
@@ -1023,6 +1023,34 @@ public class NetUtils {
return NetUtils.getIpRangeStartIpFromCidr(splitResult[0], size);
}
+ // Check if 2 CIDRs have exactly same IP Range
+ public static boolean isSameIpRange (String cidrA, String cidrB) {
+
+ if(!NetUtils.isValidCIDR(cidrA)) {
+ s_logger.info("Invalid value of cidr " + cidrA);
+ return false;
+ }
+ if (!NetUtils.isValidCIDR(cidrB)) {
+ s_logger.info("Invalid value of cidr " + cidrB);
+ return false;
+ }
+ String[] cidrPairFirst = cidrA.split("\\/");
+ String[] cidrPairSecond = cidrB.split("\\/");
+
+ Long networkSizeFirst = Long.valueOf(cidrPairFirst[1]);
+ Long networkSizeSecond = Long.valueOf(cidrPairSecond[1]);
+ String ipRangeFirst [] = NetUtils.getIpRangeFromCidr(cidrPairFirst[0], networkSizeFirst);
+ String ipRangeSecond [] = NetUtils.getIpRangeFromCidr(cidrPairFirst[0], networkSizeSecond);
+
+ long startIpFirst = NetUtils.ip2Long(ipRangeFirst[0]);
+ long endIpFirst = NetUtils.ip2Long(ipRangeFirst[1]);
+ long startIpSecond = NetUtils.ip2Long(ipRangeSecond[0]);
+ long endIpSecond = NetUtils.ip2Long(ipRangeSecond[1]);
+ if(startIpFirst == startIpSecond && endIpFirst == endIpSecond) {
+ return true;
+ }
+ return false;
+ }
public static boolean validateGuestCidr(String cidr) {
// RFC 1918 - The Internet Assigned Numbers Authority (IANA) has reserved the
// following three blocks of the IP address space for private internets:
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5dc7387d/utils/test/com/cloud/utils/net/NetUtilsTest.java
----------------------------------------------------------------------
diff --git a/utils/test/com/cloud/utils/net/NetUtilsTest.java b/utils/test/com/cloud/utils/net/NetUtilsTest.java
index 16d3402..9952d3c 100644
--- a/utils/test/com/cloud/utils/net/NetUtilsTest.java
+++ b/utils/test/com/cloud/utils/net/NetUtilsTest.java
@@ -136,4 +136,23 @@ public class NetUtilsTest extends TestCase {
assertTrue(NetUtils.getPrimaryPvlanFromUri(uri).equals("123"));
assertTrue(NetUtils.getIsolatedPvlanFromUri(uri).equals("456"));
}
+
+ public void testIsSameIpRange() {
+ //Test to check IP Range of 2 CIDRs
+ String cidrFirst = "10.0.144.0/20";
+ String cidrSecond = "10.0.151.0/20";
+ String cidrThird = "10.0.144.0/21";
+ assertTrue(NetUtils.isValidCIDR(cidrFirst));
+ assertTrue(NetUtils.isValidCIDR(cidrSecond));
+ assertTrue(NetUtils.isValidCIDR(cidrThird));
+
+ //Check for exactly same CIDRs
+ assertTrue(NetUtils.isSameIpRange(cidrFirst, cidrFirst));
+ //Check for 2 different CIDRs, but same IP Range
+ assertTrue(NetUtils.isSameIpRange(cidrFirst, cidrSecond));
+ //Check for 2 different CIDRs and different IP Range
+ assertFalse(NetUtils.isSameIpRange(cidrFirst, cidrThird));
+ //Check for Incorrect format of CIDR
+ assertFalse(NetUtils.isSameIpRange(cidrFirst, "10.3.6.5/50"));
+ }
}
[04/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-1771: Fix ipv6 address for router
Now it won't change(as ipv4 address) after router is destroyed.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4a14ea8a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4a14ea8a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4a14ea8a
Branch: refs/heads/disk_io_throttling
Commit: 4a14ea8a4d0d8a729928b05f137ea6721acf02ea
Parents: 5541785
Author: Sheng Yang <sh...@citrix.com>
Authored: Thu Jun 6 18:03:20 2013 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Thu Jun 6 18:04:35 2013 -0700
----------------------------------------------------------------------
.../ExternalFirewallDeviceManagerImpl.java | 2 +-
.../ExternalLoadBalancerDeviceManagerImpl.java | 4 +-
.../src/com/cloud/network/NetworkManager.java | 2 +-
.../com/cloud/network/NetworkManagerImpl.java | 3 +-
.../src/com/cloud/network/NetworkModelImpl.java | 17 +++++---
.../cloud/network/guru/DirectNetworkGuru.java | 5 +--
.../network/guru/DirectPodBasedNetworkGuru.java | 2 +-
.../VirtualNetworkApplianceManagerImpl.java | 46 +++++++++++---------
.../cloud/network/MockNetworkManagerImpl.java | 9 +---
.../com/cloud/vpc/MockNetworkManagerImpl.java | 2 +-
10 files changed, 48 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
index 9d24e47..9b190aa 100644
--- a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
@@ -485,7 +485,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
if (add && (!reservedIpAddressesForGuestNetwork.contains(network.getGateway()))) {
// Insert a new NIC for this guest network to reserve the gateway address
- _networkMgr.savePlaceholderNic(network, network.getGateway(), null);
+ _networkMgr.savePlaceholderNic(network, network.getGateway(), null, null);
}
// Delete any mappings used for inline external load balancers in this network
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
index 4b110e9..829ad3f 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
@@ -774,7 +774,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
// If a NIC doesn't exist for the load balancing IP address, create one
loadBalancingIpNic = _nicDao.findByIp4AddressAndNetworkId(loadBalancingIpAddress, network.getId());
if (loadBalancingIpNic == null) {
- loadBalancingIpNic = _networkMgr.savePlaceholderNic(network, loadBalancingIpAddress, null);
+ loadBalancingIpNic = _networkMgr.savePlaceholderNic(network, loadBalancingIpAddress, null, null);
}
// Save a mapping between the source IP address and the load balancing IP address NIC
@@ -1019,7 +1019,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
if (add) {
// Insert a new NIC for this guest network to reserve the self IP
- _networkMgr.savePlaceholderNic(guestConfig, selfIp, null);
+ _networkMgr.savePlaceholderNic(guestConfig, selfIp, null, null);
} else {
// release the self-ip obtained from guest network
Nic selfipNic = getPlaceholderNic(guestConfig);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/NetworkManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManager.java b/server/src/com/cloud/network/NetworkManager.java
index 8627251..bc43daa 100755
--- a/server/src/com/cloud/network/NetworkManager.java
+++ b/server/src/com/cloud/network/NetworkManager.java
@@ -381,7 +381,7 @@ public interface NetworkManager {
String allocatePublicIpForGuestNic(Long networkId, DataCenter dc, Pod pod, Account caller, String requestedIp) throws InsufficientAddressCapacityException;
- NicVO savePlaceholderNic(Network network, String ip4Address, Type vmType);
+ NicVO savePlaceholderNic(Network network, String ip4Address, String ip6Address, Type vmType);
DhcpServiceProvider getDhcpServiceProvider(Network network);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index cae4e8a..d6a6450 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -4325,9 +4325,10 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
@Override
- public NicVO savePlaceholderNic(Network network, String ip4Address, Type vmType) {
+ public NicVO savePlaceholderNic(Network network, String ip4Address, String ip6Address, Type vmType) {
NicVO nic = new NicVO(null, null, network.getId(), null);
nic.setIp4Address(ip4Address);
+ nic.setIp6Address(ip6Address);
nic.setReservationStrategy(ReservationStrategy.PlaceHolder);
nic.setState(Nic.State.Reserved);
nic.setVmType(vmType);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index 6b63ead..21917f7 100755
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -2065,17 +2065,24 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
public NicVO getPlaceholderNicForRouter(Network network, Long podId) {
List<NicVO> nics = _nicDao.listPlaceholderNicsByNetworkIdAndVmType(network.getId(), VirtualMachine.Type.DomainRouter);
for (NicVO nic : nics) {
- if (nic.getReserver() == null && nic.getIp4Address() != null) {
+ if (nic.getReserver() == null && (nic.getIp4Address() != null || nic.getIp6Address() != null)) {
if (podId == null) {
return nic;
} else {
//return nic only when its ip address belong to the pod range (for the Basic zone case)
List<? extends Vlan> vlans = _vlanDao.listVlansForPod(podId);
for (Vlan vlan : vlans) {
- IpAddress ip = _ipAddressDao.findByIpAndNetworkId(network.getId(), nic.getIp4Address());
- if (ip != null && ip.getVlanId() == vlan.getId()) {
- return nic;
- }
+ if (nic.getIp4Address() != null) {
+ IpAddress ip = _ipAddressDao.findByIpAndNetworkId(network.getId(), nic.getIp4Address());
+ if (ip != null && ip.getVlanId() == vlan.getId()) {
+ return nic;
+ }
+ } else {
+ UserIpv6AddressVO ipv6 = _ipv6Dao.findByNetworkIdAndIp(network.getId(), nic.getIp6Address());
+ if (ipv6 != null && ipv6.getVlanId() == vlan.getId()) {
+ return nic;
+ }
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index 84008c0..b4577ac 100755
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -221,7 +221,6 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
throws InsufficientVirtualNetworkCapcityException,
InsufficientAddressCapacityException {
- //FIXME - save ipv6 informaiton in the placeholder nic
Transaction txn = Transaction.currentTxn();
txn.start();
_networkMgr.allocateDirectIp(nic, dc, vm, network, requestedIp4Addr, requestedIp6Addr);
@@ -229,8 +228,8 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
if (vm.getType() == VirtualMachine.Type.DomainRouter) {
Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, null);
if (placeholderNic == null) {
- s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIp4Address() + " and ipv6 address " + requestedIp6Addr + " for the network " + network);
- _networkMgr.savePlaceholderNic(network, nic.getIp4Address(), VirtualMachine.Type.DomainRouter);
+ s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIp4Address() + " and ipv6 address " + nic.getIp6Address() + " for the network " + network);
+ _networkMgr.savePlaceholderNic(network, nic.getIp4Address(), nic.getIp6Address(), VirtualMachine.Type.DomainRouter);
}
}
txn.commit();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
index cf27986..f21e352 100755
--- a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
@@ -203,7 +203,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, pod.getId());
if (placeholderNic == null) {
s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIp4Address() + " for the network " + network);
- _networkMgr.savePlaceholderNic(network, nic.getIp4Address(), VirtualMachine.Type.DomainRouter);
+ _networkMgr.savePlaceholderNic(network, nic.getIp4Address(), null, VirtualMachine.Type.DomainRouter);
}
}
txn.commit();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index e0ff157..db4786a 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -1740,30 +1740,34 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
s_logger.debug("Adding nic for Virtual Router in Guest network " + guestNetwork);
String defaultNetworkStartIp = null, defaultNetworkStartIpv6 = null;
if (!setupPublicNetwork) {
+ Nic placeholder = _networkModel.getPlaceholderNicForRouter(guestNetwork, plan.getPodId());
if (guestNetwork.getCidr() != null) {
- Nic placeholder = _networkModel.getPlaceholderNicForRouter(guestNetwork, plan.getPodId());
- if (placeholder != null) {
- s_logger.debug("Requesting ip address " + placeholder.getIp4Address() + " stored in placeholder nic for the network " + guestNetwork);
- defaultNetworkStartIp = placeholder.getIp4Address();
- } else {
- String startIp = _networkModel.getStartIpAddress(guestNetwork.getId());
- if (startIp != null && _ipAddressDao.findByIpAndSourceNetworkId(guestNetwork.getId(), startIp).getAllocatedTime() == null) {
- defaultNetworkStartIp = startIp;
- } else if (s_logger.isDebugEnabled()){
- s_logger.debug("First ip " + startIp + " in network id=" + guestNetwork.getId() +
- " is already allocated, can't use it for domain router; will get random ip address from the range");
- }
- }
+ if (placeholder != null && placeholder.getIp4Address() != null) {
+ s_logger.debug("Requesting ipv4 address " + placeholder.getIp4Address() + " stored in placeholder nic for the network " + guestNetwork);
+ defaultNetworkStartIp = placeholder.getIp4Address();
+ } else {
+ String startIp = _networkModel.getStartIpAddress(guestNetwork.getId());
+ if (startIp != null && _ipAddressDao.findByIpAndSourceNetworkId(guestNetwork.getId(), startIp).getAllocatedTime() == null) {
+ defaultNetworkStartIp = startIp;
+ } else if (s_logger.isDebugEnabled()){
+ s_logger.debug("First ipv4 " + startIp + " in network id=" + guestNetwork.getId() +
+ " is already allocated, can't use it for domain router; will get random ip address from the range");
+ }
+ }
}
-
- //FIXME - get ipv6 stored in the placeholder
+
if (guestNetwork.getIp6Cidr() != null) {
- String startIpv6 = _networkModel.getStartIpv6Address(guestNetwork.getId());
- if (startIpv6 != null && _ipv6Dao.findByNetworkIdAndIp(guestNetwork.getId(), startIpv6) == null) {
- defaultNetworkStartIpv6 = startIpv6;
- } else if (s_logger.isDebugEnabled()){
- s_logger.debug("First ipv6 " + startIpv6 + " in network id=" + guestNetwork.getId() +
- " is already allocated, can't use it for domain router; will get random ipv6 address from the range");
+ if (placeholder != null && placeholder.getIp6Address() != null) {
+ s_logger.debug("Requesting ipv6 address " + placeholder.getIp6Address() + " stored in placeholder nic for the network " + guestNetwork);
+ defaultNetworkStartIpv6 = placeholder.getIp6Address();
+ } else {
+ String startIpv6 = _networkModel.getStartIpv6Address(guestNetwork.getId());
+ if (startIpv6 != null && _ipv6Dao.findByNetworkIdAndIp(guestNetwork.getId(), startIpv6) == null) {
+ defaultNetworkStartIpv6 = startIpv6;
+ } else if (s_logger.isDebugEnabled()){
+ s_logger.debug("First ipv6 " + startIpv6 + " in network id=" + guestNetwork.getId() +
+ " is already allocated, can't use it for domain router; will get random ipv6 address from the range");
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/test/com/cloud/network/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/MockNetworkManagerImpl.java b/server/test/com/cloud/network/MockNetworkManagerImpl.java
index 7ab322b..077395f 100755
--- a/server/test/com/cloud/network/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/network/MockNetworkManagerImpl.java
@@ -66,15 +66,8 @@ import com.cloud.user.Account;
import com.cloud.user.User;
import com.cloud.utils.Pair;
import com.cloud.utils.component.ManagerBase;
-import com.cloud.vm.Nic;
-import com.cloud.vm.NicProfile;
-import com.cloud.vm.NicVO;
-import com.cloud.vm.ReservationContext;
-import com.cloud.vm.VMInstanceVO;
-import com.cloud.vm.VirtualMachine;
import com.cloud.vm.*;
import com.cloud.vm.VirtualMachine.Type;
-import com.cloud.vm.VirtualMachineProfile;
import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd;
import org.apache.cloudstack.api.command.admin.network.ListDedicatedGuestVlanRangesCmd;
import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
@@ -924,7 +917,7 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
@Override
- public NicVO savePlaceholderNic(Network network, String ip4Address, Type vmType) {
+ public NicVO savePlaceholderNic(Network network, String ip4Address, String ip6Address, Type vmType) {
// TODO Auto-generated method stub
return null;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a14ea8a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
index d46be7c..b609022 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -1393,7 +1393,7 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
@Override
- public NicVO savePlaceholderNic(Network network, String ip4Address, Type vmType) {
+ public NicVO savePlaceholderNic(Network network, String ip4Address, String ip6Address, Type vmType) {
// TODO Auto-generated method stub
return null;
}
[44/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack into disk_io_throttling
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/080bb761
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/080bb761
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/080bb761
Branch: refs/heads/disk_io_throttling
Commit: 080bb7618733dff5308165439194c9e152897dbc
Parents: 288c5b6 50dc67b
Author: Wei Zhou <w....@leaseweb.com>
Authored: Mon Jun 10 15:01:53 2013 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Mon Jun 10 15:01:53 2013 +0200
----------------------------------------------------------------------
api/src/com/cloud/network/NetworkModel.java | 2 +
.../affinitygroup/ListAffinityGroupsCmd.java | 7 +-
.../apache/cloudstack/query/QueryService.java | 3 +-
docs/en-US/CloudStack_GSoC_Guide.xml | 3 +-
docs/en-US/build-rpm.xml | 1 +
docs/en-US/gsoc-dharmesh.xml | 149 +++
docs/en-US/gsoc-meng.xml | 235 ++++
docs/en-US/images/mesos-integration-arch.jpg | 0
docs/en-US/pvlan.xml | 118 +-
.../com/cloud/network/dao/IPAddressDaoImpl.java | 1 +
.../rules/dao/PortForwardingRulesDao.java | 2 +-
.../rules/dao/PortForwardingRulesDaoImpl.java | 9 +-
.../src/com/cloud/usage/dao/UsageDao.java | 5 +-
.../src/com/cloud/usage/dao/UsageDaoImpl.java | 64 +
.../storage/volume/VolumeServiceImpl.java | 79 +-
.../vmware/resource/VmwareResource.java | 48 +-
server/src/com/cloud/api/ApiResponseHelper.java | 4 +-
.../com/cloud/api/query/QueryManagerImpl.java | 33 +-
.../consoleproxy/ConsoleProxyManagerImpl.java | 7 +
.../src/com/cloud/network/NetworkModelImpl.java | 5 +-
.../com/cloud/network/NetworkServiceImpl.java | 48 +-
.../cloud/network/rules/RulesManagerImpl.java | 2 +-
.../src/com/cloud/user/AccountManagerImpl.java | 4 +
.../com/cloud/network/MockNetworkModelImpl.java | 5 +
.../com/cloud/vpc/MockNetworkModelImpl.java | 5 +
test/integration/component/test_accounts.py | 4 -
.../component/test_advancedsg_networks.py | 1 +
test/integration/component/test_egress_rules.py | 1 -
test/integration/component/test_eip_elb.py | 6 -
test/integration/component/test_netscaler_lb.py | 1 -
.../component/test_network_offering.py | 1 -
.../component/test_project_configs.py | 2 -
.../component/test_project_limits.py | 1 -
test/integration/component/test_projects.py | 1 -
test/integration/component/test_tags.py | 2 -
test/integration/component/test_templates.py | 1 -
.../component/test_vm_passwdenabled.py | 1 -
test/integration/component/test_vpc.py | 1 -
test/integration/component/test_vpc_network.py | 275 ++--
.../component/test_vpc_network_pfrules.py | 487 ++++----
.../integration/component/test_vpc_offerings.py | 2 -
test/integration/component/test_vpc_routers.py | 4 -
.../component/test_vpc_vm_life_cycle.py | 1181 +++---------------
.../component/test_vpc_vms_deployment.py | 1 -
test/integration/smoke/test_network.py | 2 +-
test/integration/smoke/test_routers.py | 1 -
.../integration/smoke/test_service_offerings.py | 4 +-
test/integration/smoke/test_vm_life_cycle.py | 13 +-
.../definitions/systemvmtemplate/postinstall.sh | 13 +-
.../systemvmtemplate64/postinstall.sh | 15 +-
ui/scripts/network.js | 31 +-
ui/scripts/system.js | 4 +-
.../cloud/usage/parser/NetworkUsageParser.java | 11 +-
.../cloud/usage/parser/VmDiskUsageParser.java | 43 +-
utils/src/com/cloud/utils/net/NetUtils.java | 28 +
.../test/com/cloud/utils/net/NetUtilsTest.java | 19 +
56 files changed, 1434 insertions(+), 1562 deletions(-)
----------------------------------------------------------------------
[07/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
Changing URL to vcenter while adding a VmwareDC
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2ac4090
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2ac4090
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2ac4090
Branch: refs/heads/disk_io_throttling
Commit: c2ac4090d947dae21fdab31573b0a369de1fd2a2
Parents: e7d5cca
Author: Pranav Saxena <pr...@citrix.com>
Authored: Fri Jun 7 12:22:43 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Fri Jun 7 12:22:43 2013 +0530
----------------------------------------------------------------------
ui/scripts/zoneWizard.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2ac4090/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 6631cba..5870a7b 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -3366,10 +3366,11 @@
zoneId: args.data.returnedZone.id,
username: args.data.cluster.vCenterUsername,
password: args.data.cluster.vCenterPassword,
- name: args.data.cluster.vCenterDatacenter
+ name: args.data.cluster.vCenterDatacenter,
+ vcenter: args.data.cluster.vCenterHost
};
$.ajax({
- url: createURL('addVmwareDc&url=' + todb(url)),
+ url: createURL('addVmwareDc'),
data: vmwareData,
success: function(json) {
var item = json.addvmwaredcresponse.vmwaredc;
[28/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2604 Fixed deleting secondary ip when no PF rules set
Signed-off-by: Abhinandan Prateek <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c1ad3b79
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c1ad3b79
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c1ad3b79
Branch: refs/heads/disk_io_throttling
Commit: c1ad3b7974449f457a1cc4e50fe7af260d1c5bf6
Parents: 673b293
Author: Jayapal <ja...@citrix.com>
Authored: Thu May 23 16:10:44 2013 +0530
Committer: Abhinandan Prateek <ap...@apache.org>
Committed: Mon Jun 10 12:13:08 2013 +0530
----------------------------------------------------------------------
api/src/com/cloud/network/NetworkModel.java | 2 ++
.../network/rules/dao/PortForwardingRulesDao.java | 2 +-
.../network/rules/dao/PortForwardingRulesDaoImpl.java | 9 ++++++++-
server/src/com/cloud/network/NetworkModelImpl.java | 5 +++--
server/src/com/cloud/network/NetworkServiceImpl.java | 13 +++++++++----
.../src/com/cloud/network/rules/RulesManagerImpl.java | 2 +-
.../test/com/cloud/network/MockNetworkModelImpl.java | 5 +++++
server/test/com/cloud/vpc/MockNetworkModelImpl.java | 5 +++++
8 files changed, 34 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/api/src/com/cloud/network/NetworkModel.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkModel.java b/api/src/com/cloud/network/NetworkModel.java
index f84a8b0..05307eb 100644
--- a/api/src/com/cloud/network/NetworkModel.java
+++ b/api/src/com/cloud/network/NetworkModel.java
@@ -272,4 +272,6 @@ public interface NetworkModel {
Map<Detail, String> getNtwkOffDetails(long offId);
Networks.IsolationType[] listNetworkIsolationMethods();
+
+ Nic getNicInNetworkIncludingRemoved(long vmId, long networkId);
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
index 682a941..9a1d321 100644
--- a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
+++ b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
@@ -43,5 +43,5 @@ public interface PortForwardingRulesDao extends GenericDao<PortForwardingRuleVO,
List<PortForwardingRuleVO> listByAccount(long accountId);
List<PortForwardingRuleVO> listByDestIpAddr(String ip4Address);
-
+ PortForwardingRuleVO findByIdAndIp(long id, String secondaryIp);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
index cc780cb..c0db780 100644
--- a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
@@ -158,5 +158,12 @@ public class PortForwardingRulesDaoImpl extends GenericDaoBase<PortForwardingRul
sc.setParameters("dstIp", ip4Address);
return listBy(sc);
}
-
+
+ @Override
+ public PortForwardingRuleVO findByIdAndIp(long id, String secondaryIp) {
+ SearchCriteria<PortForwardingRuleVO> sc = AllFieldsSearch.create();
+ sc.setParameters("id", id);
+ sc.setParameters("dstIp", secondaryIp);
+ return findOneBy(sc);
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index 21917f7..fa34d65 100755
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -770,7 +770,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
@Override
public Nic getNicInNetwork(long vmId, long networkId) {
- return _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(networkId, vmId);
+ return _nicDao.findByNtwkIdAndInstanceId(networkId, vmId);
}
@Override
@@ -1761,7 +1761,8 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
return true;
}
- Nic getNicInNetworkIncludingRemoved(long vmId, long networkId) {
+ @Override
+ public Nic getNicInNetworkIncludingRemoved(long vmId, long networkId) {
return _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(networkId, vmId);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index c7be2c6..d5a59d6 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -789,10 +789,15 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
if (dc.getNetworkType() == NetworkType.Advanced && network.getGuestType() == Network.GuestType.Isolated) {
//check PF or static NAT is configured on this ip address
String secondaryIp = secIpVO.getIp4Address();
- List<PortForwardingRuleVO> pfRuleList = _portForwardingDao.listByDestIpAddr(secondaryIp);
- if (pfRuleList.size() != 0) {
- s_logger.debug("VM nic IP " + secondaryIp + " is associated with the port forwarding rule");
- throw new InvalidParameterValueException("Can't remove the secondary ip " + secondaryIp + " is associate with the port forwarding rule");
+ List<FirewallRuleVO> fwRulesList = _firewallDao.listByNetworkAndPurpose(network.getId(), Purpose.PortForwarding);
+
+ if (fwRulesList.size() != 0) {
+ for (FirewallRuleVO rule: fwRulesList) {
+ if (_portForwardingDao.findByIdAndIp(rule.getId(), secondaryIp) != null) {
+ s_logger.debug("VM nic IP " + secondaryIp + " is associated with the port forwarding rule");
+ throw new InvalidParameterValueException("Can't remove the secondary ip " + secondaryIp + " is associate with the port forwarding rule");
+ }
+ }
}
//check if the secondary ip associated with any static nat rule
IPAddressVO publicIpVO = _ipAddressDao.findByVmIp(secondaryIp);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/server/src/com/cloud/network/rules/RulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/rules/RulesManagerImpl.java b/server/src/com/cloud/network/rules/RulesManagerImpl.java
index 41bf2b3..bcda32d 100755
--- a/server/src/com/cloud/network/rules/RulesManagerImpl.java
+++ b/server/src/com/cloud/network/rules/RulesManagerImpl.java
@@ -1371,7 +1371,7 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules
// create new static nat rule
// Get nic IP4 address
- Nic guestNic = _networkModel.getNicInNetwork(vm.getId(), networkId);
+ Nic guestNic = _networkModel.getNicInNetworkIncludingRemoved(vm.getId(), networkId);
if (guestNic == null) {
throw new InvalidParameterValueException("Vm doesn't belong to the network with specified id");
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/server/test/com/cloud/network/MockNetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/MockNetworkModelImpl.java b/server/test/com/cloud/network/MockNetworkModelImpl.java
index c3a0d6c..3a36748 100644
--- a/server/test/com/cloud/network/MockNetworkModelImpl.java
+++ b/server/test/com/cloud/network/MockNetworkModelImpl.java
@@ -874,4 +874,9 @@ public class MockNetworkModelImpl extends ManagerBase implements NetworkModel {
// TODO Auto-generated method stub
return null;
}
+
+ @Override
+ public Nic getNicInNetworkIncludingRemoved(long vmId, long networkId) {
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/server/test/com/cloud/vpc/MockNetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkModelImpl.java b/server/test/com/cloud/vpc/MockNetworkModelImpl.java
index d9e33b7..3e67f5e 100644
--- a/server/test/com/cloud/vpc/MockNetworkModelImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkModelImpl.java
@@ -887,4 +887,9 @@ public class MockNetworkModelImpl extends ManagerBase implements NetworkModel {
return null;
}
+ @Override
+ public Nic getNicInNetworkIncludingRemoved(long vmId, long networkId) {
+ return null;
+ }
+
}
[27/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2761 Fixed PF/StaticNAT in vmware vpc
Signed-off-by: Abhinandan Prateek <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/673b293d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/673b293d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/673b293d
Branch: refs/heads/disk_io_throttling
Commit: 673b293d75419a4b76379092db2b204cdc6160a4
Parents: 22a8508
Author: Jayapal <ja...@citrix.com>
Authored: Wed Jun 5 19:13:03 2013 +0530
Committer: Abhinandan Prateek <ap...@apache.org>
Committed: Mon Jun 10 11:04:01 2013 +0530
----------------------------------------------------------------------
.../vmware/resource/VmwareResource.java | 48 +++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/673b293d/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 5944cc8..46219c3 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -811,7 +811,53 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
return new SetFirewallRulesAnswer(cmd, true, results);
}
+ protected SetStaticNatRulesAnswer SetVPCStaticNatRules(SetStaticNatRulesCommand cmd) {
+ if (s_logger.isInfoEnabled()) {
+ s_logger.info("Executing resource SetVPCStaticNatRulesCommand: " + _gson.toJson(cmd));
+ }
+
+ String[] results = new String[cmd.getRules().length];
+ VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
+ String controlIp = getRouterSshControlIp(cmd);
+
+ int i = 0;
+ boolean endResult = true;
+ for (StaticNatRuleTO rule : cmd.getRules()) {
+ // Prepare command to be send to VPC VR
+ String args = "";
+ args += rule.revoked() ? " -D" : " -A";
+ args += " -l " + rule.getSrcIp();
+ args += " -r " + rule.getDstIp();
+
+ // Invoke command on VPC VR.
+ try {
+ Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticnat.sh " + args);
+
+ if (s_logger.isDebugEnabled())
+ s_logger.debug("Executing script on domain router " + controlIp + ": /opt/cloud/bin/vpc_staticnat.sh " + args);
+
+ if (!result.first()) {
+ s_logger.error("SetVPCStaticNatRulesCommand failure on setting one rule. args: " + args);
+ results[i++] = "Failed";
+ endResult = false;
+ } else {
+ results[i++] = null;
+ }
+ } catch (Throwable e) {
+ s_logger.error("SetVPCStaticNatRulesCommand (args: " + args + ") failed on setting one rule due to " + VmwareHelper.getExceptionMessage(e), e);
+ results[i++] = "Failed";
+ endResult = false;
+ }
+ }
+ return new SetStaticNatRulesAnswer(cmd, results, endResult);
+ }
+
protected Answer execute(SetStaticNatRulesCommand cmd) {
+
+ if (cmd.getVpcId() != null) {
+ return SetVPCStaticNatRules(cmd);
+ }
+
if (s_logger.isInfoEnabled()) {
s_logger.info("Executing resource SetFirewallRuleCommand: " + _gson.toJson(cmd));
}
@@ -1262,7 +1308,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
args += rule.revoked() ? " -D" : " -A";
args += " -P " + rule.getProtocol().toLowerCase();
args += " -l " + rule.getSrcIp();
- args += " -p " + rule.getStringSrcPortRange().replace(":", "-");
+ args += " -p " + rule.getStringSrcPortRange();
args += " -r " + rule.getDstIp();
args += " -d " + rule.getStringDstPortRange().replace(":", "-");
[05/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2889: Resize volume unsupported on vmware
Skip the tests if the VM deploys on a VmWare host since we do not
support resizing volumes on vmware (yet)
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6208a512
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6208a512
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6208a512
Branch: refs/heads/disk_io_throttling
Commit: 6208a51283bfdb401f76f042296c16304ee8f4e4
Parents: 4a14ea8
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Fri Jun 7 11:29:56 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Fri Jun 7 11:31:10 2013 +0530
----------------------------------------------------------------------
test/integration/smoke/test_volumes.py | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6208a512/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index d9c808a..7039c6f 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -591,6 +591,8 @@ class TestVolumes(cloudstackTestCase):
if hosts[0].hypervisor == "XenServer":
self.virtual_machine.stop(self.apiClient)
+ elif hosts[0].hypervisor.lower() == "vmware":
+ self.skipTest("Resize Volume is unsupported on VmWare")
self.apiClient.resizeVolume(cmd)
count = 0
@@ -638,6 +640,9 @@ class TestVolumes(cloudstackTestCase):
if hosts[0].hypervisor == "XenServer":
self.virtual_machine.stop(self.apiClient)
+ elif hosts[0].hypervisor.lower() == "vmware":
+ self.skipTest("Resize Volume is unsupported on VmWare")
+
self.debug("Resize Volume ID: %s" % self.volume.id)
cmd = resizeVolume.resizeVolumeCmd()
[29/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to
8b8a0d3
Posted by we...@apache.org.
CLOUDSTACK-2650 setting vm ip null in user_ip_address when static nat ip
Signed-off-by: Abhinandan Prateek <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c8d607ea
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c8d607ea
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c8d607ea
Branch: refs/heads/disk_io_throttling
Commit: c8d607eae5db696b20f797a3297ad5eb5c746115
Parents: c1ad3b7
Author: Jayapal <ja...@citrix.com>
Authored: Fri May 24 11:52:25 2013 +0530
Committer: Abhinandan Prateek <ap...@apache.org>
Committed: Mon Jun 10 12:14:34 2013 +0530
----------------------------------------------------------------------
engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8d607ea/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
index 1839ca4..886011e 100755
--- a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
@@ -155,6 +155,7 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
address.setAssociatedWithNetworkId(null);
address.setVpcId(null);
address.setSystem(false);
+ address.setVmIp(null);
update(ipAddressId, address);
}