Skip to content

Commit d3089ba

Browse files
author
Kishan Kavala
committed
Merge branch 'master' into regions
2 parents 158ee8b + 482ce5f commit d3089ba

27 files changed

Lines changed: 8840 additions & 4959 deletions

File tree

LICENSE

Lines changed: 1 addition & 3568 deletions
Large diffs are not rendered by default.

NOTICE

Lines changed: 1 addition & 617 deletions
Large diffs are not rendered by default.

api/src/org/apache/cloudstack/api/ApiErrorCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public enum ApiErrorCode {
3333
ACCOUNT_RESOURCE_LIMIT_ERROR(532),
3434
INSUFFICIENT_CAPACITY_ERROR(533),
3535
RESOURCE_UNAVAILABLE_ERROR(534),
36-
RESOURCE_ALLOCATION_ERROR(534),
36+
RESOURCE_ALLOCATION_ERROR(535),
3737
RESOURCE_IN_USE_ERROR(536),
3838
NETWORK_RULE_CONFLICT_ERROR(537);
3939

api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
146146
"Mutually exclusive with securitygroupids parameter")
147147
private List<String> securityGroupNameList;
148148

149-
@ACL(checkKeyAccess=true)
150-
@Parameter(name = ApiConstants.IP_NETWORK_LIST, type = CommandType.MAP, entityType={Network.class, IpAddress.class},
149+
@Parameter(name = ApiConstants.IP_NETWORK_LIST, type = CommandType.MAP,
151150
description = "ip to network mapping. Can't be specified with networkIds parameter." +
152151
" Example: iptonetworklist[0].ip=10.10.10.11&iptonetworklist[0].networkid=uuid - requests to use ip 10.10.10.11 in network id=uuid")
153152
private Map ipToNetworkList;

api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.apache.cloudstack.api.APICommand;
2323

24-
import org.apache.cloudstack.api.response.DiskOfferingResponse;
24+
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
2525
import org.apache.cloudstack.api.response.UserVmResponse;
2626
import com.cloud.exception.InvalidParameterValueException;
2727
import com.cloud.offering.ServiceOffering;
@@ -44,7 +44,7 @@ public class UpgradeVMCmd extends BaseCmd {
4444
required=true, description="The ID of the virtual machine")
4545
private Long id;
4646

47-
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=DiskOfferingResponse.class,
47+
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=ServiceOfferingResponse.class,
4848
required=true, description="the service offering ID to apply to the virtual machine")
4949
private Long serviceOfferingId;
5050

console-proxy/pom.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<artifactId>cloudstack</artifactId>
2626
<version>4.1.0-SNAPSHOT</version>
2727
</parent>
28+
<properties>
29+
<mkisofs>mkisofs</mkisofs>
30+
</properties>
2831
<dependencies>
2932
<dependency>
3033
<groupId>log4j</groupId>
@@ -167,6 +170,19 @@
167170
</plugins>
168171
</build>
169172
<profiles>
173+
<!-- Debian will never distribute mkisofs due to licensing issues.
174+
Fortunately genisoimage is a work-alike -->
175+
<profile>
176+
<id>genisoimage</id>
177+
<activation>
178+
<file>
179+
<exists>/usr/bin/genisoimage</exists>
180+
</file>
181+
</activation>
182+
<properties>
183+
<mkisofs>genisoimage</mkisofs>
184+
</properties>
185+
</profile>
170186
<profile>
171187
<id>vmware</id>
172188
<activation>
@@ -209,7 +225,7 @@
209225
</execution>
210226
</executions>
211227
<configuration>
212-
<executable>mkisofs</executable>
228+
<executable>${mkisofs}</executable>
213229
<workingDirectory>dist</workingDirectory>
214230
<arguments>
215231
<argument>-quiet</argument>

core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ private Answer execute(UploadTemplateToS3FromSecondaryStorageCommand cmd) {
398398
@Override
399399
public boolean accept(final File directory,
400400
final String fileName) {
401-
return !fileName.startsWith(".");
401+
File fileToUpload = new File(directory.getAbsolutePath() + "/" + fileName);
402+
return !fileName.startsWith(".") && !fileToUpload.isDirectory();
402403
}
403404
}, new ObjectNamingStrategy() {
404405
@Override

docs/en-US/network-rate.xml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version='1.0' encoding='utf-8' ?>
2+
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
3+
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
4+
%BOOK_ENTITIES;
5+
]>
6+
<!-- Licensed to the Apache Software Foundation (ASF) under one
7+
or more contributor license agreements. See the NOTICE file
8+
distributed with this work for additional information
9+
regarding copyright ownership. The ASF licenses this file
10+
to you under the Apache License, Version 2.0 (the
11+
"License"); you may not use this file except in compliance
12+
with the License. You may obtain a copy of the License at
13+
http://www.apache.org/licenses/LICENSE-2.0
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
<section id="network-rate">
22+
<title>Network Throttling</title>
23+
<para>Network throttling is the process of controlling the network access and bandwidth usage
24+
based on certain rules. &PRODUCT; controls this behaviour of the guest networks in the cloud by
25+
using the network rate parameter. This parameter is defined as the default data transfer rate in
26+
Mbps (Megabits Per Second) allowed in a guest network. It defines the upper limits for network
27+
utilization. If the current utilization is below the allowed upper limits, access is granted,
28+
else revoked.</para>
29+
<para>You can throttle the network bandwidth either to control the usage above a certain limit for
30+
some accounts, or to control network congestion in a large cloud environment. The network rate
31+
for your cloud can be configured on the following:</para>
32+
<itemizedlist>
33+
<listitem>
34+
<para>Network Offering</para>
35+
</listitem>
36+
<listitem>
37+
<para>Service Offering</para>
38+
</listitem>
39+
<listitem>
40+
<para>Global parameter</para>
41+
</listitem>
42+
</itemizedlist>
43+
<para>If network rate is set to NULL in service offering, the value provided in the
44+
vm.network.throttling.rate global parameter is applied. If the value is set to NULL for network
45+
offering, the value provided in the network.throttling.rate global parameter is
46+
considered.</para>
47+
<para>For the default public, storage, and management networks, network rate is set to 0. This
48+
implies that the public, storage, and management networks will have unlimited bandwidth by
49+
default. For default guest networks, network rate is set to NULL. In this case, network rate is
50+
defaulted to the global parameter value.</para>
51+
<para>The following table gives you an overview of how network rate is applied on different types
52+
of networks in &PRODUCT;.</para>
53+
<informaltable>
54+
<tgroup cols="2" align="left" colsep="1" rowsep="1">
55+
<colspec colwidth="1.0*" colname="1" colnum="1"/>
56+
<colspec colwidth="3.18*" colname="2" colnum="2"/>
57+
<thead>
58+
<row>
59+
<entry><para>Networks</para></entry>
60+
<entry><para>Network Rate Is Taken from</para></entry>
61+
</row>
62+
</thead>
63+
<tbody>
64+
<row>
65+
<entry><para>Guest network of Virtual Router</para></entry>
66+
<entry><para>Guest Network Offering</para></entry>
67+
</row>
68+
<row>
69+
<entry><para>Public network of Virtual Router</para></entry>
70+
<entry><para>Guest Network Offering</para></entry>
71+
</row>
72+
<row>
73+
<entry><para>Storage network of Secondary Storage VM</para></entry>
74+
<entry><para>System Network Offering</para></entry>
75+
</row>
76+
<row>
77+
<entry><para>Management network of Secondary Storage VM</para></entry>
78+
<entry><para>System Network Offering</para></entry>
79+
</row>
80+
<row>
81+
<entry><para>Storage network of Console Proxy VM</para></entry>
82+
<entry><para>System Network Offering</para></entry>
83+
</row>
84+
<row>
85+
<entry><para>Management network of Console Proxy VM</para></entry>
86+
<entry><para>System Network Offering</para></entry>
87+
</row>
88+
<row>
89+
<entry><para>Storage network of Virtual Router</para></entry>
90+
<entry><para>System Network Offering</para></entry>
91+
</row>
92+
<row>
93+
<entry><para>Management network of Virtual Router</para></entry>
94+
<entry><para>System Network Offering</para></entry>
95+
</row>
96+
<row>
97+
<entry><para>Public network of Secondary Storage VM</para></entry>
98+
<entry><para>System Network Offering</para></entry>
99+
</row>
100+
<row>
101+
<entry><para>Public network of Console Proxy VM</para></entry>
102+
<entry><para>System Network Offering</para></entry>
103+
</row>
104+
<row>
105+
<entry><para>Default network of a guest VM</para></entry>
106+
<entry><para>Compute Offering</para></entry>
107+
</row>
108+
<row>
109+
<entry><para>Additional networks of a guest VM</para></entry>
110+
<entry><para>Corresponding Network Offerings</para></entry>
111+
</row>
112+
</tbody>
113+
</tgroup>
114+
</informaltable>
115+
<para>A guest VM must have a default network, and can also have many additional networks.
116+
Depending on various parameters, such as the host and virtual switch used, you can observe a
117+
difference in the network rate in your cloud. For example, on a VMware host the actual network
118+
rate varies based on where they are configured (compute offering, network offering, or both);
119+
the network type (shared or isolated); and traffic direction (ingress or egress). </para>
120+
<para>The network rate set for a network offering used by a particular network in &PRODUCT; is
121+
used for the traffic shaping policy of a port group, for example: port group A, for that
122+
network: a particular subnet or VLAN on the actual network. The virtual routers for that network
123+
connects to the port group A, and by default instances in that network connects to this port
124+
group. However, if an instance is deployed with a compute offering with the network rate set,
125+
and if this rate is used for the traffic shaping policy of another port group for the network,
126+
for example port group B, then instances using this compute offering are connected to the port
127+
group B, instead of connecting to port group A.</para>
128+
<para>The traffic shaping policy on standard port groups in VMware only applies to the egress
129+
traffic, and the net effect depends on the type of network used in &PRODUCT;. In shared
130+
networks, ingress traffic is unlimited for &PRODUCT;, and egress traffic is limited to the rate
131+
that applies to the port group used by the instance if any. If the compute offering has a
132+
network rate configured, this rate applies to the egress traffic, otherwise the network rate set
133+
for the network offering applies. For isolated networks, the network rate set for the network
134+
offering, if any, effectively applies to the ingress traffic. This is mainly because the network
135+
rate set for the network offering applies to the egress traffic from the virtual router to the
136+
instance. The egress traffic is limited by the rate that applies to the port group used by the
137+
instance if any, similar to shared networks. </para>
138+
<para>For example:</para>
139+
<para>Network rate of network offering = 10 Mbps</para>
140+
<para>Network rate of compute offering = 200 Mbps</para>
141+
<para>In shared networks, ingress traffic will not be limited for &PRODUCT;, while egress traffic
142+
will be limited to 200 Mbps. In an isolated network, ingress traffic will be limited to 10 Mbps
143+
and egress to 200 Mbps.</para>
144+
</section>

docs/en-US/offerings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@
2525
are discussed in the section on setting up networking for users.</para>
2626
<xi:include href="compute-disk-service-offerings.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
2727
<xi:include href="system-service-offerings.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
28+
<xi:include href="network-rate.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
2829
<xi:include href="sys-offering-sysvm.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
2930
</chapter>

0 commit comments

Comments
 (0)