Merge branch 'master' into gslb-wip

This commit is contained in:
Murali Reddy 2013-03-20 00:44:52 +05:30
commit d56ccd438d
10 changed files with 425 additions and 12 deletions

View File

@ -48,6 +48,8 @@ public class VpnUsersResponse extends BaseResponse implements ControlledEntityRe
@SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the vpn")
private String projectName;
@SerializedName(ApiConstants.STATE) @Param(description="the state of the Vpn User")
private String state;
public void setId(String id) {
this.id = id;
@ -80,4 +82,12 @@ public class VpnUsersResponse extends BaseResponse implements ControlledEntityRe
this.projectName = projectName;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
}

View File

@ -57,5 +57,6 @@
<xi:include href="aws-interface-compatibility.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="network-setup.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="networks.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="best-practices.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="Revision_History_Install_Guide.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>

View File

@ -0,0 +1,82 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.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="best-practices">
<title>Best Practices</title>
<para>Deploying a cloud is challenging. There are many different technology choices to make, and &PRODUCT; is flexible enough in its configuration that there are many possible ways to combine and configure the chosen technology. This section contains suggestions and requirements about cloud deployments.</para>
<para>These should be treated as suggestions and not absolutes. However, we do encourage anyone planning to build a cloud outside of these guidelines to seek guidance and advice on the project mailing lists.</para>
<section id="process-best-practices">
<title>Process Best Practices</title>
<itemizedlist>
<listitem>
<para>A staging system that models the production environment is strongly advised. It is critical if customizations have been applied to &PRODUCT;.</para>
</listitem>
<listitem>
<para>Allow adequate time for installation, a beta, and learning the system. Installs with basic networking can be done in hours. Installs with advanced networking usually take several days for the first attempt, with complicated installations taking longer. For a full production system, allow at least 4-8 weeks for a beta to work through all of the integration issues. You can get help from fellow users on the cloudstack-users mailing list.</para>
</listitem>
</itemizedlist>
</section>
<section id="setup-best-practices">
<title>Setup Best Practices</title>
<itemizedlist>
<listitem>
<para>Each host should be configured to accept connections only from well-known entities such as the &PRODUCT; Management Server or your network monitoring software.</para>
</listitem>
<listitem>
<para>Use multiple clusters per pod if you need to achieve a certain switch density.</para>
</listitem>
<listitem>
<para>Primary storage mountpoints or LUNs should not exceed 6 TB in size. It is better to have multiple smaller primary storage elements per cluster than one large one.</para>
</listitem>
<listitem>
<para>When exporting shares on primary storage, avoid data loss by restricting the range of IP addresses that can access the storage. See "Linux NFS on Local Disks and DAS" or "Linux NFS on iSCSI".</para>
</listitem>
<listitem>
<para>NIC bonding is straightforward to implement and provides increased reliability.</para>
</listitem>
<listitem>
<para>10G networks are generally recommended for storage access when larger servers that can support relatively more VMs are used.</para>
</listitem>
<listitem>
<para>Host capacity should generally be modeled in terms of RAM for the guests. Storage and CPU may be overprovisioned. RAM may not. RAM is usually the limiting factor in capacity designs.</para>
</listitem>
<listitem>
<para>(XenServer) Configure the XenServer dom0 settings to allocate more memory to dom0. This can enable XenServer to handle larger numbers of virtual machines. We recommend 2940 MB of RAM for XenServer dom0. For instructions on how to do this, see <ulink url="http://support.citrix.com/article/CTX126531">http://support.citrix.com/article/CTX126531</ulink>. The article refers to XenServer 5.6, but the same information applies to XenServer 6.0.</para>
</listitem>
</itemizedlist>
</section>
<section id="maintenance-best-practices">
<title>Maintenance Best Practices</title>
<itemizedlist>
<listitem>
<para>Monitor host disk space. Many host failures occur because the host's root disk fills up from logs that were not rotated adequately.</para>
</listitem>
<listitem>
<para>Monitor the total number of VM instances in each cluster, and disable allocation to the cluster if the total is approaching the maximum that the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of one or more hosts failing, which would increase the VM load on the other hosts as the VMs are redeployed. Consult the documentation for your chosen hypervisor to find the maximum permitted number of VMs per host, then use &PRODUCT; global configuration settings to set this as the default limit. Monitor the VM activity in each cluster and keep the total number of VMs below a safe level that allows for the occasional host failure. For example, if there are N hosts in the cluster, and you want to allow for one host in the cluster to be down at any given time, the total number of VM instances you can permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this number of VMs, use the &PRODUCT; UI to disable allocation to the cluster.</para>
</listitem>
</itemizedlist>
<warning><para>The lack of up-do-date hotfixes can lead to data corruption and lost VMs.</para></warning>
<para>Be sure all the hotfixes provided by the hypervisor vendor are applied. Track the release of hypervisor patches through your hypervisor vendors support channel, and apply patches as soon as possible after they are released. &PRODUCT; will not track or notify you of required hypervisor patches. It is essential that your hosts are completely up to date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to support any system that is not up to date with patches.</para>
</section>
</chapter>

View File

@ -34,15 +34,139 @@
<row>
<entry>
<para>createNetworkOffering</para>
</entry>
<entry>
<para>The following request parameters have been added:</para>
<itemizedlist>
<listitem>
<para>isPersistent</para>
</listitem>
<listitem>
<para>startipv6</para>
</listitem>
<listitem>
<para>endipv6</para>
</listitem>
<listitem>
<para>ip6gateway</para>
</listitem>
<listitem>
<para>ip6cidr</para>
</listitem>
</itemizedlist>
</entry>
</row>
<row>
<entry>
<para>listNetworkOfferings</para>
<para>listNetworks</para>
</entry>
<entry>
<para>The following request parameters is added: isPersistent.</para>
<para>This parameter determines if the network or network offering created or listed by
using this offering are persistent or not.</para>
<para>The following request parameters has been added: isPersistent</para>
<para>This parameter determines if the network or network offering listed by using this
offering are persistent or not.</para>
</entry>
</row>
<row>
<entry>
<para>createVlanIpRange</para>
</entry>
<entry>
<para>The following request parameters have been added:</para>
<itemizedlist>
<listitem>
<para>startipv6</para>
</listitem>
<listitem>
<para>endipv6</para>
</listitem>
<listitem>
<para>ip6gateway</para>
</listitem>
<listitem>
<para>ip6cidr</para>
</listitem>
</itemizedlist>
</entry>
</row>
<row>
<entry>
<para>deployVirtualMachine</para>
</entry>
<entry>
<para>The following parameter has been added: ip6Address.</para>
<para>The following parameter is updated to accept the IPv6 address:
iptonetworklist.</para>
</entry>
</row>
<row>
<entry>
<para>CreateZoneCmd</para>
</entry>
<entry>
<para>The following parameter are added: ip6dns1, ip6dns2.</para>
</entry>
</row>
<row>
<entry>
<para>listRouters</para>
<para>listVirtualMachines</para>
</entry>
<entry>
<para>For nic responses, the following fields has been added.</para>
<itemizedlist>
<listitem>
<para>ip6address</para>
</listitem>
<listitem>
<para>ip6gateway</para>
</listitem>
<listitem>
<para>ip6cidr</para>
</listitem>
</itemizedlist>
</entry>
</row>
<row>
<entry>
<para>listVlanIpRanges</para>
</entry>
<entry>
<para>For nic responses, the following fields has been added.</para>
<itemizedlist>
<listitem>
<para>startipv6</para>
</listitem>
<listitem>
<para>endipv6</para>
</listitem>
<listitem>
<para>ip6gateway</para>
</listitem>
<listitem>
<para>ip6cidr</para>
</listitem>
</itemizedlist>
</entry>
</row>
<row>
<entry>
<para>listRouters</para>
<para>listZones</para>
</entry>
<entry>
<para>For DomainRouter and DataCenter response, the following fields have been
added.</para>
<itemizedlist>
<listitem>
<para>ip6dns1</para>
</listitem>
<listitem>
<para>ip6dns2</para>
</listitem>
</itemizedlist>
</entry>
</row>
<row>
<entry>
<para>addF5LoadBalancer</para>

191
docs/en-US/ipv6-support.xml Normal file
View File

@ -0,0 +1,191 @@
<?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.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.
-->
<section id="ipv6-support">
<title>IPv6 Support in &PRODUCT;</title>
<para>&PRODUCT;supports Internet Protocol version 6 (IPv6), the recent version of the Internet
Protocol (IP) that defines routing the network traffic. IPv6 uses a 128-bit address that
exponentially expands the current address space that is available to the users. IPv6 addresses
consist of eight groups of four hexadecimal digits separated by colons, for example,
5001:0dt8:83a3:1012:1000:8s2e:0870:7454. &PRODUCT; supports IPv6 for public IPs in shared
networks. With IPv6 support, VMs in shared networks can obtain both IPv4 and IPv6 addresses from
the DHCP server. You can deploy VMs either in a IPv6 or IPv4 network, or in a dual network
environment. If IPv6 network is used, the VM generates a link-local IPv6 address by itself, and
receives a stateful IPv6 address from the DHCPv6 server.</para>
<para>IPv6 is supported only on KVM and XenServer hypervisors. The IPv6 support is only an
experimental feature.</para>
<para>Here's the sequence of events when IPv6 is used: </para>
<orderedlist>
<listitem>
<para>The administrator creates an IPv6 shared network in an advanced zone.</para>
</listitem>
<listitem>
<para>The user deploys a VM in an IPv6 shared network.</para>
</listitem>
<listitem>
<para>The user VM generates an IPv6 link local address by itself, and gets an IPv6 global or
site local address through DHCPv6.</para>
<para>For information on API changes, see <xref linkend="changed-apicommands-4.1"/>.</para>
</listitem>
</orderedlist>
<section id="guidelines-ipv6">
<title>Prerequisites and Guidelines</title>
<para>Consider the following:</para>
<itemizedlist>
<listitem>
<para>CIDR size must be 64 for IPv6 networks.</para>
</listitem>
<listitem>
<para>The DHCP client of the guest VMs should support generating DUID based on Link-layer
Address (DUID- LL). DUID-LL derives from the MAC address of guest VMs, and therefore the
user VM can be identified by using DUID. See <ulink
url="http://tools.ietf.org/html/rfc3315">Dynamic Host Configuration Protocol for IPv6
</ulink>for more information.</para>
</listitem>
<listitem>
<para>The gateway of the guest network generates Router Advisement and Response messages to
Router Solicitation. The M (Managed Address Configuration) flag of Router Advisement
should enable stateful IP address configuration. Set the M flag to where the end nodes
receive their IPv6 addresses from the DHCPv6 server as opposed to the router or
switch.</para>
<note>
<para>The M flag is the 1-bit Managed Address Configuration flag for Router Advisement.
When set, Dynamic Host Configuration Protocol (DHCPv6) is available for address
configuration in addition to any IPs set by using stateless address
auto-configuration.</para>
</note>
</listitem>
<listitem>
<para>Use the System VM template exclusively designed to support IPv6. Download the System
VM template from <ulink url="http://nfs1.lab.vmops.com/templates/routing/debian/ipv6/"
>http://nfs1.lab.vmops.com/templates/routing/debian/ipv6/</ulink>.</para>
</listitem>
<listitem>
<para>The concept of Default Network applies to IPv6 networks. However, unlike IPv4
&PRODUCT; does not control the routing information of IPv6 in shared network; the choice
of Default Network will not affect the routing in the user VM.</para>
</listitem>
<listitem>
<para>In a multiple shared network, the default route is set by the rack router, rather than
the DHCP server, which is out of &PRODUCT; control. Therefore, in order for the user VM to
get only the default route from the default NIC, modify the configuration of the user VM,
and set non-default NIC's <code>accept_ra</code> to 0 explicitly. The
<code>accept_ra</code> parameter accepts Router Advertisements and auto-configure
<code>/proc/sys/net/ipv6/conf/interface</code> with received data.</para>
</listitem>
</itemizedlist>
</section>
<section id="limitsipv6">
<title>Limitations of IPv6 in &PRODUCT; </title>
<para>The following are not yet supported:</para>
<orderedlist>
<listitem>
<para>Security groups</para>
</listitem>
<listitem>
<para>Userdata and metadata</para>
</listitem>
<listitem>
<para>Passwords</para>
</listitem>
<listitem>
<para>The administrator cannot specify the IPv6 address of a VM.</para>
</listitem>
</orderedlist>
</section>
<section id="network-conf-dhcpv6">
<title>Network Configuration for DHCPv6</title>
<para>Use DUID-LL to get IPv6 address from DHCP server</para>
<orderedlist>
<listitem>
<para>Set up dhclient by using DUID-LL.</para>
<para>Perform the following for DHCP Client 4.2 and above:</para>
<orderedlist numeration="loweralpha">
<listitem>
<para>Run the following command on the selected VM to get the dhcpv6 offer from
VR:</para>
<programlisting>dhclient -6 -D LL &lt;dev&gt;</programlisting>
</listitem>
</orderedlist>
<para>Perform the following for DHCP Client 4.1:</para>
<orderedlist numeration="loweralpha">
<listitem>
<para>Open the following to the dhclient configuration file:</para>
<programlisting>vi /etc/dhcp/dhclient.conf</programlisting>
</listitem>
<listitem>
<para>Add the following to the dhclient configuration file:</para>
<programlisting>send dhcp6.client-id = concat(00:03:00, hardware);</programlisting>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Get IPv6 address from DHCP server as part of the system or network restart.</para>
<para>Based on the operating systems, perform the following:</para>
<para>On CentOS 6.2:</para>
<orderedlist numeration="loweralpha">
<listitem>
<para>Open the Ethernet interface configuration file:</para>
<programlisting>vi /etc/sysconfig/network-scripts/ifcfg-eth0</programlisting>
<para>The <code>ifcfg-eth0</code> file controls the first NIC in a system.</para>
</listitem>
<listitem>
<para>Make the necessary configuration changes, as given below:</para>
<programlisting>DEVICE=eth0
HWADDR=06:A0:F0:00:00:38
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=dhcp6
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=yes
DHCPV6C=yes</programlisting>
</listitem>
<listitem>
<para>Open the following:</para>
<programlisting>vi /etc/sysconfig/network</programlisting>
</listitem>
<listitem>
<para>Make the necessary configuration changes, as given below:</para>
<programlisting>NETWORKING=yes
HOSTNAME=centos62mgmt.lab.vmops.com
NETWORKING_IPV6=yes
IPV6_AUTOCONF=no</programlisting>
</listitem>
</orderedlist>
<para>On Ubuntu 12.10</para>
<orderedlist numeration="loweralpha">
<listitem>
<para>Open the following:</para>
<programlisting>etc/network/interfaces:</programlisting>
</listitem>
<listitem>
<para>Make the necessary configuration changes, as given below:</para>
<programlisting>iface eth0 inet6 dhcp
autoconf 0
accept_ra 1</programlisting>
</listitem>
</orderedlist>
</listitem>
</orderedlist>
</section>
</section>

View File

@ -1,5 +1,5 @@
<?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" [
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
%BOOK_ENTITIES;
]>
@ -25,6 +25,7 @@
<section id="whats-new-in-api-4.1">
<title>What's New in the API for 4.1</title>
<xi:include href="add-remove-nic.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="ipv6-support.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="vmx-settings-dev.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="reset-ssh-key-dev.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="changed-apicommands-4.1.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

View File

@ -684,13 +684,16 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String secondaryMountPoint = _mountService.getMountPoint(secStorageUrl);
String srcOVAFileName = secondaryMountPoint + "/" + secStorageDir + "/"
+ backupName + "." + ImageFormat.OVA.getFileExtension();
String snapshotDir = "";
if (backupName.contains("/")){
snapshotDir = backupName.split("/")[0];
}
String srcFileName = getOVFFilePath(srcOVAFileName);
if(srcFileName == null) {
Script command = new Script("tar", 0, s_logger);
command.add("--no-same-owner");
command.add("-xf", srcOVAFileName);
command.setWorkDir(secondaryMountPoint + "/" + secStorageDir);
command.setWorkDir(secondaryMountPoint + "/" + secStorageDir + "/" + snapshotDir);
s_logger.info("Executing command: " + command.toString());
String result = command.execute();
if(result != null) {
@ -731,7 +734,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String backupUuid = UUID.randomUUID().toString();
exportVolumeToSecondaryStroage(vmMo, volumePath, secStorageUrl,
getSnapshotRelativeDirInSecStorage(accountId, volumeId), backupUuid, workerVmName);
return backupUuid;
return backupUuid + "/" + backupUuid;
}
private void exportVolumeToSecondaryStroage(VirtualMachineMO vmMo, String volumePath,
@ -739,8 +742,8 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String workerVmName) throws Exception {
String secondaryMountPoint = _mountService.getMountPoint(secStorageUrl);
String exportPath = secondaryMountPoint + "/" + secStorageDir;
String exportPath = secondaryMountPoint + "/" + secStorageDir + "/" + exportName;
synchronized(exportPath.intern()) {
if(!new File(exportPath).exists()) {
Script command = new Script(false, "mkdir", _timeout, s_logger);

View File

@ -1106,6 +1106,7 @@ public class ApiResponseHelper implements ResponseGenerator {
VpnUsersResponse vpnResponse = new VpnUsersResponse();
vpnResponse.setId(vpnUser.getUuid());
vpnResponse.setUserName(vpnUser.getUsername());
vpnResponse.setState(vpnUser.getState().toString());
populateOwner(vpnResponse, vpnUser);

View File

@ -511,13 +511,13 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
sb.and("username", sb.entity().getUsername(), SearchCriteria.Op.EQ);
sb.and("state", sb.entity().getState(), SearchCriteria.Op.EQ);
sb.and("state", sb.entity().getState(), Op.IN);
SearchCriteria<VpnUserVO> sc = sb.create();
_accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);
//list only active users
sc.setParameters("state", State.Active);
sc.setParameters("state", State.Active, State.Add);
if (id != null) {
sc.setParameters("id", id);

View File

@ -489,7 +489,7 @@ def main():
print __description__, "(%s)" % __projecturl__
shell = CloudMonkeyShell(sys.argv[0], options.cfile)
if len(sys.argv) > 1:
if len(args) > 1:
shell.onecmd(' '.join(args))
else:
shell.cmdloop()