You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ni...@apache.org on 2013/03/28 12:16:11 UTC
[01/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Updated Branches:
refs/heads/master f8b8f6097 -> 3e4430d81
refs/heads/scaleupvm 5b2f57c98 -> 2423d4a57
CLOUDSTACK-1368: Shared network - Not able to delete network because of java.lang.NullPointerException
Missed network destroy state transistion while 'events framework' merge.
Before merge, network states were explicitly set. It was changed to go
through state machine. This fix, introduces missing state transistions.
Tested life cycle of both isolated and shared network
Signed-off-by: Murali Reddy <mu...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1c845d42
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1c845d42
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1c845d42
Branch: refs/heads/scaleupvm
Commit: 1c845d42b703bf4608873fd777b9bfef5d3feee5
Parents: 5a455a7
Author: Murali Reddy <mu...@citrix.com>
Authored: Thu Mar 21 17:38:33 2013 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Fri Mar 22 11:20:48 2013 +0530
----------------------------------------------------------------------
api/src/com/cloud/network/Network.java | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c845d42/api/src/com/cloud/network/Network.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java
index 89dac68..c2ab655 100644
--- a/api/src/com/cloud/network/Network.java
+++ b/api/src/com/cloud/network/Network.java
@@ -236,6 +236,8 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
s_fsm.addTransition(State.Implemented, Event.DestroyNetwork, State.Shutdown);
s_fsm.addTransition(State.Shutdown, Event.OperationSucceeded, State.Allocated);
s_fsm.addTransition(State.Shutdown, Event.OperationFailed, State.Implemented);
+ s_fsm.addTransition(State.Setup, Event.DestroyNetwork, State.Destroy);
+ s_fsm.addTransition(State.Allocated, Event.DestroyNetwork, State.Destroy);
}
public static StateMachine2<State, Network.Event, Network> getStateMachine() {
[05/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-815. Docs. Syntax fixes to commands in Regions section.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0be5ba41
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0be5ba41
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0be5ba41
Branch: refs/heads/scaleupvm
Commit: 0be5ba418999ea86508b3d9759eee844ff3f1125
Parents: a0257bc
Author: Jessica Tomechak <je...@gmail.com>
Authored: Fri Mar 22 05:55:11 2013 -0700
Committer: Jessica Tomechak <je...@gmail.com>
Committed: Fri Mar 22 05:55:11 2013 -0700
----------------------------------------------------------------------
docs/en-US/region-add.xml | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0be5ba41/docs/en-US/region-add.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/region-add.xml b/docs/en-US/region-add.xml
index a891994..960777c 100644
--- a/docs/en-US/region-add.xml
+++ b/docs/en-US/region-add.xml
@@ -52,7 +52,7 @@
<programlisting>http://<IP_of_region_1_Management_Server>:8080/client/api?command=addRegion&id=2&name=Western&endpoint=http://<region_2_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
</listitem>
<listitem><para>Now perform the same command in reverse, adding region 1 to region 2.</para>
- <programlisting>http://<IP_of_region_2_Management_Server>:8080/client/api?command=addRegion&id=2&name=Western&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
+ <programlisting>http://<IP_of_region_2_Management_Server>:8080/client/api?command=addRegion&id=1&name=Northern&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
</listitem>
<listitem><para>Copy the account, user, and domain tables from the region 1 database to the region 2 database.</para>
<para>In the following commands, it is assumed that you have set the root password on the
@@ -121,8 +121,8 @@ http://<IP_of_region_3_Management_Server>:8080/client/api?command=addRegio
<section id="region-delete">
<title>Deleting a Region</title>
<para>To delete a region, use the API command removeRegion. Repeat the call to remove the region from all other regions. For example, to remove the 3rd region in a three-region cloud:</para>
- <programlisting>http://<IP_of_region_1_Management_Server>:8080/client/api?command=removeRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D
+ <programlisting>http://<IP_of_region_1_Management_Server>:8080/client/api?command=removeRegion&id=3&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D
-http://<IP_of_region_2_Management_Server>:8080/client/api?command=removeRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
+http://<IP_of_region_2_Management_Server>:8080/client/api?command=removeRegion&id=3&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
</section>
</section>
\ No newline at end of file
[16/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
appliance: veewee definition to build devcloud, work in progress
forked from systemvmtemplate
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/87500f97
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/87500f97
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/87500f97
Branch: refs/heads/scaleupvm
Commit: 87500f979694613de0c336c101975b8225fb5f2c
Parents: eb934e4
Author: Rohit Yadav <bh...@apache.org>
Authored: Mon Mar 25 13:26:51 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Mon Mar 25 14:52:36 2013 +0530
----------------------------------------------------------------------
tools/appliance/definitions/devcloud/base.sh | 12 +
tools/appliance/definitions/devcloud/cleanup.sh | 21 +
tools/appliance/definitions/devcloud/definition.rb | 45 ++
.../appliance/definitions/devcloud/postinstall.sh | 60 +++
tools/appliance/definitions/devcloud/preseed.cfg | 357 +++++++++++++++
tools/appliance/definitions/devcloud/zerodisk.sh | 11 +
6 files changed, 506 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87500f97/tools/appliance/definitions/devcloud/base.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/devcloud/base.sh b/tools/appliance/definitions/devcloud/base.sh
new file mode 100644
index 0000000..122b389
--- /dev/null
+++ b/tools/appliance/definitions/devcloud/base.sh
@@ -0,0 +1,12 @@
+# Update the box
+apt-get -y update
+#below are needed for ruby perhaps
+#apt-get -y install linux-headers-$(uname -r) build-essential
+#apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev
+apt-get -y install curl unzip
+apt-get clean
+
+echo 'cloud ALL=NOPASSWD:ALL' > /etc/sudoers.d/cloud
+
+# Tweak sshd to prevent DNS resolution (speed up logins)
+echo 'UseDNS no' >> /etc/ssh/sshd_config
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87500f97/tools/appliance/definitions/devcloud/cleanup.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/devcloud/cleanup.sh b/tools/appliance/definitions/devcloud/cleanup.sh
new file mode 100644
index 0000000..9e98ab0
--- /dev/null
+++ b/tools/appliance/definitions/devcloud/cleanup.sh
@@ -0,0 +1,21 @@
+# Clean up
+#apt-get -y remove linux-headers-$(uname -r) build-essential
+apt-get -y remove dictionaries-common busybox
+apt-get -y autoremove
+apt-get autoclean
+apt-get clean
+
+# Removing leftover leases and persistent rules
+echo "cleaning up dhcp leases"
+rm /var/lib/dhcp/*
+
+# Make sure Udev doesn't block our network
+echo "cleaning up udev rules"
+rm /etc/udev/rules.d/70-persistent-net.rules
+mkdir /etc/udev/rules.d/70-persistent-net.rules
+rm -rf /dev/.udev/
+rm /lib/udev/rules.d/75-persistent-net-generator.rules
+
+echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
+echo "pre-up sleep 2" >> /etc/network/interfaces
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87500f97/tools/appliance/definitions/devcloud/definition.rb
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/devcloud/definition.rb b/tools/appliance/definitions/devcloud/definition.rb
new file mode 100644
index 0000000..d4f48ec
--- /dev/null
+++ b/tools/appliance/definitions/devcloud/definition.rb
@@ -0,0 +1,45 @@
+Veewee::Definition.declare({
+ :cpu_count => '1',
+ :memory_size=> '2048',
+ :disk_size => '32000', :disk_format => 'VDI', :hostiocache => 'off',
+ :os_type_id => 'Debian',
+ :iso_file => "debian-wheezy-DI-rc1-i386-netinst.iso",
+ :iso_src => "http://cdimage.debian.org/cdimage/wheezy_di_rc1/i386/iso-cd/debian-wheezy-DI-rc1-i386-netinst.iso",
+ :iso_md5 => "db12ca9554bb8f121c98e268682a55d0",
+ :iso_download_timeout => "1000",
+ :boot_wait => "10", :boot_cmd_sequence => [
+ '<Esc>',
+ 'install ',
+ 'preseed/url=http://%IP%:%PORT%/preseed.cfg ',
+ 'debian-installer=en_US ',
+ 'auto ',
+ 'locale=en_US ',
+ 'kbd-chooser/method=us ',
+ 'netcfg/get_hostname=systemvm ',
+ 'netcfg/get_domain=apache.org ',
+ 'fb=false ',
+ 'debconf/frontend=noninteractive ',
+ 'console-setup/ask_detect=false ',
+ 'console-keymaps-at/keymap=us ',
+ 'keyboard-configuration/xkb-keymap=us ',
+ '<Enter>'
+ ],
+ :kickstart_port => "7122",
+ :kickstart_timeout => "10000",
+ :kickstart_file => "preseed.cfg",
+ :ssh_login_timeout => "10000",
+ :ssh_user => "root",
+ :ssh_password => "password",
+ :ssh_key => "",
+ :ssh_host_port => "7222",
+ :ssh_guest_port => "22",
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
+ :shutdown_cmd => "halt -p",
+ :postinstall_files => [
+ "base.sh",
+ "postinstall.sh",
+ "cleanup.sh",
+ "zerodisk.sh"
+ ],
+ :postinstall_timeout => "10000"
+})
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87500f97/tools/appliance/definitions/devcloud/postinstall.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/devcloud/postinstall.sh b/tools/appliance/definitions/devcloud/postinstall.sh
new file mode 100644
index 0000000..9ec1240
--- /dev/null
+++ b/tools/appliance/definitions/devcloud/postinstall.sh
@@ -0,0 +1,60 @@
+# 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.
+
+set -x
+
+install_packages() {
+ DEBIAN_FRONTEND=noninteractive
+ DEBIAN_PRIORITY=critical
+
+ # utlities
+ apt-get --no-install-recommends -q -y --force-yes install python bzip2 sed gawk diffutils grep gzip less tar telnet wget zip unzip sudo
+
+ # dev tools, ssh, nfs
+ apt-get --no-install-recommends -q -y --force-yes install git vim tcpdump ebtables iptables openssl openssh-server openjdk-6-jdk genisoimage python-pip nfs-kernel-server
+
+ # mysql with root password=password
+ debconf-set-selections <<< 'mysql-server-<version> mysql-server/root_password password password'
+ debconf-set-selections <<< 'mysql-server-<version> mysql-server/root_password_again password password'
+ apt-get --no-install-recommends -q -y --force-yes install mysql-server
+
+ # xen and xcp
+ apt-get --no-install-recommends -q -y --force-yes install linux-headers-3.2.0-4-686-pae xen-hypervisor-4.1-i386 xcp-xapi xcp-xe xcp-guest-templates xcp-vncterm xen-tools blktap-utils blktap-dkms qemu-keymaps qemu-utils
+
+}
+
+fix_locale() {
+ cat >> /etc/default/locale << EOF
+LANG=en_US.UTF-8
+LC_ALL=en_US.UTF-8
+EOF
+ cat >> /etc/locale.gen << EOF
+en_US.UTF-8 UTF-8
+EOF
+
+ locale-gen en_US.UTF-8
+}
+
+begin=$(date +%s)
+
+install_packages
+fix_locale
+
+fin=$(date +%s)
+t=$((fin-begin))
+
+echo "DevCloud baked in $t seconds"
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87500f97/tools/appliance/definitions/devcloud/preseed.cfg
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/devcloud/preseed.cfg b/tools/appliance/definitions/devcloud/preseed.cfg
new file mode 100644
index 0000000..ac9edd3
--- /dev/null
+++ b/tools/appliance/definitions/devcloud/preseed.cfg
@@ -0,0 +1,357 @@
+#### Contents of the preconfiguration file (for squeeze)
+### Localization
+# Locale sets language and country.
+d-i debian-installer/locale string en_US
+
+# Keyboard selection.
+#d-i console-tools/archs select at
+d-i console-keymaps-at/keymap select us
+# Example for a different keyboard architecture
+#d-i console-keymaps-usb/keymap select mac-usb-us
+
+### Network configuration
+# netcfg will choose an interface that has link if possible. This makes it
+# skip displaying a list if there is more than one interface.
+d-i netcfg/choose_interface select auto
+
+# To pick a particular interface instead:
+#d-i netcfg/choose_interface select eth1
+
+# If you have a slow dhcp server and the installer times out waiting for
+# it, this might be useful.
+#d-i netcfg/dhcp_timeout string 60
+
+# If you prefer to configure the network manually, uncomment this line and
+# the static network configuration below.
+#d-i netcfg/disable_dhcp boolean true
+
+# If you want the preconfiguration file to work on systems both with and
+# without a dhcp server, uncomment these lines and the static network
+# configuration below.
+#d-i netcfg/dhcp_failed note
+#d-i netcfg/dhcp_options select Configure network manually
+
+# Static network configuration.
+#d-i netcfg/get_nameservers string 192.168.1.1
+#d-i netcfg/get_ipaddress string 192.168.1.42
+#d-i netcfg/get_netmask string 255.255.255.0
+#d-i netcfg/get_gateway string 192.168.1.1
+#d-i netcfg/confirm_static boolean true
+
+# Any hostname and domain names assigned from dhcp take precedence over
+# values set here. However, setting the values still prevents the questions
+# from being shown, even if values come from dhcp.
+d-i netcfg/get_hostname string systemvm
+d-i netcfg/get_domain string cloudstack.org
+
+# Disable that annoying WEP key dialog.
+d-i netcfg/wireless_wep string
+# The wacky dhcp hostname that some ISPs use as a password of sorts.
+#d-i netcfg/dhcp_hostname string radish
+
+# If non-free firmware is needed for the network or other hardware, you can
+# configure the installer to always try to load it, without prompting. Or
+# change to false to disable asking.
+#d-i hw-detect/load_firmware boolean true
+
+### Network console
+# Use the following settings if you wish to make use of the network-console
+# component for remote installation over SSH. This only makes sense if you
+# intend to perform the remainder of the installation manually.
+#d-i anna/choose_modules string network-console
+#d-i network-console/password password r00tme
+#d-i network-console/password-again password r00tme
+
+### Mirror settings
+# If you select ftp, the mirror/country string does not need to be set.
+#d-i mirror/protocol string ftp
+d-i mirror/country string manual
+d-i mirror/http/hostname string http.us.debian.org
+d-i mirror/http/directory string /debian
+d-i mirror/http/proxy string
+
+# Suite to install.
+#d-i mirror/suite string testing
+# Suite to use for loading installer components (optional).
+#d-i mirror/udeb/suite string testing
+
+### Clock and time zone setup
+# Controls whether or not the hardware clock is set to UTC.
+d-i clock-setup/utc boolean true
+
+# You may set this to any valid setting for $TZ; see the contents of
+# /usr/share/zoneinfo/ for valid values.
+d-i time/zone string UTC
+
+# Controls whether to use NTP to set the clock during the install
+d-i clock-setup/ntp boolean true
+# NTP server to use. The default is almost always fine here.
+#d-i clock-setup/ntp-server string ntp.example.com
+
+### Partitioning
+# If the system has free space you can choose to only partition that space.
+#d-i partman-auto/init_automatically_partition select biggest_free
+
+# Alternatively, you can specify a disk to partition. The device name must
+# be given in traditional non-devfs format.
+# Note: A disk must be specified, unless the system has only one disk.
+# For example, to use the first SCSI/SATA hard disk:
+d-i partman-auto/disk string /dev/sda
+# In addition, you'll need to specify the method to use.
+# The presently available methods are: "regular", "lvm" and "crypto"
+d-i partman-auto/method string regular
+
+# If one of the disks that are going to be automatically partitioned
+# contains an old LVM configuration, the user will normally receive a
+# warning. This can be preseeded away...
+#d-i partman-lvm/device_remove_lvm boolean true
+# The same applies to pre-existing software RAID array:
+#d-i partman-md/device_remove_md boolean true
+
+# And the same goes for the confirmation to write the lvm partitions.
+#d-i partman-lvm/confirm boolean true
+#d-i partman-lvm/confirm_nooverwrite boolean true
+
+#d-i partman/choose_partition select finish
+#d-i partman-auto-lvm/guided_size string max
+
+# You can choose one of the three predefined partitioning recipes:
+# - atomic: all files in one partition
+# - home: separate /home partition
+# - multi: separate /home, /usr, /var, and /tmp partitions
+d-i partman-auto/choose_recipe select atomic
+#d-i partman/default_filesystem string ext3
+
+# Or provide a recipe of your own...
+# The recipe format is documented in the file devel/partman-auto-recipe.txt.
+# If you have a way to get a recipe file into the d-i environment, you can
+# just point at it.
+#d-i partman-auto/expert_recipe_file string /hd-media/recipe
+
+d-i partman-auto/expert_recipe string \
+ boot-root :: \
+ 40 50 100 ext4 \
+ $primary{ } $bootable{ } \
+ method{ format } format{ } \
+ use_filesystem{ } filesystem{ ext4 } \
+ mountpoint{ /boot } \
+ . \
+ 400 40 500 ext4 \
+ method{ format } format{ } \
+ use_filesystem{ } filesystem{ ext4 } \
+ mountpoint{ / } \
+ . \
+ 60 100 200 ext4 \
+ method{ format } format{ } \
+ use_filesystem{ } filesystem{ ext4 } \
+ mountpoint{ /home } \
+ . \
+ 500 30 1000 ext4 \
+ method{ format } format{ } \
+ use_filesystem{ } filesystem{ ext4 } \
+ mountpoint{ /usr } \
+ . \
+ 400 40 500 ext4 \
+ method{ format } format{ } \
+ use_filesystem{ } filesystem{ ext4 } \
+ mountpoint{ /opt } \
+ . \
+ 500 60 1000 ext4 \
+ method{ format } format{ } \
+ use_filesystem{ } filesystem{ ext4 } \
+ mountpoint{ /var } \
+ . \
+ 100 70 400 ext4 \
+ method{ format } format{ } \
+ use_filesystem{ } filesystem{ ext4 } \
+ mountpoint{ /tmp } \
+ . \
+ 64 512 300% linux-swap \
+ method{ swap } format{ } \
+ .
+
+# If not, you can put an entire recipe into the preconfiguration file in one
+# (logical) line. This example creates a small /boot partition, suitable
+# swap, and uses the rest of the space for the root partition:
+#d-i partman-auto/expert_recipe string \
+# boot-root :: \
+# 40 50 100 ext3 \
+# $primary{ } $bootable{ } \
+# method{ format } format{ } \
+# use_filesystem{ } filesystem{ ext3 } \
+# mountpoint{ /boot } \
+# . \
+# 500 10000 1000000000 ext3 \
+# method{ format } format{ } \
+# use_filesystem{ } filesystem{ ext3 } \
+# mountpoint{ / } \
+# . \
+# 64 512 300% linux-swap \
+# method{ swap } format{ } \
+# .
+
+#The preseed line that "selects finish" needs to be in a certain order in your preseed, the example-preseed does not follow this.
+#http://ubuntuforums.org/archive/index.php/t-1504045.html
+
+# This makes partman automatically partition without confirmation, provided
+# that you told it what to do using one of the methods above.
+#d-i partman-partitioning/confirm_write_new_label boolean true
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+
+### Base system installation
+# Select the initramfs generator used to generate the initrd for 2.6 kernels.
+#d-i base-installer/kernel/linux/initramfs-generators string yaird
+
+# The kernel image (meta) package to be installed; "none" can be used if no
+# kernel is to be installed.
+#d-i base-installer/kernel/image string linux-image-2.6-486
+
+### Account setup
+# Skip creation of a root account (normal user account will be able to
+# use sudo).
+d-i passwd/root-login boolean true
+# Alternatively, to skip creation of a normal user account.
+#d-i passwd/make-user boolean false
+
+# Root password, either in clear text
+d-i passwd/root-password password password
+d-i passwd/root-password-again password password
+# or encrypted using an MD5 hash.
+#d-i passwd/root-password-crypted password [MD5 hash]
+
+# To create a normal user account.
+d-i passwd/user-fullname string Cloud Stack
+d-i passwd/username string cloud
+# Normal user's password, either in clear text
+d-i passwd/user-password password cloud
+d-i passwd/user-password-again password cloud
+# or encrypted using an MD5 hash.
+#d-i passwd/user-password-crypted password [MD5 hash]
+# Create the first user with the specified UID instead of the default.
+#d-i passwd/user-uid string 1010
+d-i user-setup/encrypt-home boolean false
+d-i user-setup/allow-password-weak boolean true
+
+# The user account will be added to some standard initial groups. To
+# override that, use this.
+d-i passwd/user-default-groups string audio cdrom video admin
+
+### Apt setup
+# You can choose to install non-free and contrib software.
+#d-i apt-setup/non-free boolean true
+#d-i apt-setup/contrib boolean true
+# Uncomment this if you don't want to use a network mirror.
+#d-i apt-setup/use_mirror boolean false
+# Select which update services to use; define the mirrors to be used.
+# Values shown below are the normal defaults.
+#d-i apt-setup/services-select multiselect security, volatile
+#d-i apt-setup/security_host string security.debian.org
+#d-i apt-setup/volatile_host string volatile.debian.org
+
+
+# By default the installer requires that repositories be authenticated
+# using a known gpg key. This setting can be used to disable that
+# authentication. Warning: Insecure, not recommended.
+#d-i debian-installer/allow_unauthenticated string true
+
+### Package selection
+tasksel tasksel/first multiselect ssh-server
+# If the desktop task is selected, install the kde and xfce desktops
+# instead of the default gnome desktop.
+#tasksel tasksel/desktop multiselect kde, xfce
+
+# Individual additional packages to install
+d-i pkgsel/include string openssh-server ntp acpid sudo bzip2
+
+# Whether to upgrade packages after debootstrap.
+# Allowed values: none, safe-upgrade, full-upgrade
+d-i pkgsel/upgrade select none
+
+# Some versions of the installer can report back on what software you have
+# installed, and what software you use. The default is not to report back,
+# but sending reports helps the project determine what software is most
+# popular and include it on CDs.
+popularity-contest popularity-contest/participate boolean false
+
+### Boot loader installation
+# Grub is the default boot loader (for x86). If you want lilo installed
+# instead, uncomment this:
+#d-i grub-installer/skip boolean true
+# To also skip installing lilo, and install no bootloader, uncomment this
+# too:
+#d-i lilo-installer/skip boolean true
+
+# This is fairly safe to set, it makes grub install automatically to the MBR
+# if no other operating system is detected on the machine.
+d-i grub-installer/only_debian boolean true
+
+# This one makes grub-installer install to the MBR if it also finds some other
+# OS, which is less safe as it might not be able to boot that other OS.
+#d-i grub-installer/with_other_os boolean true
+
+# Alternatively, if you want to install to a location other than the mbr,
+# uncomment and edit these lines:
+#d-i grub-installer/only_debian boolean false
+#d-i grub-installer/with_other_os boolean false
+#d-i grub-installer/bootdev string (hd0,0)
+# To install grub to multiple disks:
+#d-i grub-installer/bootdev string (hd0,0) (hd1,0) (hd2,0)
+
+# Optional password for grub, either in clear text
+#d-i grub-installer/password password r00tme
+#d-i grub-installer/password-again password r00tme
+# or encrypted using an MD5 hash, see grub-md5-crypt(8).
+#d-i grub-installer/password-crypted password [MD5 hash]
+
+### Finishing up the installation
+# During installations from serial console, the regular virtual consoles
+# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
+# line to prevent this.
+#d-i finish-install/keep-consoles boolean true
+
+# Avoid that last message about the install being complete.
+d-i finish-install/reboot_in_progress note
+
+# This will prevent the installer from ejecting the CD during the reboot,
+# which is useful in some situations.
+#d-i cdrom-detect/eject boolean false
+
+# This is how to make the installer shutdown when finished, but not
+# reboot into the installed system.
+#d-i debian-installer/exit/halt boolean true
+# This will power off the machine instead of just halting it.
+#d-i debian-installer/exit/poweroff boolean true
+
+### Preseeding other packages
+# Depending on what software you choose to install, or if things go wrong
+# during the installation process, it's possible that other questions may
+# be asked. You can preseed those too, of course. To get a list of every
+# possible question that could be asked during an install, do an
+# installation, and then run these commands:
+# debconf-get-selections --installer > file
+# debconf-get-selections >> file
+
+
+#### Advanced options
+### Running custom commands during the installation
+# d-i preseeding is inherently not secure. Nothing in the installer checks
+# for attempts at buffer overflows or other exploits of the values of a
+# preconfiguration file like this one. Only use preconfiguration files from
+# trusted locations! To drive that home, and because it's generally useful,
+# here's a way to run any shell command you'd like inside the installer,
+# automatically.
+
+# This first command is run as early as possible, just after
+# preseeding is read.
+# Prevent packaged version of VirtualBox Guest Additions being installed:
+d-i preseed/early_command string sed -i \
+ '/in-target/idiscover(){/sbin/discover|grep -v VirtualBox;}' \
+ /usr/lib/pre-pkgsel.d/20install-hwpackages
+
+# This command is run just before the install finishes, but when there is
+# still a usable /target directory. You can chroot to /target and use it
+# directly, or use the apt-install and in-target commands to easily install
+# packages and run commands in the target system.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87500f97/tools/appliance/definitions/devcloud/zerodisk.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/devcloud/zerodisk.sh b/tools/appliance/definitions/devcloud/zerodisk.sh
new file mode 100644
index 0000000..a70d3e6
--- /dev/null
+++ b/tools/appliance/definitions/devcloud/zerodisk.sh
@@ -0,0 +1,11 @@
+# Clean up stuff copied in by veewee
+rm -fv /root/*.iso
+rm -fv /root/base.sh /root/cleanup.sh /root/postinstall.sh /root/zerodisk.sh
+rm -fv .veewee_version .veewee_params .vbox_version
+
+echo "Cleaning up"
+
+# Zero out the free space to save space in the final image:
+dd if=/dev/zero of=/zero bs=1M
+sync
+rm -fv /zero
[09/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
UI: Add _reloadUI helper function
Adds a console helper function, which will reinitialize the UI
with the current window.cloudStack object. This is used primarily
for debugging, so that any changes to the UI structure can be viewed
without reloading the browser.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/abbc3b3b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/abbc3b3b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/abbc3b3b
Branch: refs/heads/scaleupvm
Commit: abbc3b3bc63c44730f9876698f04c069c79d3272
Parents: e86f811
Author: Brian Federle <br...@citrix.com>
Authored: Fri Mar 22 10:29:48 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Fri Mar 22 10:29:48 2013 -0700
----------------------------------------------------------------------
ui/scripts/cloudStack.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/abbc3b3b/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 5b6d519..985627b 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -456,6 +456,11 @@
context: cloudStack.context
});
});
+
+ window._reloadUI = function() {
+ $('#container').html('');
+ $('#container').cloudStack(window.cloudStack);
+ };
}
};
[29/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
BUG-ID: CLOUDSTACK-1713, CLOUDSTACK-1719
Summary: EC2 REST API: AWS APIs are not getting translated on the CloudStack Management Server and AWS API Installation Problems.
Fixing the class not found exception, key not found and other issues as mentioned in the above two defects.
Signed-off-by: Pradeep <pr...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/582f8a0f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/582f8a0f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/582f8a0f
Branch: refs/heads/scaleupvm
Commit: 582f8a0f38f99030bec643ba733a42ee0167f9b4
Parents: 854ab39
Author: Pradeep Soundararajan <pr...@citrix.com>
Authored: Tue Mar 26 13:25:57 2013 +0000
Committer: Chip Childers <ch...@gmail.com>
Committed: Tue Mar 26 13:28:03 2013 +0000
----------------------------------------------------------------------
.../util/EncryptionSecretKeyCheckerUtil.java | 2 +-
packaging/centos63/cloud.spec | 8 +++-----
.../utils/crypt/EncryptionSecretKeyChanger.java | 2 +-
.../utils/crypt/EncryptionSecretKeyChecker.java | 2 +-
4 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/582f8a0f/awsapi/src/com/cloud/bridge/util/EncryptionSecretKeyCheckerUtil.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/util/EncryptionSecretKeyCheckerUtil.java b/awsapi/src/com/cloud/bridge/util/EncryptionSecretKeyCheckerUtil.java
index 0a65221..6f0049f 100644
--- a/awsapi/src/com/cloud/bridge/util/EncryptionSecretKeyCheckerUtil.java
+++ b/awsapi/src/com/cloud/bridge/util/EncryptionSecretKeyCheckerUtil.java
@@ -36,7 +36,7 @@ import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
public class EncryptionSecretKeyCheckerUtil {
private static final Logger s_logger = Logger.getLogger(EncryptionSecretKeyCheckerUtil.class);
- private static final String s_keyFile = "/etc/cloud/management/key";
+ private static final String s_keyFile = "/etc/cloudstack/management/key";
private static final String s_envKey = "CLOUD_SECRET_KEY";
private static StandardPBEStringEncryptor s_encryptor = new StandardPBEStringEncryptor();
private static boolean s_useEncryption = false;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/582f8a0f/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 94e886b..893691c 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -297,22 +297,18 @@ install -D awsapi-setup/setup/cloud-setup-bridge ${RPM_BUILD_ROOT}%{_bindir}/clo
install -D awsapi-setup/setup/cloudstack-aws-api-register ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-aws-api-register
cp -r awsapi-setup/db/mysql/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup
-for name in applicationContext.xml cloud-bridge.properties commons-logging.properties ; do
+for name in applicationContext.xml cloud-bridge.properties commons-logging.properties crypto.properties xes.keystore ec2-service.properties ; do
mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/$name \
${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
done
-install -D ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/ec2-service.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/ec2-service.properties
-
#Don't package the below for AWS API
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/com
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/db.properties
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/LICENSE.txt
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j.properties
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j-vmops.xml
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/META-INF
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/org
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/services.xml
%clean
@@ -398,6 +394,8 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties
%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
%config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/crypto.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/xes.keystore
%attr(0755,root,root) %{_initrddir}/%{name}-management
%attr(0755,root,root) %{_bindir}/%{name}-setup-management
%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/582f8a0f/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java b/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java
index 2be2749..9b13eb8 100755
--- a/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java
+++ b/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java
@@ -54,7 +54,7 @@ public class EncryptionSecretKeyChanger {
private StandardPBEStringEncryptor oldEncryptor = new StandardPBEStringEncryptor();
private StandardPBEStringEncryptor newEncryptor = new StandardPBEStringEncryptor();
- private static final String keyFile = "/etc/cloud/management/key";
+ private static final String keyFile = "/etc/cloudstack/management/key";
public static void main(String[] args){
List<String> argsList = Arrays.asList(args);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/582f8a0f/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java b/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
index 5ffa14f..bf6c351 100755
--- a/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
+++ b/utils/src/com/cloud/utils/crypt/EncryptionSecretKeyChecker.java
@@ -46,7 +46,7 @@ public class EncryptionSecretKeyChecker extends AdapterBase implements SystemInt
private static final Logger s_logger = Logger.getLogger(EncryptionSecretKeyChecker.class);
// Two possible locations with the new packaging naming
- private static final String s_altKeyFile = "/etc/cloud/management/key";
+ private static final String s_altKeyFile = "/etc/cloudstack/management/key";
private static final String s_keyFile = "/etc/cloudstack/management/key";
private static final String s_envKey = "CLOUD_SECRET_KEY";
private static StandardPBEStringEncryptor s_encryptor = new StandardPBEStringEncryptor();
[22/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Instance wizard: Fix checkbox selection
Fix where VPC network is uncheckable if only VPC networks are present,
and 'add network' form is visible and checked.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/16250f8e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/16250f8e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/16250f8e
Branch: refs/heads/scaleupvm
Commit: 16250f8e4b485d86d0945017580af898c48f6c64
Parents: fcf9b57
Author: Brian Federle <br...@citrix.com>
Authored: Mon Mar 25 11:37:15 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Mar 25 11:37:15 2013 -0700
----------------------------------------------------------------------
ui/scripts/ui-custom/instanceWizard.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16250f8e/ui/scripts/ui-custom/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js
index b55df79..2c6d9f1 100644
--- a/ui/scripts/ui-custom/instanceWizard.js
+++ b/ui/scripts/ui-custom/instanceWizard.js
@@ -118,8 +118,12 @@
if (isSingleSelect) {
$select.siblings('.single-select:visible').find('input[type=checkbox]')
.attr('checked', false);
-
- $(this).closest('.select').find('input[type=radio]').click();
+
+ if (!$('input[name=new-network]:visible').is(':checked')) {
+ $(this).closest('.select').find('input[type=radio]').click();
+ } else {
+ $newNetwork.find('input[type=radio]').click();
+ }
}
if ((!$otherSelects.size()) &&
[48/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Merge branch 'master' into scaleupvm
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2423d4a5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2423d4a5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2423d4a5
Branch: refs/heads/scaleupvm
Commit: 2423d4a579f3b2d51ee254909cac493338219f1f
Parents: 5b2f57c 359b931
Author: Nitin Mehta <ni...@citrix.com>
Authored: Wed Mar 27 16:33:42 2013 +0530
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Wed Mar 27 16:33:42 2013 +0530
----------------------------------------------------------------------
CHANGES | 2 +-
INSTALL.md | 4 +-
LICENSE | 2 +-
README.md | 10 +-
README.tools.md | 2 +-
.../api/routing/HealthCheckLBConfigAnswer.java | 42 +
.../api/routing/HealthCheckLBConfigCommand.java | 39 +
api/src/com/cloud/agent/api/to/LoadBalancerTO.java | 114 ++-
api/src/com/cloud/event/EventTypes.java | 2 +
api/src/com/cloud/network/Network.java | 3 +
api/src/com/cloud/network/NetworkModel.java | 2 +
.../element/LoadBalancingServiceProvider.java | 8 +-
.../com/cloud/network/lb/LoadBalancingRule.java | 92 ++-
.../network/lb/LoadBalancingRulesService.java | 32 +-
.../com/cloud/network/rules/HealthCheckPolicy.java | 45 +
.../cloud/storage/DataStoreProviderApiService.java | 28 +
api/src/com/cloud/storage/StoragePool.java | 2 +-
.../org/apache/cloudstack/api/ApiConstants.java | 5 +
api/src/org/apache/cloudstack/api/BaseCmd.java | 2 +
.../apache/cloudstack/api/ResponseGenerator.java | 7 +
.../api/command/admin/region/RemoveRegionCmd.java | 2 +-
.../admin/storage/CreateStoragePoolCmd.java | 8 +-
.../admin/storage/ListStorageProvidersCmd.java | 72 ++
.../api/command/admin/vm/AssignVMCmd.java | 8 +-
.../loadbalancer/CreateLBHealthCheckPolicyCmd.java | 168 +++
.../loadbalancer/DeleteLBHealthCheckPolicyCmd.java | 116 ++
.../loadbalancer/ListLBHealthCheckPoliciesCmd.java | 85 ++
.../api/response/LBHealthCheckPolicyResponse.java | 98 ++
.../api/response/LBHealthCheckResponse.java | 102 ++
.../api/response/StorageProviderResponse.java | 62 +
.../cloudstack/api/response/VpnUsersResponse.java | 10 +
.../api/agent/test/BackupSnapshotCommandTest.java | 2 +-
.../api/agent/test/SnapshotCommandTest.java | 2 +-
.../agent/api/test/ResizeVolumeCommandTest.java | 2 +-
awsapi-setup/setup/cloud-setup-bridge | 2 +-
.../util/EncryptionSecretKeyCheckerUtil.java | 2 +-
.../WEB-INF/classes/resources/messages.properties | 1 +
client/pom.xml | 31 +-
client/tomcatconf/commands.properties.in | 4 +
client/tomcatconf/componentContext.xml.in | 35 +-
client/tomcatconf/log4j-cloud.xml.in | 25 +
client/tomcatconf/nonossComponentContext.xml.in | 21 +-
core/src/com/cloud/alert/AlertManager.java | 41 +-
debian/cloudstack-agent.install | 4 +-
debian/cloudstack-management.install | 2 +
debian/cloudstack-management.postinst | 19 +-
debian/rules | 9 +-
developer/pom.xml | 240 +++--
docs/en-US/Installation_Guide.xml | 1 +
docs/en-US/Release_Notes.xml | 4 +-
docs/en-US/about-password-encryption.xml | 2 +-
docs/en-US/about-regions.xml | 49 +
docs/en-US/about-zones.xml | 10 +-
docs/en-US/added-API-commands-4-1.xml | 7 +-
docs/en-US/api-calls.xml | 3 +-
docs/en-US/api-reference.xml | 2 +-
docs/en-US/api-throttling.xml | 67 +
docs/en-US/aws-ec2-user-setup.xml | 2 +-
docs/en-US/best-practices.xml | 82 ++
docs/en-US/building-with-maven-steps.xml | 2 +-
docs/en-US/castor-with-cs.xml | 3 +-
docs/en-US/changed-apicommands-4.1.xml | 157 +++-
docs/en-US/cloud-infrastructure-concepts.xml | 3 +-
docs/en-US/cloudmonkey.xml | 84 +-
docs/en-US/configure-package-repository.xml | 2 +-
docs/en-US/extracting-source.xml | 4 +-
docs/en-US/feature-overview.xml | 4 +-
docs/en-US/getting-release.xml | 3 +-
.../en-US/guest-nw-usage-with-traffic-sentinel.xml | 7 +-
docs/en-US/images/region-overview.png | Bin 0 -> 22835 bytes
docs/en-US/ip-forwarding-firewalling.xml | 8 +-
docs/en-US/ipv6-support.xml | 191 +++
.../en-US/management-server-install-multi-node.xml | 3 +-
docs/en-US/management-server-lb.xml | 7 +-
docs/en-US/provisioning-steps-overview.xml | 13 +-
docs/en-US/provisioning-steps.xml | 3 +-
docs/en-US/region-add.xml | 128 ++
docs/en-US/response-formats.xml | 2 +
docs/en-US/sys-reliability-and-ha.xml | 4 +-
docs/en-US/whats-new.xml | 3 +-
.../datacenter/entity/api/StorageEntity.java | 1 +
.../subsystem/api/storage/AbstractScope.java | 30 +
.../engine/subsystem/api/storage/ClusterScope.java | 2 +-
.../subsystem/api/storage/DataStoreLifeCycle.java | 6 +-
.../subsystem/api/storage/DataStoreProvider.java | 13 +-
.../api/storage/DataStoreProviderManager.java | 6 +-
.../engine/subsystem/api/storage/HostScope.java | 2 +-
.../api/storage/ImageDataStoreProvider.java | 24 +
.../api/storage/PrimaryDataStoreParameters.java | 220 ++++
.../api/storage/PrimaryDataStoreProvider.java | 4 +
.../engine/subsystem/api/storage/Scope.java | 1 +
.../engine/subsystem/api/storage/ZoneScope.java | 2 +-
.../storage/datastore/db/StoragePoolVO.java | 12 +-
.../engine/subsystem/api/storage/ScopeTest.java | 59 +
.../image/manager/ImageDataStoreManagerImpl.java | 14 +-
.../image/store/AncientImageDataStoreProvider.java | 47 +-
.../image/store/DefaultImageDataStoreImpl.java | 2 +-
.../image/store/DefaultImageDataStoreProvider.java | 35 +-
.../lifecycle/DefaultImageDataStoreLifeCycle.java | 11 +-
.../storage/allocator/StorageAllocatorTest.java | 4 +-
.../cloudstack/storage/test/volumeServiceTest.java | 12 +-
.../datastore/PrimaryDataStoreEntityImpl.java | 8 +-
.../datastore/PrimaryDataStoreProviderManager.java | 4 +-
.../provider/DataStoreProviderManagerImpl.java | 108 +-
.../datastore/provider/ImageDataStoreProvider.java | 25 -
.../provider/PrimaryDataStoreProvider.java | 23 -
.../image/datastore/ImageDataStoreHelper.java | 4 +-
.../storage/image/db/ImageDataStoreVO.java | 12 +-
.../volume/datastore/PrimaryDataStoreHelper.java | 172 +++-
.../storage/datastore/DefaultPrimaryDataStore.java | 19 +-
.../driver/AncientPrimaryDataStoreDriverImpl.java | 362 ------
.../AncientPrimaryDataStoreLifeCycleImpl.java | 963 ---------------
.../DefaultPrimaryDataStoreLifeCycleImpl.java | 18 +-
...DefaultPrimaryDataStoreProviderManagerImpl.java | 16 +-
.../AncientPrimaryDataStoreProviderImpl.java | 78 --
.../DefaultPrimaryDatastoreProviderImpl.java | 32 +-
.../storage/volume/test/ConfiguratorTest.java | 2 +-
packaging/centos63/cloud.spec | 50 +-
packaging/centos63/cloudstack-agent.te | 33 +
packaging/centos63/package.sh | 140 ++-
packaging/debian/init/cloud-management | 8 +-
packaging/debian/replace.properties | 2 +-
.../debian/config/etc/init.d/cloud-early-config | 23 +-
plugins/alert-handlers/snmp-alerts/pom.xml | 45 +
.../cloudstack/alert/snmp/CsSnmpConstants.java | 45 +
.../alert/snmp/SnmpEnhancedPatternLayout.java | 107 ++
.../apache/cloudstack/alert/snmp/SnmpHelper.java | 106 ++
.../cloudstack/alert/snmp/SnmpTrapAppender.java | 207 +++
.../apache/cloudstack/alert/snmp/SnmpTrapInfo.java | 90 ++
.../alert/snmp/SnmpEnhancedPatternLayoutTest.java | 90 ++
.../alert/snmp/SnmpTrapAppenderTest.java | 86 ++
.../resources/security_group_agent/setup.py | 2 +-
.../kvm/resource/LibvirtComputingResource.java | 77 +-
.../hypervisor/kvm/storage/KVMStoragePool.java | 2 +
.../kvm/storage/LibvirtStorageAdaptor.java | 2 +
.../hypervisor/kvm/storage/LibvirtStoragePool.java | 10 +
.../kvm/resource/LibvirtComputingResourceTest.java | 14 +-
.../resource/SimulatorSecondaryDiscoverer.java | 2 +-
.../vmware/manager/VmwareStorageManagerImpl.java | 13 +-
.../dns-notifier/resources/components-example.xml | 2 +
.../element/ElasticLoadBalancerElement.java | 7 +
.../network/lb/ElasticLoadBalancerManagerImpl.java | 9 +-
.../element/F5ExternalLoadBalancerElement.java | 8 +
.../cloud/network/element/NetscalerElement.java | 25 +-
.../cloud/network/resource/NetscalerResource.java | 318 +++++-
plugins/pom.xml | 2 +
plugins/storage/volume/default/pom.xml | 56 +
.../CloudStackPrimaryDataStoreDriverImpl.java | 362 ++++++
.../CloudStackPrimaryDataStoreLifeCycleImpl.java | 542 ++++++++
.../CloudStackPrimaryDataStoreProviderImpl.java | 80 ++
.../apache/cloudstack/storage/test/VolumeTest.java | 2 +-
pom.xml | 171 +---
python/lib/cloudutils/serviceConfigServer.py | 4 +-
python/lib/cloudutils/utilities.py | 2 +-
server/src/com/cloud/alert/AlertManagerImpl.java | 6 +
server/src/com/cloud/api/ApiResponseHelper.java | 62 +
.../com/cloud/api/query/dao/UserVmJoinDaoImpl.java | 2 +
.../src/com/cloud/api/query/vo/UserVmJoinVO.java | 13 +
server/src/com/cloud/configuration/Config.java | 6 +-
.../configuration/ConfigurationManagerImpl.java | 23 +-
.../cloud/deploy/HypervisorVmPlannerSelector.java | 8 +
.../com/cloud/event/ActionEventInterceptor.java | 15 +-
.../network/ExternalFirewallDeviceManagerImpl.java | 48 +-
.../network/ExternalLoadBalancerDeviceManager.java | 7 +-
.../ExternalLoadBalancerDeviceManagerImpl.java | 137 ++-
.../com/cloud/network/LBHealthCheckPolicyVO.java | 157 +++
server/src/com/cloud/network/NetworkManager.java | 3 +
.../src/com/cloud/network/NetworkManagerImpl.java | 216 ++--
server/src/com/cloud/network/NetworkModelImpl.java | 32 +-
.../src/com/cloud/network/NetworkServiceImpl.java | 5 +
.../cloud/network/dao/LBHealthCheckPolicyDao.java | 35 +
.../network/dao/LBHealthCheckPolicyDaoImpl.java | 71 ++
.../com/cloud/network/dao/LoadBalancerVMMapVO.java | 16 +-
.../network/element/VirtualRouterElement.java | 10 +-
.../network/element/VpcVirtualRouterElement.java | 4 +-
.../com/cloud/network/guru/DirectNetworkGuru.java | 92 ++-
.../network/guru/DirectPodBasedNetworkGuru.java | 37 +-
.../com/cloud/network/lb/LBHealthCheckManager.java | 24 +
.../cloud/network/lb/LBHealthCheckManagerImpl.java | 110 ++
.../network/lb/LoadBalancingRulesManager.java | 3 +
.../network/lb/LoadBalancingRulesManagerImpl.java | 729 +++++++++---
.../router/VirtualNetworkApplianceManagerImpl.java | 44 +-
.../network/vpn/RemoteAccessVpnManagerImpl.java | 4 +-
.../com/cloud/server/ConfigurationServerImpl.java | 32 +-
.../src/com/cloud/server/ManagementServerImpl.java | 21 +-
server/src/com/cloud/server/StatsCollector.java | 12 +
.../src/com/cloud/storage/StorageManagerImpl.java | 68 +-
.../com/cloud/storage/StoragePoolAutomation.java | 26 +
.../cloud/storage/StoragePoolAutomationImpl.java | 456 +++++++
.../src/com/cloud/storage/VolumeManagerImpl.java | 75 +-
.../com/cloud/upgrade/DatabaseUpgradeChecker.java | 4 +
.../src/com/cloud/upgrade/dao/Upgrade410to420.java | 38 +
server/src/com/cloud/user/AccountManagerImpl.java | 11 +-
server/src/com/cloud/vm/dao/NicDao.java | 3 +
server/src/com/cloud/vm/dao/NicDaoImpl.java | 8 +
.../com/cloud/network/MockNetworkManagerImpl.java | 7 +
.../com/cloud/network/MockNetworkModelImpl.java | 9 +-
.../test/com/cloud/vpc/MockNetworkManagerImpl.java | 13 +
.../test/com/cloud/vpc/MockNetworkModelImpl.java | 9 +-
.../networkoffering/ChildTestConfiguration.java | 333 +++++
.../networkoffering/CreateNetworkOfferingTest.java | 179 +++
server/test/resources/createNetworkOffering.xml | 44 +
.../ConsoleProxyHttpHandlerHelper.java | 14 +-
setup/db/db/schema-40to410.sql | 5 +-
setup/db/db/schema-410to420.sql | 22 +-
setup/db/templates.simulator.sql | 8 +-
test/integration/component/test_project_usage.py | 2 +-
test/integration/component/test_usage.py | 2 +-
test/integration/component/test_volumes.py | 2 +-
test/integration/smoke/test_iso.py | 4 +-
test/integration/smoke/test_nic.py | 2 +-
test/integration/smoke/test_vm_life_cycle.py | 2 +-
tools/apidoc/gen_toc.py | 2 +
tools/appliance/README.md | 4 +-
tools/appliance/definitions/devcloud/base.sh | 12 +
tools/appliance/definitions/devcloud/cleanup.sh | 21 +
tools/appliance/definitions/devcloud/definition.rb | 45 +
.../appliance/definitions/devcloud/postinstall.sh | 60 +
tools/appliance/definitions/devcloud/preseed.cfg | 357 ++++++
tools/appliance/definitions/devcloud/zerodisk.sh | 11 +
.../definitions/systemvmtemplate/postinstall.sh | 4 +-
.../definitions/systemvmtemplate/zerodisk.sh | 2 +-
.../definitions/systemvmtemplate64/postinstall.sh | 4 +-
tools/cli/cloudmonkey/__init__.py | 4 +-
tools/cli/cloudmonkey/cachemaker.py | 9 +-
tools/cli/cloudmonkey/cloudmonkey.py | 48 +-
tools/cli/cloudmonkey/config.py | 20 +-
tools/cli/setup.py | 34 +-
.../marvin/sandbox/demo/simulator/simulator.cfg | 4 +-
tools/marvin/pom.xml | 219 ++--
ui/css/cloudstack3.css | 86 ++
ui/dictionary.jsp | 2 +
ui/index.jsp | 1 +
ui/scripts/accounts.js | 36 +-
ui/scripts/cloud.core.callbacks.js | 25 +-
ui/scripts/cloudStack.js | 20 +-
ui/scripts/dashboard.js | 71 +-
ui/scripts/instances.js | 7 +-
ui/scripts/network.js | 11 +
ui/scripts/regions.js | 65 +-
ui/scripts/sharedFunctions.js | 37 +-
ui/scripts/system.js | 65 +-
ui/scripts/ui-custom/healthCheck.js | 342 +++++
ui/scripts/ui-custom/instanceWizard.js | 8 +-
ui/scripts/ui-custom/login.js | 12 +
ui/scripts/ui-custom/regions.js | 36 +-
ui/scripts/ui/dialog.js | 46 +-
ui/scripts/ui/widgets/listView.js | 32 +-
ui/scripts/ui/widgets/toolTip.js | 2 +-
ui/scripts/zoneWizard.js | 36 +-
.../src/com/cloud/usage/UsageAlertManagerImpl.java | 13 +-
.../src/com/cloud/utils/component/AdapterBase.java | 4 +-
.../utils/component/ComponentMethodProxyCache.java | 90 ++
.../utils/component/SpringComponentScanUtils.java | 1 -
.../utils/crypt/EncryptionSecretKeyChanger.java | 2 +-
.../utils/crypt/EncryptionSecretKeyChecker.java | 2 +-
.../cloud/utils/db/TransactionContextBuilder.java | 14 +-
utils/src/com/cloud/utils/net/NetUtils.java | 2 +-
258 files changed, 9786 insertions(+), 3045 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2423d4a5/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2423d4a5/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2423d4a5/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2423d4a5/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
[03/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1772: revert bc94948e0604e0e5931759be3c3d3155e84686f6, doesn't specify vnc listening port, make live migration work
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ff63854b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ff63854b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ff63854b
Branch: refs/heads/scaleupvm
Commit: ff63854b4d827033758835dc38231574994ed518
Parents: 01ea723
Author: Edison Su <su...@gmail.com>
Authored: Thu Mar 21 17:52:56 2013 -0700
Committer: Chip Childers <ch...@gmail.com>
Committed: Fri Mar 22 12:46:50 2013 +0000
----------------------------------------------------------------------
.../kvm/resource/LibvirtComputingResource.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff63854b/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 8492362..604bd00 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
@@ -3101,7 +3101,7 @@ ServerResource {
ConsoleDef console = new ConsoleDef("pty", null, null, (short) 0);
devices.addDevice(console);
- GraphicDef grap = new GraphicDef("vnc", (short) 0, true, vmTO.getVncAddr(), null,
+ GraphicDef grap = new GraphicDef("vnc", (short) 0, true, null, null,
null);
devices.addDevice(grap);
[21/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
List view: Fix when no actions are present
Fix case where list view breaks on column creation, when no
actions are defined.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fcf9b57f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fcf9b57f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fcf9b57f
Branch: refs/heads/scaleupvm
Commit: fcf9b57f081c7ec9e183341a9e98f342db417c2e
Parents: ae3a048
Author: Brian Federle <br...@citrix.com>
Authored: Mon Mar 25 11:11:48 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Mar 25 11:12:03 2013 -0700
----------------------------------------------------------------------
ui/scripts/ui/widgets/listView.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fcf9b57f/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index bb3a424..4b88647 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -648,13 +648,13 @@
}
// Actions column
- var actionsArray = $.map(actions, function(v, k) {
+ var actionsArray = actions ? $.map(actions, function(v, k) {
if (k == 'add') {
v.isAdd = true;
}
return v;
- });
+ }) : [];
var headerActionsArray = $.grep(
actionsArray,
function(action) {
@@ -1028,13 +1028,13 @@
$tr.data('jsonObj', dataItem);
$tr.data('list-view-action-filter', options.actionFilter);
- var actionsArray = $.map(actions, function(v, k) {
+ var actionsArray = actions ? $.map(actions, function(v, k) {
if (k == 'add') {
v.isAdd = true;
}
return v;
- });
+ }) : [];
var headerActionsArray = $.grep(
actionsArray,
function(action) {
[39/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Redirecting users to the download page for archived releases. Removing the soon-to-be-incorrect URL for incubator releases.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/736d4b95
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/736d4b95
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/736d4b95
Branch: refs/heads/scaleupvm
Commit: 736d4b950dc70a918c68601cfd4309fbf72829c7
Parents: 1a139e2
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 12:31:39 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 12:32:11 2013 -0500
----------------------------------------------------------------------
docs/en-US/getting-release.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/736d4b95/docs/en-US/getting-release.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/getting-release.xml b/docs/en-US/getting-release.xml
index b9e97c9..a64e532 100644
--- a/docs/en-US/getting-release.xml
+++ b/docs/en-US/getting-release.xml
@@ -29,7 +29,7 @@
<ulink url="http://incubator.apache.org/cloudstack/downloads.html">
Apache CloudStack project download page</ulink>.
</para>
- <para>Prior releases are available via archive.apache.org at <ulink url="http://archive.apache.org/dist/incubator/cloudstack/releases/">http://archive.apache.org/dist/incubator/cloudstack/releases/</ulink>.
+ <para>Prior releases are available via archive.apache.org as well. See the downloads page for more information on archived releases.</para>
</para>
<para>You'll notice several links under the 'Latest release' section. A link to a file ending in <filename>tar.bz2</filename>, as well as a PGP/GPG signature, MD5, and SHA512 file.</para>
<itemizedlist>
[06/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
BUG-ID: CLOUDSTACK-1713, CLOUDSTACK-1719
Summary: EC2 REST API: AWS APIs are not getting translated on the CloudStack Management Server and AWS API Installation Problems.
This fixes the above two defects and other packaging related issues.
Signed-off-by: Pradeep <pr...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c305e3c5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c305e3c5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c305e3c5
Branch: refs/heads/scaleupvm
Commit: c305e3c5a12cfc14dd87a615dfea260a4847be2f
Parents: 0be5ba4
Author: Pradeep <pr...@citrix.com>
Authored: Wed Mar 20 04:36:26 2013 -0700
Committer: Chip Childers <ch...@gmail.com>
Committed: Fri Mar 22 15:15:36 2013 +0000
----------------------------------------------------------------------
awsapi-setup/setup/cloud-setup-bridge | 2 +-
packaging/centos63/cloud.spec | 39 ++++++++++++++++-----
python/lib/cloudutils/serviceConfigServer.py | 4 +-
3 files changed, 33 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c305e3c5/awsapi-setup/setup/cloud-setup-bridge
----------------------------------------------------------------------
diff --git a/awsapi-setup/setup/cloud-setup-bridge b/awsapi-setup/setup/cloud-setup-bridge
index d25072d..d456387 100644
--- a/awsapi-setup/setup/cloud-setup-bridge
+++ b/awsapi-setup/setup/cloud-setup-bridge
@@ -20,7 +20,7 @@
# Cloud.com Bridge setup script.
#
-settingsFile="/usr/share/cloud/bridge/conf/ec2-service.properties"
+settingsFile="/etc/cloudstack/management/ec2-service.properties"
function readCurrentSettings () {
readVar managementServer
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c305e3c5/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 9b10a67..2184f1c 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -290,22 +290,39 @@ cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/
install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloudapis.py
# AWS API
-mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup
-cp -r awsapi/target/cloud-awsapi-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge
+cp -r awsapi/target/cloud-awsapi-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi
install -D awsapi-setup/setup/cloud-setup-bridge ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-setup-bridge
install -D awsapi-setup/setup/cloudstack-aws-api-register ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-aws-api-register
cp -r awsapi-setup/db/mysql/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup
+for name in applicationContext.xml cloud-bridge.properties commons-logging.properties ; do
+ mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/$name \
+ ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
+done
+
+install -D ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/ec2-service.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/ec2-service.properties
+
+#Don't package the below for AWS API
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/com
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/db.properties
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/LICENSE.txt
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j.properties
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j-vmops.xml
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/META-INF
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/org
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/services.xml
+
%clean
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
-
%preun management
-/sbin/service cloud-management stop || true
+/sbin/service cloudstack-management stop || true
if [ "$1" == "0" ] ; then
- /sbin/chkconfig --del cloud-management > /dev/null 2>&1 || true
- /sbin/service cloud-management stop > /dev/null 2>&1 || true
+ /sbin/chkconfig --del cloudstack-management > /dev/null 2>&1 || true
+ /sbin/service cloudstack-management stop > /dev/null 2>&1 || true
fi
%pre management
@@ -322,8 +339,8 @@ rm -rf %{_localstatedir}/cache/cloud
%post management
if [ "$1" == "1" ] ; then
- /sbin/chkconfig --add cloud-management > /dev/null 2>&1 || true
- /sbin/chkconfig --level 345 cloud-management on > /dev/null 2>&1 || true
+ /sbin/chkconfig --add cloudstack-management > /dev/null 2>&1 || true
+ /sbin/chkconfig --level 345 cloudstack-management on > /dev/null 2>&1 || true
fi
if [ -d "%{_datadir}/%{name}-management" ] ; then
@@ -377,6 +394,10 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat-users.xml
%config(noreplace) %{_sysconfdir}/%{name}/management/web.xml
%config(noreplace) %{_sysconfdir}/%{name}/management/environment.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/applicationContext.xml
+%config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties
%attr(0755,root,root) %{_initrddir}/%{name}-management
%attr(0755,root,root) %{_bindir}/%{name}-setup-management
%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses
@@ -450,7 +471,7 @@ fi
%files awsapi
%defattr(0644,cloud,cloud,0755)
-%{_datadir}/%{name}-bridge/webapps/bridge
+%{_datadir}/%{name}-bridge/webapps/awsapi
%attr(0644,root,root) %{_datadir}/%{name}-bridge/setup/*
%attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register
%attr(0755,root,root) %{_bindir}/cloudstack-setup-bridge
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c305e3c5/python/lib/cloudutils/serviceConfigServer.py
----------------------------------------------------------------------
diff --git a/python/lib/cloudutils/serviceConfigServer.py b/python/lib/cloudutils/serviceConfigServer.py
index a08ce02..2c19d7e 100644
--- a/python/lib/cloudutils/serviceConfigServer.py
+++ b/python/lib/cloudutils/serviceConfigServer.py
@@ -33,11 +33,11 @@ class cloudManagementConfig(serviceCfgBase):
raise CloudInternalException("Cannot get hostname, 'hostname --fqdn failed'")
if self.syscfg.env.svrMode == "mycloud":
- cfo = configFileOps("/usr/share/cloud/management/conf/environment.properties", self)
+ cfo = configFileOps("/usr/share/cloudstack-management/conf/environment.properties", self)
cfo.addEntry("cloud-stack-components-specification", "components-cloudzones.xml")
cfo.save()
- cfo = configFileOps("/usr/share/cloud/management/conf/db.properties", self)
+ cfo = configFileOps("/usr/share/cloudstack-management/conf/db.properties", self)
dbHost = cfo.getEntry("db.cloud.host")
dbPort = cfo.getEntry("db.cloud.port")
dbUser = cfo.getEntry("db.cloud.username")
[50/50] [abbrv] git commit: updated refs/heads/master to 3e4430d
Posted by ni...@apache.org.
CLOUDSTACK-658 - Scaleup vm support for Xenserver
Added the framweork so that it can be extended for vmware and kvm as well.
Added unitests and marvin tests.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3e4430d8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3e4430d8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3e4430d8
Branch: refs/heads/master
Commit: 3e4430d811d5e148c4fef1900bdd8dd07a38bdeb
Parents: f8b8f60
Author: Nitin Mehta <ni...@citrix.com>
Authored: Thu Mar 28 16:43:37 2013 +0530
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Thu Mar 28 16:43:37 2013 +0530
----------------------------------------------------------------------
api/src/com/cloud/agent/api/ScaleVmCommand.java | 6 +-
api/src/com/cloud/event/EventTypes.java | 1 +
api/src/com/cloud/vm/UserVmService.java | 16 +-
api/src/com/cloud/vm/VirtualMachine.java | 2 +-
.../cloudstack/api/command/user/vm/ScaleVMCmd.java | 110 +++++
.../api/command/test/ScaleVMCmdTest.java | 122 ++++++
client/tomcatconf/commands.properties.in | 1 +
core/src/com/cloud/vm/VMInstanceVO.java | 2 +-
.../xen/resource/CitrixResourceBase.java | 82 ++++
.../xen/resource/XenServer56FP1Resource.java | 11 +-
.../xen/resource/CitrixResourceBaseTest.java | 148 +++++++
.../xenserver/Add-To-VCPUs-Params-Live.sh | 33 ++
scripts/vm/hypervisor/xenserver/vmops | 13 +
server/src/com/cloud/configuration/Config.java | 3 +-
.../src/com/cloud/server/ManagementServerImpl.java | 1 +
server/src/com/cloud/vm/ItWorkVO.java | 3 +-
server/src/com/cloud/vm/UserVmManagerImpl.java | 92 ++++-
server/src/com/cloud/vm/VirtualMachineManager.java | 12 +
.../com/cloud/vm/VirtualMachineManagerImpl.java | 311 +++++++++++++--
.../test/com/cloud/vm/MockUserVmManagerImpl.java | 17 +-
.../cloud/vm/MockVirtualMachineManagerImpl.java | 17 +
server/test/com/cloud/vm/UserVmManagerTest.java | 192 +++++++++-
.../cloud/vm/VirtualMachineManagerImplTest.java | 208 ++++++++++
test/integration/smoke/test_ScaleVm.py | 221 ++++++++++
24 files changed, 1545 insertions(+), 79 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/api/src/com/cloud/agent/api/ScaleVmCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ScaleVmCommand.java b/api/src/com/cloud/agent/api/ScaleVmCommand.java
index e5078d5..35d22ad 100644
--- a/api/src/com/cloud/agent/api/ScaleVmCommand.java
+++ b/api/src/com/cloud/agent/api/ScaleVmCommand.java
@@ -40,14 +40,14 @@ public class ScaleVmCommand extends Command {
}
public ScaleVmCommand(String vmName, int cpus,
- Integer speed, long minRam, long maxRam) {
+ Integer speed, long minRam, long maxRam, boolean limitCpuUse) {
super();
this.vmName = vmName;
this.cpus = cpus;
- //this.speed = speed;
+ this.speed = speed;
this.minRam = minRam;
this.maxRam = maxRam;
- this.vm = new VirtualMachineTO(1L, vmName, null, cpus, null, minRam, maxRam, null, null, false, false, null);
+ this.vm = new VirtualMachineTO(1L, vmName, null, cpus, speed, minRam, maxRam, null, null, false, false, null);
/*vm.setName(vmName);
vm.setCpus(cpus);
vm.setRam(minRam, maxRam);*/
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java
index 6fdd28c..2e961e5 100755
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -59,6 +59,7 @@ public class EventTypes {
public static final String EVENT_VM_REBOOT = "VM.REBOOT";
public static final String EVENT_VM_UPDATE = "VM.UPDATE";
public static final String EVENT_VM_UPGRADE = "VM.UPGRADE";
+ public static final String EVENT_VM_SCALE = "VM.SCALE";
public static final String EVENT_VM_RESETPASSWORD = "VM.RESETPASSWORD";
public static final String EVENT_VM_RESETSSHKEY = "VM.RESETSSHKEY";
public static final String EVENT_VM_MIGRATE = "VM.MIGRATE";
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/api/src/com/cloud/vm/UserVmService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/UserVmService.java b/api/src/com/cloud/vm/UserVmService.java
index 9d6b221..2c33d41 100755
--- a/api/src/com/cloud/vm/UserVmService.java
+++ b/api/src/com/cloud/vm/UserVmService.java
@@ -23,18 +23,7 @@ import javax.naming.InsufficientResourcesException;
import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
-import org.apache.cloudstack.api.command.user.vm.AddNicToVMCmd;
-import org.apache.cloudstack.api.command.user.vm.DeployVMCmd;
-import org.apache.cloudstack.api.command.user.vm.DestroyVMCmd;
-import org.apache.cloudstack.api.command.user.vm.RebootVMCmd;
-import org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd;
-import org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd;
-import org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd;
-import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
-import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
+import org.apache.cloudstack.api.command.user.vm.*;
import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd;
import org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd;
@@ -402,4 +391,7 @@ public interface UserVmService {
VirtualMachine vmStorageMigration(Long vmId, StoragePool destPool);
UserVm restoreVM(RestoreVMCmd cmd);
+
+ UserVm upgradeVirtualMachine(ScaleVMCmd scaleVMCmd) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException;
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/api/src/com/cloud/vm/VirtualMachine.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/VirtualMachine.java b/api/src/com/cloud/vm/VirtualMachine.java
index 4300dd5..8f807d4 100755
--- a/api/src/com/cloud/vm/VirtualMachine.java
+++ b/api/src/com/cloud/vm/VirtualMachine.java
@@ -176,7 +176,7 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I
AgentReportShutdowned,
AgentReportMigrated,
RevertRequested,
- SnapshotRequested
+ SnapshotRequested,
};
public enum Type {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
new file mode 100644
index 0000000..4fc65c3
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java
@@ -0,0 +1,110 @@
+// 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.
+package org.apache.cloudstack.api.command.user.vm;
+
+import com.cloud.exception.*;
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+import com.cloud.uservm.UserVm;
+import org.apache.cloudstack.api.*;
+import org.apache.cloudstack.api.response.ServiceOfferingResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.log4j.Logger;
+
+
+@APICommand(name = "scaleVirtualMachine", description="Scales the virtual machine to a new service offering.", responseObject=UserVmResponse.class)
+public class ScaleVMCmd extends BaseCmd {
+ public static final Logger s_logger = Logger.getLogger(ScaleVMCmd.class.getName());
+ private static final String s_name = "scalevirtualmachineresponse";
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+
+ @ACL
+ @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class,
+ required=true, description="The ID of the virtual machine")
+ private Long id;
+
+ @ACL
+ @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=ServiceOfferingResponse.class,
+ required=true, description="the ID of the service offering for the virtual machine")
+ private Long serviceOfferingId;
+
+ /////////////////////////////////////////////////////
+ /////////////////// Accessors ///////////////////////
+ /////////////////////////////////////////////////////
+
+ public Long getId() {
+ return id;
+ }
+
+ public Long getServiceOfferingId() {
+ return serviceOfferingId;
+ }
+
+ /////////////////////////////////////////////////////
+ /////////////// API Implementation///////////////////
+ /////////////////////////////////////////////////////
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ public static String getResultObjectName() {
+ return "virtualmachine";
+ }
+
+ @Override
+ public long getEntityOwnerId() {
+ UserVm userVm = _entityMgr.findById(UserVm.class, getId());
+ if (userVm != null) {
+ return userVm.getAccountId();
+ }
+
+ return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
+ }
+
+ @Override
+ public void execute(){
+ //UserContext.current().setEventDetails("Vm Id: "+getId());
+ UserVm result = null;
+ try {
+ result = _userVmService.upgradeVirtualMachine(this);
+ } catch (ResourceUnavailableException ex) {
+ s_logger.warn("Exception: ", ex);
+ throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());
+ } catch (ConcurrentOperationException ex) {
+ s_logger.warn("Exception: ", ex);
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
+ } catch (ManagementServerException ex) {
+ s_logger.warn("Exception: ", ex);
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
+ } catch (VirtualMachineMigrationException ex) {
+ s_logger.warn("Exception: ", ex);
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
+ }
+ if (result != null){
+ UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0);
+ response.setResponseName(getCommandName());
+ this.setResponseObject(response);
+ } else {
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to scale vm");
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java
new file mode 100644
index 0000000..301fa02
--- /dev/null
+++ b/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java
@@ -0,0 +1,122 @@
+// 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.
+package org.apache.cloudstack.api.command.test;
+
+import com.cloud.user.Account;
+import com.cloud.user.UserContext;
+import com.cloud.uservm.UserVm;
+import com.cloud.vm.UserVmService;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.cloudstack.api.ResponseGenerator;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.command.admin.region.AddRegionCmd;
+import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
+import org.apache.cloudstack.api.response.RegionResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.region.Region;
+import org.apache.cloudstack.region.RegionService;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+
+public class ScaleVMCmdTest extends TestCase{
+
+ private ScaleVMCmd scaleVMCmd;
+ private ResponseGenerator responseGenerator;
+
+ @Rule
+ public ExpectedException expectedException = ExpectedException.none();
+
+ @Before
+ public void setUp() {
+
+ scaleVMCmd = new ScaleVMCmd(){
+ @Override
+ public Long getId() {
+ return 2L;
+ }
+ };
+
+ //Account account = new AccountVO("testaccount", 1L, "networkdomain", (short) 0, "uuid");
+ //UserContext.registerContext(1, account, null, true);
+
+
+ }
+
+
+ @Test
+ public void testCreateSuccess() {
+
+ UserVmService userVmService = Mockito.mock(UserVmService.class);
+
+ UserVm uservm = Mockito.mock(UserVm.class);
+ try {
+ Mockito.when(
+ userVmService.upgradeVirtualMachine(scaleVMCmd))
+ .thenReturn(uservm);
+ }catch (Exception e){
+ Assert.fail("Received exception when success expected " +e.getMessage());
+ }
+
+ scaleVMCmd._userVmService = userVmService;
+ responseGenerator = Mockito.mock(ResponseGenerator.class);
+
+ UserVmResponse userVmResponse = Mockito.mock(UserVmResponse.class);
+ List<UserVmResponse> responseList = new ArrayList<UserVmResponse>();
+ responseList.add(userVmResponse);
+
+ Mockito.when(responseGenerator.createUserVmResponse("virtualmachine",uservm))
+ .thenReturn(responseList);
+
+ scaleVMCmd._responseGenerator = responseGenerator;
+ scaleVMCmd.execute();
+
+ }
+
+ @Test
+ public void testCreateFailure() {
+
+ UserVmService userVmService = Mockito.mock(UserVmService.class);
+
+ try {
+ UserVm uservm = Mockito.mock(UserVm.class);
+ Mockito.when(
+ userVmService.upgradeVirtualMachine(scaleVMCmd))
+ .thenReturn(null);
+ }catch (Exception e){
+ Assert.fail("Received exception when success expected " +e.getMessage());
+ }
+
+ scaleVMCmd._userVmService = userVmService;
+
+ try {
+ scaleVMCmd.execute();
+ } catch (ServerApiException exception) {
+ Assert.assertEquals("Failed to scale vm",
+ exception.getDescription());
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 3b3ffdf..163c2ce 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -66,6 +66,7 @@ listVirtualMachines=15
getVMPassword=15
restoreVirtualMachine=15
changeServiceForVirtualMachine=15
+scaleVirtualMachine=15
assignVirtualMachine=1
migrateVirtualMachine=1
recoverVirtualMachine=7
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/core/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/vm/VMInstanceVO.java b/core/src/com/cloud/vm/VMInstanceVO.java
index 6149e43..77e9c02 100644
--- a/core/src/com/cloud/vm/VMInstanceVO.java
+++ b/core/src/com/cloud/vm/VMInstanceVO.java
@@ -480,4 +480,4 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
return diskOfferingId;
}
-}
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 52d992f..d2f3f69 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -53,6 +53,7 @@ import javax.ejb.Local;
import javax.naming.ConfigurationException;
import javax.xml.parsers.DocumentBuilderFactory;
+import com.cloud.agent.api.*;
import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
import com.cloud.agent.api.to.*;
import com.cloud.network.rules.FirewallRule;
@@ -600,12 +601,93 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
return execute((RevertToVMSnapshotCommand)cmd);
} else if (clazz == NetworkRulesVmSecondaryIpCommand.class) {
return execute((NetworkRulesVmSecondaryIpCommand)cmd);
+ } else if (clazz == ScaleVmCommand.class) {
+ return execute((ScaleVmCommand) cmd);
} else {
return Answer.createUnsupportedCommandAnswer(cmd);
}
}
+ protected void scaleVM(Connection conn, VM vm, VirtualMachineTO vmSpec, Host host) throws XenAPIException, XmlRpcException {
+ vm.setMemoryDynamicRange(conn, vmSpec.getMinRam() * 1024 * 1024, vmSpec.getMaxRam() * 1024 * 1024);
+ vm.setVCPUsNumberLive(conn, (long)vmSpec.getCpus());
+
+ Integer speed = vmSpec.getSpeed();
+ if (speed != null) {
+
+ int cpuWeight = _maxWeight; //cpu_weight
+
+ // weight based allocation
+
+ cpuWeight = (int)((speed*0.99) / _host.speed * _maxWeight);
+ if (cpuWeight > _maxWeight) {
+ cpuWeight = _maxWeight;
+ }
+
+ if (vmSpec.getLimitCpuUse()) {
+ long utilization = 0; // max CPU cap, default is unlimited
+ utilization = ((long)speed * 100 * vmSpec.getCpus()) / _host.speed ;
+ vm.addToVCPUsParamsLive(conn, "cap", Long.toString(utilization));
+ }
+ //vm.addToVCPUsParamsLive(conn, "weight", Integer.toString(cpuWeight));
+ callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "weight", "value", Integer.toString(cpuWeight), "vmname", vmSpec.getName() );
+ }
+ }
+
+ public ScaleVmAnswer execute(ScaleVmCommand cmd) {
+ VirtualMachineTO vmSpec = cmd.getVirtualMachine();
+ String vmName = vmSpec.getName();
+ try {
+ Connection conn = getConnection();
+ Set<VM> vms = VM.getByNameLabel(conn, vmName);
+ Host host = Host.getByUuid(conn, _host.uuid);
+ // stop vm which is running on this host or is in halted state
+ Iterator<VM> iter = vms.iterator();
+ while ( iter.hasNext() ) {
+ VM vm = iter.next();
+ VM.Record vmr = vm.getRecord(conn);
+
+ if ((vmr.powerState == VmPowerState.HALTED) || (vmr.powerState == VmPowerState.RUNNING && !isRefNull(vmr.residentOn) && !vmr.residentOn.getUuid(conn).equals(_host.uuid))) {
+ iter.remove();
+ }
+ }
+
+ if (vms.size() == 0) {
+ s_logger.info("No running VM " + vmName +" exists on XenServer" + _host.uuid);
+ return new ScaleVmAnswer(cmd, false, "VM does not exist");
+ }
+
+ for (VM vm : vms) {
+ VM.Record vmr = vm.getRecord(conn);
+ try {
+ scaleVM(conn, vm, vmSpec, host);
+
+ } catch (Exception e) {
+ String msg = "Catch exception " + e.getClass().getName() + " when scaling VM:" + vmName + " due to " + e.toString();
+ s_logger.debug(msg);
+ return new ScaleVmAnswer(cmd, false, msg);
+ }
+
+ }
+ String msg = "scaling VM " + vmName + " is successful on host " + host;
+ s_logger.debug(msg);
+ return new ScaleVmAnswer(cmd, true, msg);
+
+ } catch (XenAPIException e) {
+ String msg = "Upgrade Vm " + vmName + " fail due to " + e.toString();
+ s_logger.warn(msg, e);
+ return new ScaleVmAnswer(cmd, false, msg);
+ } catch (XmlRpcException e) {
+ String msg = "Upgrade Vm " + vmName + " fail due to " + e.getMessage();
+ s_logger.warn(msg, e);
+ return new ScaleVmAnswer(cmd, false, msg);
+ } catch (Exception e) {
+ String msg = "Unable to upgrade " + vmName + " due to " + e.getMessage();
+ s_logger.warn(msg, e);
+ return new ScaleVmAnswer(cmd, false, msg);
+ }
+ }
private Answer execute(RevertToVMSnapshotCommand cmd) {
String vmName = cmd.getVmName();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java
index 7040311..d64e173 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java
@@ -138,9 +138,14 @@ public class XenServer56FP1Resource extends XenServer56Resource {
record.actionsAfterShutdown = Types.OnNormalExit.DESTROY;
record.memoryDynamicMax = vmSpec.getMaxRam();
record.memoryDynamicMin = vmSpec.getMinRam();
- record.memoryStaticMax = vmSpec.getMaxRam();
- record.memoryStaticMin = vmSpec.getMinRam();
- record.VCPUsMax = (long) vmSpec.getCpus();
+ record.memoryStaticMax = 8589934592L; //128GB
+ record.memoryStaticMin = 134217728L; //128MB
+ if (guestOsTypeName.toLowerCase().contains("windows")) {
+ record.VCPUsMax = (long) vmSpec.getCpus();
+ } else {
+ record.VCPUsMax = 32L;
+ }
+
record.VCPUsAtStartup = (long) vmSpec.getCpus();
record.consoles.clear();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java b/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java
new file mode 100644
index 0000000..7392cb1
--- /dev/null
+++ b/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java
@@ -0,0 +1,148 @@
+/*
+ * 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.
+ */
+
+package com.cloud.hypervisor.xen.resource;
+
+import org.junit.Test;
+import org.junit.Before;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.*;
+
+import com.cloud.hypervisor.xen.resource.CitrixResourceBase.XsHost;
+import com.cloud.agent.api.ScaleVmCommand;
+import com.cloud.agent.api.to.VirtualMachineTO;
+import com.cloud.agent.api.ScaleVmAnswer;
+import com.xensource.xenapi.*;
+import org.apache.xmlrpc.XmlRpcException;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+
+
+
+
+public class CitrixResourceBaseTest {
+
+ @Spy CitrixResourceBase _resource = new CitrixResourceBase() {
+
+ @Override
+ public ScaleVmAnswer execute(ScaleVmCommand cmd) {
+ return super.execute(cmd);
+ }
+ public String callHostPlugin(Connection conn, String plugin, String cmd, String... params) {
+ return "Success";
+ }
+ @Override
+ protected void scaleVM(Connection conn, VM vm, VirtualMachineTO vmSpec, Host host) throws Types.XenAPIException, XmlRpcException {
+ _host.speed = 500;
+ super.scaleVM(conn, vm, vmSpec, host);
+ }
+
+
+ };
+ @Mock XsHost _host;
+ @Mock Host host;
+ @Mock ScaleVmCommand cmd;
+ @Mock VirtualMachineTO vmSpec;
+ @Mock Connection conn;
+ @Mock VM vm;
+
+ @Before
+ public void setup(){
+
+ MockitoAnnotations.initMocks(this);
+
+ doReturn(vmSpec).when(cmd).getVirtualMachine();
+ doReturn("i-2-3-VM").when(vmSpec).getName();
+
+ }
+
+
+ // Expecting XmlRpcException while trying to get the record of vm using connection
+ @Test(expected = XmlRpcException.class)
+ public void testScaleVMF1() throws
+ Types.BadServerResponse,
+ Types.XenAPIException,
+ XmlRpcException {
+ doReturn(conn).when(_resource).getConnection();
+ Set<VM> vms = (Set<VM> )mock(Set.class);
+
+ Iterator iter = mock(Iterator.class);
+ doReturn(iter).when(vms).iterator();
+ when(iter.hasNext()).thenReturn(true).thenReturn(false);
+ doReturn(vm).when(iter).next();
+ VM.Record vmr = mock(VM.Record.class);
+ when(vm.getRecord(conn)).thenThrow(new XmlRpcException("XmlRpcException"));
+ when(vm.getRecord(conn)).thenReturn(vmr);
+ vmr.powerState = Types.VmPowerState.RUNNING;
+ vmr.residentOn = mock(Host.class);
+ XenAPIObject object = mock(XenAPIObject.class);
+ doReturn(new String("OpaqueRef:NULL")).when(object).toWireString();
+ doNothing().when(_resource).scaleVM(conn, vm, vmSpec, host);
+
+ _resource.execute(cmd);
+ verify(iter, times(2)).hasNext();
+ verify(iter, times(2)).next();
+
+ }
+
+ // Test to scale vm "i-2-3-VM" cpu-cap disabled
+ @Test
+ public void testScaleVMF2() throws Types.XenAPIException, XmlRpcException {
+
+ doReturn(null).when(vm).setMemoryDynamicRangeAsync(conn, 536870912L, 536870912L);
+ doReturn(1).when(vmSpec).getCpus();
+ doNothing().when(vm).setVCPUsNumberLive(conn, 1L);
+ doReturn(500).when(vmSpec).getSpeed();
+ doReturn(false).when(vmSpec).getLimitCpuUse();
+ Map<String, String> args = (Map<String, String>)mock(HashMap.class);
+ when(host.callPlugin(conn, "vmops", "add_to_VCPUs_params_live", args)).thenReturn("Success");
+ doReturn(null).when(_resource).callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "weight", "value", "253", "vmname", "i-2-3-VM");
+
+ _resource.scaleVM(conn, vm, vmSpec, host);
+
+ verify(vmSpec, times(1)).getLimitCpuUse();
+ verify(_resource, times(1)).callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "weight", "value", "253", "vmname", "i-2-3-VM");
+ }
+
+ // Test to scale vm "i-2-3-VM" cpu-cap enabled
+ @Test
+ public void testScaleVMF3() throws Types.XenAPIException, XmlRpcException {
+
+ doReturn(null).when(vm).setMemoryDynamicRangeAsync(conn, 536870912L, 536870912L);
+ doReturn(1).when(vmSpec).getCpus();
+ doNothing().when(vm).setVCPUsNumberLive(conn, 1L);
+ doReturn(500).when(vmSpec).getSpeed();
+ doReturn(true).when(vmSpec).getLimitCpuUse();
+ doNothing().when(vm).addToVCPUsParamsLive(conn, "cap", "100");
+ Map<String, String> args = (Map<String, String>)mock(HashMap.class);
+ when(host.callPlugin(conn, "vmops", "add_to_VCPUs_params_live", args)).thenReturn("Success");
+ doReturn(null).when(_resource).callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "weight", "value", "253", "vmname", "i-2-3-VM");
+
+ _resource.scaleVM(conn, vm, vmSpec, host);
+
+ verify(vmSpec, times(1)).getLimitCpuUse();
+ verify(_resource, times(1)).callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "weight", "value", "253", "vmname", "i-2-3-VM");
+ verify(vm, times(1)).addToVCPUsParamsLive(conn, "cap", "100");
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/scripts/vm/hypervisor/xenserver/Add-To-VCPUs-Params-Live.sh
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/Add-To-VCPUs-Params-Live.sh b/scripts/vm/hypervisor/xenserver/Add-To-VCPUs-Params-Live.sh
new file mode 100644
index 0000000..0fadcd8
--- /dev/null
+++ b/scripts/vm/hypervisor/xenserver/Add-To-VCPUs-Params-Live.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# 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.
+
+set -x
+
+vmname=$1
+key=$2
+value=$3
+uuid=`xe vm-list name-label=$vmname | grep uuid | awk '{print $NF}'`
+if [[ $key == "weight" ]]
+then
+ xe vm-param-set VCPUs-params:weight=$value uuid=$uuid
+fi
+if [[ $key == "cap" ]]
+then
+ xe vm-param-set VCPUs-params:cap=$value uuid=$uuid
+fi
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/scripts/vm/hypervisor/xenserver/vmops
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/vmops b/scripts/vm/hypervisor/xenserver/vmops
index 31c9a59..30b5300 100755
--- a/scripts/vm/hypervisor/xenserver/vmops
+++ b/scripts/vm/hypervisor/xenserver/vmops
@@ -43,6 +43,18 @@ def echo(fn):
return wrapped
@echo
+def add_to_VCPUs_params_live(session, args):
+ key = args['key']
+ value = args['value']
+ vmname = args['vmname']
+ try:
+ cmd = ["bash", "/opt/xensource/bin/Add-To-VCPUs-Params-Live.sh", vmname, key, value]
+ txt = util.pread2(cmd)
+ except:
+ return 'false'
+ return 'true'
+
+@echo
def gethostvmstats(session, args):
collect_host_stats = args['collectHostStats']
consolidation_function = args['consolidationFunction']
@@ -1661,6 +1673,7 @@ if __name__ == "__main__":
"default_network_rules_systemvm":default_network_rules_systemvm,
"network_rules_vmSecondaryIp":network_rules_vmSecondaryIp,
"get_rule_logs_for_vms":get_rule_logs_for_vms,
+ "add_to_VCPUs_params_live":add_to_VCPUs_params_live,
"setLinkLocalIP":setLinkLocalIP,
"cleanup_rules":cleanup_rules,
"bumpUpPriority":bumpUpPriority,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/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 1a57a64..ba4ae62 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -177,7 +177,8 @@ public enum Config {
RouterTemplateId("Advanced", NetworkManager.class, Long.class, "router.template.id", "1", "Default ID for template.", null),
RouterExtraPublicNics("Advanced", NetworkManager.class, Integer.class, "router.extra.public.nics", "2", "specify extra public nics used for virtual router(up to 5)", "0-5"),
StartRetry("Advanced", AgentManager.class, Integer.class, "start.retry", "10", "Number of times to retry create and start commands", null),
- StopRetryInterval("Advanced", HighAvailabilityManager.class, Integer.class, "stop.retry.interval", "600", "Time in seconds between retries to stop or destroy a vm" , null),
+ ScaleRetry("Advanced", AgentManager.class, Integer.class, "scale.retry", "2", "Number of times to retry scaling up the vm", null),
+ StopRetryInterval("Advanced", HighAvailabilityManager.class, Integer.class, "stop.retry.interval", "600", "Time in seconds between retries to stop or destroy a vm" , null),
StorageCleanupInterval("Advanced", StorageManager.class, Integer.class, "storage.cleanup.interval", "86400", "The interval (in seconds) to wait before running the storage cleanup thread.", null),
StorageCleanupEnabled("Advanced", StorageManager.class, Boolean.class, "storage.cleanup.enabled", "true", "Enables/disables the storage cleanup thread.", null),
UpdateWait("Advanced", AgentManager.class, Integer.class, "update.wait", "600", "Time to wait (in seconds) before alerting on a updating agent", null),
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index f80e0c2..ecd7751 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -2115,6 +2115,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
cmdList.add(DestroyVMCmd.class);
cmdList.add(GetVMPasswordCmd.class);
cmdList.add(ListVMsCmd.class);
+ cmdList.add(ScaleVMCmd.class);
cmdList.add(RebootVMCmd.class);
cmdList.add(RemoveNicFromVMCmd.class);
cmdList.add(ResetVMPasswordCmd.class);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/src/com/cloud/vm/ItWorkVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/ItWorkVO.java b/server/src/com/cloud/vm/ItWorkVO.java
index 6f53495..d218880 100644
--- a/server/src/com/cloud/vm/ItWorkVO.java
+++ b/server/src/com/cloud/vm/ItWorkVO.java
@@ -41,7 +41,8 @@ public class ItWorkVO {
Started,
Release,
Done,
- Migrating
+ Migrating,
+ Reconfiguring
}
@Id
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 82a69bd..6e9cd43 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -32,22 +32,12 @@ import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import com.cloud.api.ApiDBUtils;
import org.apache.cloudstack.acl.ControlledEntity.ACLType;
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
-import org.apache.cloudstack.api.command.user.vm.AddNicToVMCmd;
-import org.apache.cloudstack.api.command.user.vm.DeployVMCmd;
-import org.apache.cloudstack.api.command.user.vm.DestroyVMCmd;
-import org.apache.cloudstack.api.command.user.vm.RebootVMCmd;
-import org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd;
-import org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd;
-import org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd;
-import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
-import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
+import org.apache.cloudstack.api.command.user.vm.*;
import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd;
import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity;
@@ -349,7 +339,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
@Inject
protected SecurityGroupDao _securityGroupDao;
@Inject
- protected CapacityManager _capacityMgr;;
+ protected CapacityManager _capacityMgr;
@Inject
protected VMInstanceDao _vmInstanceDao;
@Inject
@@ -397,6 +387,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
protected String _instance;
protected String _zone;
protected boolean _instanceNameFlag;
+ protected int _scaleRetry;
@Inject ConfigurationDao _configDao;
private int _createprivatetemplatefromvolumewait;
@@ -1048,6 +1039,78 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
}
@Override
+ @ActionEvent(eventType = EventTypes.EVENT_VM_SCALE, eventDescription = "scaling Vm")
+ public UserVm
+ upgradeVirtualMachine(ScaleVMCmd cmd) throws InvalidParameterValueException {
+ Long vmId = cmd.getId();
+ Long newServiceOfferingId = cmd.getServiceOfferingId();
+ Account caller = UserContext.current().getCaller();
+
+ // Verify input parameters
+ VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId);
+ if(vmInstance.getHypervisorType() != HypervisorType.XenServer){
+ throw new InvalidParameterValueException("This operation not permitted for this hypervisor of the vm");
+ }
+
+ _accountMgr.checkAccess(caller, null, true, vmInstance);
+
+ // Check that the specified service offering ID is valid
+ _itMgr.checkIfCanUpgrade(vmInstance, newServiceOfferingId);
+
+ //Check if its a scale "up"
+ ServiceOffering newServiceOffering = _configMgr.getServiceOffering(newServiceOfferingId);
+ ServiceOffering oldServiceOffering = _configMgr.getServiceOffering(vmInstance.getServiceOfferingId());
+ if(newServiceOffering.getSpeed() <= oldServiceOffering.getSpeed()
+ && newServiceOffering.getRamSize() <= oldServiceOffering.getRamSize()){
+ throw new InvalidParameterValueException("Only scaling up the vm is supported, new service offering should have both cpu and memory greater than the old values");
+ }
+
+ // Dynamically upgrade the running vms
+ if(vmInstance.getState().equals(State.Running)){
+ boolean success = false;
+ int retry = _scaleRetry;
+ while (retry-- != 0) { // It's != so that it can match -1.
+ try{
+ // #1 Check existing host has capacity
+ boolean existingHostHasCapacity = _capacityMgr.checkIfHostHasCapacity(vmInstance.getHostId(), newServiceOffering.getSpeed() - oldServiceOffering.getSpeed(),
+ (newServiceOffering.getRamSize() - oldServiceOffering.getRamSize()) * 1024L * 1024L, false, ApiDBUtils.getCpuOverprovisioningFactor(), 1f, false); // TO DO fill it with mem.
+
+ // #2 migrate the vm if host doesn't have capacity
+ if (!existingHostHasCapacity){
+ vmInstance = _itMgr.findHostAndMigrate(vmInstance.getType(), vmInstance, newServiceOfferingId);
+ }
+
+ // #3 scale the vm now
+ _itMgr.upgradeVmDb(vmId, newServiceOfferingId);
+ vmInstance = _vmInstanceDao.findById(vmId);
+ vmInstance = _itMgr.reConfigureVm(vmInstance, oldServiceOffering, existingHostHasCapacity);
+ success = true;
+ return _vmDao.findById(vmInstance.getId());
+ }catch(InsufficientCapacityException e ){
+ s_logger.warn("Received exception while scaling ",e);
+ } catch (ResourceUnavailableException e) {
+ s_logger.warn("Received exception while scaling ",e);
+ } catch (ConcurrentOperationException e) {
+ s_logger.warn("Received exception while scaling ",e);
+ } catch (VirtualMachineMigrationException e) {
+ s_logger.warn("Received exception while scaling ",e);
+ } catch (ManagementServerException e) {
+ s_logger.warn("Received exception while scaling ",e);
+ }finally{
+ if(!success){
+ _itMgr.upgradeVmDb(vmId, oldServiceOffering.getId()); // rollback
+ }
+ }
+ }
+ if (!success)
+ return null;
+ }
+
+ return _vmDao.findById(vmInstance.getId());
+
+ }
+
+ @Override
public HashMap<Long, VmStatsEntry> getVirtualMachineStatistics(long hostId,
String hostName, List<Long> vmIds) throws CloudRuntimeException {
HashMap<Long, VmStatsEntry> vmStatsById = new HashMap<Long, VmStatsEntry>();
@@ -1240,6 +1303,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
new UserVmStateListener(_usageEventDao, _networkDao, _nicDao));
value = _configDao.getValue(Config.SetVmInternalNameUsingDisplayName.key());
+
if(value == null) {
_instanceNameFlag = false;
}
@@ -1248,6 +1312,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
_instanceNameFlag = Boolean.parseBoolean(value);
}
+ _scaleRetry = NumbersUtil.parseInt(configs.get(Config.ScaleRetry.key()), 2);
+
s_logger.info("User VM Manager is configured.");
return true;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/src/com/cloud/vm/VirtualMachineManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManager.java b/server/src/com/cloud/vm/VirtualMachineManager.java
index 7b34f7f0..4a30d97 100644
--- a/server/src/com/cloud/vm/VirtualMachineManager.java
+++ b/server/src/com/cloud/vm/VirtualMachineManager.java
@@ -186,4 +186,16 @@ public interface VirtualMachineManager extends Manager {
*/
VirtualMachineTO toVmTO(VirtualMachineProfile<? extends VMInstanceVO> profile);
+
+ VMInstanceVO reConfigureVm(VMInstanceVO vm, ServiceOffering newServiceOffering, boolean sameHost)
+ throws ResourceUnavailableException, ConcurrentOperationException;
+
+ VMInstanceVO findHostAndMigrate(VirtualMachine.Type vmType, VMInstanceVO vm, Long newSvcOfferingId) throws InsufficientCapacityException,
+ ConcurrentOperationException, ResourceUnavailableException,
+ VirtualMachineMigrationException, ManagementServerException;
+
+ <T extends VMInstanceVO> T migrateForScale(T vm, long srcHostId, DeployDestination dest, Long newSvcOfferingId)
+ throws ResourceUnavailableException, ConcurrentOperationException,
+ ManagementServerException, VirtualMachineMigrationException;
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 0aeef0e..a6d0b1b 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -36,37 +36,18 @@ import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import com.cloud.capacity.CapacityManager;
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
import com.cloud.dc.*;
+import com.cloud.agent.api.*;
import org.apache.log4j.Logger;
import com.cloud.agent.AgentManager;
import com.cloud.agent.AgentManager.OnError;
import com.cloud.agent.Listener;
-import com.cloud.agent.api.AgentControlAnswer;
-import com.cloud.agent.api.AgentControlCommand;
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.CheckVirtualMachineAnswer;
-import com.cloud.agent.api.CheckVirtualMachineCommand;
-import com.cloud.agent.api.ClusterSyncAnswer;
-import com.cloud.agent.api.ClusterSyncCommand;
-import com.cloud.agent.api.Command;
-import com.cloud.agent.api.MigrateAnswer;
-import com.cloud.agent.api.MigrateCommand;
-import com.cloud.agent.api.PingRoutingCommand;
-import com.cloud.agent.api.PrepareForMigrationAnswer;
-import com.cloud.agent.api.PrepareForMigrationCommand;
-import com.cloud.agent.api.RebootAnswer;
-import com.cloud.agent.api.RebootCommand;
-import com.cloud.agent.api.StartAnswer;
-import com.cloud.agent.api.StartCommand;
-import com.cloud.agent.api.StartupCommand;
-import com.cloud.agent.api.StartupRoutingCommand;
import com.cloud.agent.api.StartupRoutingCommand.VmState;
-import com.cloud.agent.api.StopAnswer;
-import com.cloud.agent.api.StopCommand;
import com.cloud.agent.api.to.NicTO;
import com.cloud.agent.api.to.VirtualMachineTO;
import com.cloud.agent.manager.Commands;
@@ -195,6 +176,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
@Inject
protected UserVmDao _userVmDao;
@Inject
+ protected CapacityManager _capacityMgr;
+ @Inject
protected NicDao _nicsDao;
@Inject
protected AccountManager _accountMgr;
@@ -2422,13 +2405,12 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
if (newServiceOffering == null) {
throw new InvalidParameterValueException("Unable to find a service offering with id " + newServiceOfferingId);
}
-
- // Check that the VM is stopped
- if (!vmInstance.getState().equals(State.Stopped)) {
+
+ // Check that the VM is stopped / running
+ if (!(vmInstance.getState().equals(State.Stopped) || vmInstance.getState().equals(State.Running) )) {
s_logger.warn("Unable to upgrade virtual machine " + vmInstance.toString() + " in state " + vmInstance.getState());
- throw new InvalidParameterValueException("Unable to upgrade virtual machine " + vmInstance.toString() + " " +
- "in state " + vmInstance.getState()
- + "; make sure the virtual machine is stopped and not in an error state before upgrading.");
+ throw new InvalidParameterValueException("Unable to upgrade virtual machine " + vmInstance.toString() + " " + " in state " + vmInstance.getState()
+ + "; make sure the virtual machine is stopped/running");
}
// Check if the service offering being upgraded to is what the VM is already running with
@@ -2679,4 +2661,277 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
return true;
}
-}
+ @Override
+ public VMInstanceVO findHostAndMigrate(VirtualMachine.Type vmType, VMInstanceVO vm, Long newSvcOfferingId)
+ throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, VirtualMachineMigrationException, ManagementServerException {
+
+ VirtualMachineProfile<VMInstanceVO> profile = new VirtualMachineProfileImpl<VMInstanceVO>(vm);
+
+ Long srcHostId = vm.getHostId();
+ Long oldSvcOfferingId = vm.getServiceOfferingId();
+ if (srcHostId == null) {
+ throw new CloudRuntimeException("Unable to scale the vm because it doesn't have a host id");
+ }
+ Host host = _hostDao.findById(srcHostId);
+ DataCenterDeployment plan = new DataCenterDeployment(host.getDataCenterId(), host.getPodId(), host.getClusterId(), null, null, null);
+ ExcludeList excludes = new ExcludeList();
+ excludes.addHost(vm.getHostId());
+ vm.setServiceOfferingId(newSvcOfferingId); // Need to find the destination host based on new svc offering
+
+ DeployDestination dest = null;
+
+ for (DeploymentPlanner planner : _planners) {
+ if (planner.canHandle(profile, plan, excludes)) {
+ dest = planner.plan(profile, plan, excludes);
+ } else {
+ continue;
+ }
+
+ if (dest != null) {
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("Planner " + planner + " found " + dest + " for scaling the vm to.");
+ }
+ break;
+ }
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("Planner " + planner + " was unable to find anything.");
+ }
+ }
+
+ if (dest == null) {
+ throw new InsufficientServerCapacityException("Unable to find a server to scale the vm to.", host.getClusterId());
+ }
+
+ excludes.addHost(dest.getHost().getId());
+ VMInstanceVO vmInstance = null;
+ try {
+ vmInstance = migrateForScale(vm, srcHostId, dest, oldSvcOfferingId);
+ } catch (ResourceUnavailableException e) {
+ s_logger.debug("Unable to migrate to unavailable " + dest);
+ throw e;
+ } catch (ConcurrentOperationException e) {
+ s_logger.debug("Unable to migrate VM due to: " + e.getMessage());
+ throw e;
+ } catch (ManagementServerException e) {
+ s_logger.debug("Unable to migrate VM: " + e.getMessage());
+ throw e;
+ } catch (VirtualMachineMigrationException e) {
+ s_logger.debug("Got VirtualMachineMigrationException, Unable to migrate: " + e.getMessage());
+ if (vm.getState() == State.Starting) {
+ s_logger.debug("VM seems to be still Starting, we should retry migration later");
+ throw e;
+ } else {
+ s_logger.debug("Unable to migrate VM, VM is not in Running or even Starting state, current state: " + vm.getState().toString());
+ }
+ }
+ if (vmInstance != null) {
+ return vmInstance;
+ }else{
+ return null;
+ }
+ }
+
+ @Override
+ public <T extends VMInstanceVO> T migrateForScale(T vm, long srcHostId, DeployDestination dest, Long oldSvcOfferingId) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException,
+ VirtualMachineMigrationException {
+ s_logger.info("Migrating " + vm + " to " + dest);
+
+ Long newSvcOfferingId = vm.getServiceOfferingId();
+ long dstHostId = dest.getHost().getId();
+ Host fromHost = _hostDao.findById(srcHostId);
+ if (fromHost == null) {
+ s_logger.info("Unable to find the host to migrate from: " + srcHostId);
+ throw new CloudRuntimeException("Unable to find the host to migrate from: " + srcHostId);
+ }
+
+ if (fromHost.getClusterId().longValue() != dest.getCluster().getId()) {
+ s_logger.info("Source and destination host are not in same cluster, unable to migrate to host: " + dest.getHost().getId());
+ throw new CloudRuntimeException("Source and destination host are not in same cluster, unable to migrate to host: " + dest.getHost().getId());
+ }
+
+ VirtualMachineGuru<T> vmGuru = getVmGuru(vm);
+
+ long vmId = vm.getId();
+ vm = vmGuru.findById(vmId);
+ if (vm == null) {
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("Unable to find the vm " + vm);
+ }
+ throw new ManagementServerException("Unable to find a virtual machine with id " + vmId);
+ }
+
+ if (vm.getState() != State.Running) {
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("VM is not Running, unable to migrate the vm " + vm);
+ }
+ throw new VirtualMachineMigrationException("VM is not Running, unable to migrate the vm currently " + vm + " , current state: " + vm.getState().toString());
+ }
+
+ short alertType = AlertManager.ALERT_TYPE_USERVM_MIGRATE;
+ if (VirtualMachine.Type.DomainRouter.equals(vm.getType())) {
+ alertType = AlertManager.ALERT_TYPE_DOMAIN_ROUTER_MIGRATE;
+ } else if (VirtualMachine.Type.ConsoleProxy.equals(vm.getType())) {
+ alertType = AlertManager.ALERT_TYPE_CONSOLE_PROXY_MIGRATE;
+ }
+
+ VirtualMachineProfile<VMInstanceVO> profile = new VirtualMachineProfileImpl<VMInstanceVO>(vm);
+ _networkMgr.prepareNicForMigration(profile, dest);
+ this.volumeMgr.prepareForMigration(profile, dest);
+
+ VirtualMachineTO to = toVmTO(profile);
+ PrepareForMigrationCommand pfmc = new PrepareForMigrationCommand(to);
+
+ ItWorkVO work = new ItWorkVO(UUID.randomUUID().toString(), _nodeId, State.Migrating, vm.getType(), vm.getId());
+ work.setStep(Step.Prepare);
+ work.setResourceType(ItWorkVO.ResourceType.Host);
+ work.setResourceId(dstHostId);
+ work = _workDao.persist(work);
+
+ PrepareForMigrationAnswer pfma = null;
+ try {
+ pfma = (PrepareForMigrationAnswer) _agentMgr.send(dstHostId, pfmc);
+ if (!pfma.getResult()) {
+ String msg = "Unable to prepare for migration due to " + pfma.getDetails();
+ pfma = null;
+ throw new AgentUnavailableException(msg, dstHostId);
+ }
+ } catch (OperationTimedoutException e1) {
+ throw new AgentUnavailableException("Operation timed out", dstHostId);
+ } finally {
+ if (pfma == null) {
+ work.setStep(Step.Done);
+ _workDao.update(work.getId(), work);
+ }
+ }
+
+ vm.setLastHostId(srcHostId);
+ try {
+ if (vm == null || vm.getHostId() == null || vm.getHostId() != srcHostId || !changeState(vm, Event.MigrationRequested, dstHostId, work, Step.Migrating)) {
+ s_logger.info("Migration cancelled because state has changed: " + vm);
+ throw new ConcurrentOperationException("Migration cancelled because state has changed: " + vm);
+ }
+ } catch (NoTransitionException e1) {
+ s_logger.info("Migration cancelled because " + e1.getMessage());
+ throw new ConcurrentOperationException("Migration cancelled because " + e1.getMessage());
+ }
+
+ boolean migrated = false;
+ try {
+ boolean isWindows = _guestOsCategoryDao.findById(_guestOsDao.findById(vm.getGuestOSId()).getCategoryId()).getName().equalsIgnoreCase("Windows");
+ MigrateCommand mc = new MigrateCommand(vm.getInstanceName(), dest.getHost().getPrivateIpAddress(), isWindows);
+ mc.setHostGuid(dest.getHost().getGuid());
+
+ try {
+ MigrateAnswer ma = (MigrateAnswer) _agentMgr.send(vm.getLastHostId(), mc);
+ if (!ma.getResult()) {
+ s_logger.error("Unable to migrate due to " + ma.getDetails());
+ return null;
+ }
+ } catch (OperationTimedoutException e) {
+ if (e.isActive()) {
+ s_logger.warn("Active migration command so scheduling a restart for " + vm);
+ _haMgr.scheduleRestart(vm, true);
+ }
+ throw new AgentUnavailableException("Operation timed out on migrating " + vm, dstHostId);
+ }
+
+ try {
+ long newServiceOfferingId = vm.getServiceOfferingId();
+ vm.setServiceOfferingId(oldSvcOfferingId); // release capacity for the old service offering only
+ if (!changeState(vm, VirtualMachine.Event.OperationSucceeded, dstHostId, work, Step.Started)) {
+ throw new ConcurrentOperationException("Unable to change the state for " + vm);
+ }
+ vm.setServiceOfferingId(newServiceOfferingId);
+ } catch (NoTransitionException e1) {
+ throw new ConcurrentOperationException("Unable to change state due to " + e1.getMessage());
+ }
+
+ try {
+ if (!checkVmOnHost(vm, dstHostId)) {
+ s_logger.error("Unable to complete migration for " + vm);
+ try {
+ _agentMgr.send(srcHostId, new Commands(cleanup(vm.getInstanceName())), null);
+ } catch (AgentUnavailableException e) {
+ s_logger.error("AgentUnavailableException while cleanup on source host: " + srcHostId);
+ }
+ cleanup(vmGuru, new VirtualMachineProfileImpl<T>(vm), work, Event.AgentReportStopped, true, _accountMgr.getSystemUser(), _accountMgr.getSystemAccount());
+ return null;
+ }
+ } catch (OperationTimedoutException e) {
+ }
+
+ migrated = true;
+ return vm;
+ } finally {
+ if (!migrated) {
+ s_logger.info("Migration was unsuccessful. Cleaning up: " + vm);
+
+ _alertMgr.sendAlert(alertType, fromHost.getDataCenterId(), fromHost.getPodId(), "Unable to migrate vm " + vm.getInstanceName() + " from host " + fromHost.getName() + " in zone "
+ + dest.getDataCenter().getName() + " and pod " + dest.getPod().getName(), "Migrate Command failed. Please check logs.");
+ try {
+ _agentMgr.send(dstHostId, new Commands(cleanup(vm.getInstanceName())), null);
+ } catch (AgentUnavailableException ae) {
+ s_logger.info("Looks like the destination Host is unavailable for cleanup");
+ }
+
+ try {
+ stateTransitTo(vm, Event.OperationFailed, srcHostId);
+ } catch (NoTransitionException e) {
+ s_logger.warn(e.getMessage());
+ }
+ }
+
+ work.setStep(Step.Done);
+ _workDao.update(work.getId(), work);
+ }
+ }
+ @Override
+ public VMInstanceVO reConfigureVm(VMInstanceVO vm , ServiceOffering oldServiceOffering, boolean reconfiguringOnExistingHost) throws ResourceUnavailableException, ConcurrentOperationException {
+
+ long newServiceofferingId = vm.getServiceOfferingId();
+ ServiceOffering newServiceOffering = _configMgr.getServiceOffering(newServiceofferingId);
+ ScaleVmCommand reconfigureCmd = new ScaleVmCommand(vm.getInstanceName(), newServiceOffering.getCpu(),
+ newServiceOffering.getSpeed(), newServiceOffering.getRamSize(), newServiceOffering.getRamSize(), newServiceOffering.getLimitCpuUse());
+
+ Long dstHostId = vm.getHostId();
+ ItWorkVO work = new ItWorkVO(UUID.randomUUID().toString(), _nodeId, State.Running, vm.getType(), vm.getId());
+ work.setStep(Step.Prepare);
+ work.setResourceType(ItWorkVO.ResourceType.Host);
+ work.setResourceId(vm.getHostId());
+ work = _workDao.persist(work);
+ boolean success = false;
+ try {
+ if(reconfiguringOnExistingHost){
+ vm.setServiceOfferingId(oldServiceOffering.getId());
+ _capacityMgr.releaseVmCapacity(vm, false, false, vm.getHostId()); //release the old capacity
+ vm.setServiceOfferingId(newServiceofferingId);
+ _capacityMgr.allocateVmCapacity(vm, false); // lock the new capacity
+ }
+
+ Answer reconfigureAnswer = _agentMgr.send(vm.getHostId(), reconfigureCmd);
+ if (reconfigureAnswer == null || !reconfigureAnswer.getResult()) {
+ s_logger.error("Unable to scale vm due to " + (reconfigureAnswer == null ? "" : reconfigureAnswer.getDetails()));
+ throw new CloudRuntimeException("Unable to scale vm due to " + (reconfigureAnswer == null ? "" : reconfigureAnswer.getDetails()));
+ }
+
+ success = true;
+ } catch (OperationTimedoutException e) {
+ throw new AgentUnavailableException("Operation timed out on reconfiguring " + vm, dstHostId);
+ } catch (AgentUnavailableException e) {
+ throw e;
+ } finally{
+ // work.setStep(Step.Done);
+ //_workDao.update(work.getId(), work);
+ if(!success){
+ _capacityMgr.releaseVmCapacity(vm, false, false, vm.getHostId()); // release the new capacity
+ vm.setServiceOfferingId(oldServiceOffering.getId());
+ _capacityMgr.allocateVmCapacity(vm, false); // allocate the old capacity
+ }
+ }
+
+ return vm;
+
+ }
+
+
+ }
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/test/com/cloud/vm/MockUserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/MockUserVmManagerImpl.java b/server/test/com/cloud/vm/MockUserVmManagerImpl.java
index 09825a8..dd8dd83 100644
--- a/server/test/com/cloud/vm/MockUserVmManagerImpl.java
+++ b/server/test/com/cloud/vm/MockUserVmManagerImpl.java
@@ -25,18 +25,7 @@ import javax.naming.ConfigurationException;
import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
-import org.apache.cloudstack.api.command.user.vm.AddNicToVMCmd;
-import org.apache.cloudstack.api.command.user.vm.DeployVMCmd;
-import org.apache.cloudstack.api.command.user.vm.DestroyVMCmd;
-import org.apache.cloudstack.api.command.user.vm.RebootVMCmd;
-import org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd;
-import org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd;
-import org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd;
-import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
-import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
-import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
+import org.apache.cloudstack.api.command.user.vm.*;
import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd;
import org.springframework.stereotype.Component;
@@ -391,6 +380,10 @@ public class MockUserVmManagerImpl extends ManagerBase implements UserVmManager,
return null;
}
+ @Override
+ public UserVm upgradeVirtualMachine(ScaleVMCmd scaleVMCmd) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
@Override
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/test/com/cloud/vm/MockVirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/MockVirtualMachineManagerImpl.java b/server/test/com/cloud/vm/MockVirtualMachineManagerImpl.java
index 612c70d..4917e77 100755
--- a/server/test/com/cloud/vm/MockVirtualMachineManagerImpl.java
+++ b/server/test/com/cloud/vm/MockVirtualMachineManagerImpl.java
@@ -265,6 +265,23 @@ public class MockVirtualMachineManagerImpl extends ManagerBase implements Virtua
return null;
}
+ @Override
+ public VMInstanceVO reConfigureVm(VMInstanceVO vm, ServiceOffering newServiceOffering, boolean sameHost) throws ResourceUnavailableException, ConcurrentOperationException {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ @Override
+ public VMInstanceVO findHostAndMigrate(VirtualMachine.Type vmType, VMInstanceVO vm, Long newSvcOfferingId) throws InsufficientCapacityException,
+ ConcurrentOperationException, ResourceUnavailableException,
+ VirtualMachineMigrationException, ManagementServerException{
+ return null;
+ }
+
+ @Override
+ public <T extends VMInstanceVO> T migrateForScale(T vm, long srcHostId, DeployDestination dest, Long newSvcOfferingId) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
/* (non-Javadoc)
* @see com.cloud.vm.VirtualMachineManager#addVmToNetwork(com.cloud.vm.VirtualMachine, com.cloud.network.Network, com.cloud.vm.NicProfile)
*/
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/test/com/cloud/vm/UserVmManagerTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/UserVmManagerTest.java b/server/test/com/cloud/vm/UserVmManagerTest.java
index 0795a35..bb1c07b 100755
--- a/server/test/com/cloud/vm/UserVmManagerTest.java
+++ b/server/test/com/cloud/vm/UserVmManagerTest.java
@@ -17,10 +17,21 @@
package com.cloud.vm;
+import java.lang.reflect.Field;
import java.util.List;
+import com.cloud.api.ApiDBUtils;
+import com.cloud.capacity.CapacityManager;
+import com.cloud.configuration.ConfigurationManager;
+import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.offering.ServiceOffering;
+import com.cloud.service.ServiceOfferingVO;
+import com.cloud.user.*;
+import com.cloud.vm.dao.VMInstanceDao;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.Before;
@@ -39,10 +50,6 @@ import com.cloud.storage.VolumeManager;
import com.cloud.storage.VolumeVO;
import com.cloud.storage.dao.VMTemplateDao;
import com.cloud.storage.dao.VolumeDao;
-import com.cloud.user.Account;
-import com.cloud.user.AccountManager;
-import com.cloud.user.AccountVO;
-import com.cloud.user.UserVO;
import com.cloud.user.dao.AccountDao;
import com.cloud.user.dao.UserDao;
import com.cloud.utils.exception.CloudRuntimeException;
@@ -57,15 +64,21 @@ public class UserVmManagerTest {
@Mock VolumeManager _storageMgr;
@Mock Account _account;
@Mock AccountManager _accountMgr;
+ @Mock ConfigurationManager _configMgr;
+ @Mock CapacityManager _capacityMgr;
@Mock AccountDao _accountDao;
+ @Mock
+ ConfigurationDao _configDao;
@Mock UserDao _userDao;
@Mock UserVmDao _vmDao;
+ @Mock VMInstanceDao _vmInstanceDao;
@Mock VMTemplateDao _templateDao;
@Mock VolumeDao _volsDao;
@Mock RestoreVMCmd _restoreVMCmd;
@Mock AccountVO _accountMock;
@Mock UserVO _userMock;
@Mock UserVmVO _vmMock;
+ @Mock VMInstanceVO _vmInstance;
@Mock VMTemplateVO _templateMock;
@Mock VolumeVO _volumeMock;
@Mock List<VolumeVO> _rootVols;
@@ -74,6 +87,7 @@ public class UserVmManagerTest {
MockitoAnnotations.initMocks(this);
_userVmMgr._vmDao = _vmDao;
+ _userVmMgr._vmInstanceDao = _vmInstanceDao;
_userVmMgr._templateDao = _templateDao;
_userVmMgr._volsDao = _volsDao;
_userVmMgr._itMgr = _itMgr;
@@ -81,6 +95,9 @@ public class UserVmManagerTest {
_userVmMgr._accountDao = _accountDao;
_userVmMgr._userDao = _userDao;
_userVmMgr._accountMgr = _accountMgr;
+ _userVmMgr._configMgr = _configMgr;
+ _userVmMgr._capacityMgr = _capacityMgr;
+ _userVmMgr._scaleRetry = 2;
doReturn(3L).when(_account).getId();
doReturn(8L).when(_vmMock).getAccountId();
@@ -88,6 +105,8 @@ public class UserVmManagerTest {
when(_userDao.findById(anyLong())).thenReturn(_userMock);
doReturn(Account.State.enabled).when(_account).getState();
when(_vmMock.getId()).thenReturn(314L);
+ when(_vmInstance.getId()).thenReturn(1L);
+ when(_vmInstance.getServiceOfferingId()).thenReturn(2L);
}
@@ -179,4 +198,169 @@ public class UserVmManagerTest {
}
+ // Test scaleVm on incompatible HV.
+ @Test(expected=InvalidParameterValueException.class)
+ public void testScaleVMF1() throws Exception {
+
+ ScaleVMCmd cmd = new ScaleVMCmd();
+ Class<?> _class = cmd.getClass();
+
+ Field idField = _class.getDeclaredField("id");
+ idField.setAccessible(true);
+ idField.set(cmd, 1L);
+
+ Field serviceOfferingIdField = _class.getDeclaredField("serviceOfferingId");
+ serviceOfferingIdField.setAccessible(true);
+ serviceOfferingIdField.set(cmd, 1L);
+
+ // UserContext.current().setEventDetails("Vm Id: "+getId());
+ Account account = (Account) new AccountVO("testaccount", 1L, "networkdomain", (short) 0, "uuid");
+ //AccountVO(String accountName, long domainId, String networkDomain, short type, int regionId)
+ UserContext.registerContext(1, account, null, true);
+
+ when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
+
+ _userVmMgr.upgradeVirtualMachine(cmd);
+
+ }
+
+ // Test scaleVm on incompatible HV.
+ @Test(expected=InvalidParameterValueException.class)
+ public void testScaleVMF2() throws Exception {
+
+ ScaleVMCmd cmd = new ScaleVMCmd();
+ Class<?> _class = cmd.getClass();
+
+ Field idField = _class.getDeclaredField("id");
+ idField.setAccessible(true);
+ idField.set(cmd, 1L);
+
+ Field serviceOfferingIdField = _class.getDeclaredField("serviceOfferingId");
+ serviceOfferingIdField.setAccessible(true);
+ serviceOfferingIdField.set(cmd, 1L);
+
+ //UserContext.current().setEventDetails("Vm Id: "+getId());
+ // Account account = (Account) new AccountVO("testaccount", 1L, "networkdomain", (short) 0, 1);
+ //AccountVO(String accountName, long domainId, String networkDomain, short type, int regionId)
+ // UserContext.registerContext(1, account, null, true);
+
+ when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
+ doReturn(Hypervisor.HypervisorType.XenServer).when(_vmInstance).getHypervisorType();
+
+
+ doNothing().when(_accountMgr).checkAccess(_account, null, true, _templateMock);
+
+ doNothing().when(_itMgr).checkIfCanUpgrade(_vmMock, cmd.getServiceOfferingId());
+
+
+ ServiceOffering so1 = (ServiceOffering) getSvcoffering(512);
+ ServiceOffering so2 = (ServiceOffering) getSvcoffering(256);
+
+ when(_configMgr.getServiceOffering(anyLong())).thenReturn(so1);
+ when(_configMgr.getServiceOffering(1L)).thenReturn(so1);
+
+ _userVmMgr.upgradeVirtualMachine(cmd);
+
+ }
+
+ // Test scaleVm for Stopped vm. Full positive test.
+ @Test
+ public void testScaleVMF3() throws Exception {
+
+ ScaleVMCmd cmd = new ScaleVMCmd();
+ Class<?> _class = cmd.getClass();
+
+ Field idField = _class.getDeclaredField("id");
+ idField.setAccessible(true);
+ idField.set(cmd, 1L);
+
+ Field serviceOfferingIdField = _class.getDeclaredField("serviceOfferingId");
+ serviceOfferingIdField.setAccessible(true);
+ serviceOfferingIdField.set(cmd, 1L);
+
+ //UserContext.current().setEventDetails("Vm Id: "+getId());
+ //Account account = (Account) new AccountVO("testaccount", 1L, "networkdomain", (short) 0, 1);
+ //AccountVO(String accountName, long domainId, String networkDomain, short type, int regionId)
+ //UserContext.registerContext(1, account, null, true);
+
+ when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
+ doReturn(Hypervisor.HypervisorType.XenServer).when(_vmInstance).getHypervisorType();
+
+
+ ServiceOffering so1 = (ServiceOffering) getSvcoffering(512);
+ ServiceOffering so2 = (ServiceOffering) getSvcoffering(256);
+
+ when(_configMgr.getServiceOffering(anyLong())).thenReturn(so2);
+ when(_configMgr.getServiceOffering(1L)).thenReturn(so1);
+
+ doReturn(VirtualMachine.State.Stopped).when(_vmInstance).getState();
+
+ doReturn(true).when(_itMgr).upgradeVmDb(anyLong(),anyLong());
+
+ when(_vmDao.findById(anyLong())).thenReturn(_vmMock);
+
+ _userVmMgr.upgradeVirtualMachine(cmd);
+
+ }
+
+ // Test scaleVm for Running vm. Full positive test.
+ public void testScaleVMF4() throws Exception {
+
+ ScaleVMCmd cmd = new ScaleVMCmd();
+ Class<?> _class = cmd.getClass();
+
+ Field idField = _class.getDeclaredField("id");
+ idField.setAccessible(true);
+ idField.set(cmd, 1L);
+
+ Field serviceOfferingIdField = _class.getDeclaredField("serviceOfferingId");
+ serviceOfferingIdField.setAccessible(true);
+ serviceOfferingIdField.set(cmd, 1L);
+
+ //UserContext.current().setEventDetails("Vm Id: "+getId());
+ //Account account = (Account) new AccountVO("testaccount", 1L, "networkdomain", (short) 0, 1);
+ //AccountVO(String accountName, long domainId, String networkDomain, short type, int regionId)
+ //UserContext.registerContext(1, account, null, true);
+
+ when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
+ doReturn(Hypervisor.HypervisorType.XenServer).when(_vmInstance).getHypervisorType();
+
+ ServiceOffering so1 = (ServiceOffering) getSvcoffering(512);
+ ServiceOffering so2 = (ServiceOffering) getSvcoffering(256);
+
+ when(_configMgr.getServiceOffering(anyLong())).thenReturn(so2);
+ when(_configMgr.getServiceOffering(1L)).thenReturn(so1);
+
+ doReturn(VirtualMachine.State.Running).when(_vmInstance).getState();
+
+ //when(ApiDBUtils.getCpuOverprovisioningFactor()).thenReturn(3f);
+ when(_capacityMgr.checkIfHostHasCapacity(anyLong(), anyInt(), anyLong(), anyBoolean(), anyFloat(), anyFloat(), anyBoolean())).thenReturn(false);
+ when(_itMgr.reConfigureVm(_vmInstance, so1, false)).thenReturn(_vmInstance);
+
+ doReturn(true).when(_itMgr).upgradeVmDb(anyLong(), anyLong());
+
+ when(_vmDao.findById(anyLong())).thenReturn(_vmMock);
+
+ _userVmMgr.upgradeVirtualMachine(cmd);
+
+ }
+
+ private ServiceOfferingVO getSvcoffering(int ramSize){
+
+ long id = 4L;
+ String name = "name";
+ String displayText = "displayText";
+ int cpu = 1;
+ //int ramSize = 256;
+ int speed = 128;
+
+ boolean ha = false;
+ boolean useLocalStorage = false;
+
+ ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, ha, displayText, useLocalStorage, false, null, false, null, false);
+ return serviceOffering;
+ }
+
+
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java b/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java
new file mode 100644
index 0000000..322f051
--- /dev/null
+++ b/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java
@@ -0,0 +1,208 @@
+// 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.
+
+package com.cloud.vm;
+
+import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.ScaleVmAnswer;
+import com.cloud.agent.api.ScaleVmCommand;
+import com.cloud.capacity.CapacityManager;
+import com.cloud.configuration.ConfigurationManager;
+import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.deploy.DeployDestination;
+import com.cloud.host.HostVO;
+import com.cloud.host.dao.HostDao;
+import com.cloud.service.ServiceOfferingVO;
+import com.cloud.storage.VMTemplateVO;
+import com.cloud.storage.VolumeManager;
+import com.cloud.storage.VolumeVO;
+import com.cloud.storage.dao.VMTemplateDao;
+import com.cloud.storage.dao.VolumeDao;
+import com.cloud.user.*;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.user.dao.UserDao;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.vm.dao.UserVmDao;
+import com.cloud.vm.dao.VMInstanceDao;
+import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
+import org.junit.Test;
+import org.junit.Before;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.Spy;
+import static org.mockito.Mockito.*;
+
+
+import java.lang.reflect.Field;
+import java.util.List;
+
+public class VirtualMachineManagerImplTest {
+
+
+ @Spy VirtualMachineManagerImpl _vmMgr = new VirtualMachineManagerImpl();
+ @Mock
+ VolumeManager _storageMgr;
+ @Mock
+ Account _account;
+ @Mock
+ AccountManager _accountMgr;
+ @Mock
+ ConfigurationManager _configMgr;
+ @Mock
+ CapacityManager _capacityMgr;
+ @Mock
+ AgentManager _agentMgr;
+ @Mock
+ AccountDao _accountDao;
+ @Mock
+ ConfigurationDao _configDao;
+ @Mock
+ HostDao _hostDao;
+ @Mock
+ UserDao _userDao;
+ @Mock
+ UserVmDao _vmDao;
+ @Mock
+ ItWorkDao _workDao;
+ @Mock
+ VMInstanceDao _vmInstanceDao;
+ @Mock
+ VMTemplateDao _templateDao;
+ @Mock
+ VolumeDao _volsDao;
+ @Mock
+ RestoreVMCmd _restoreVMCmd;
+ @Mock
+ AccountVO _accountMock;
+ @Mock
+ UserVO _userMock;
+ @Mock
+ UserVmVO _vmMock;
+ @Mock
+ VMInstanceVO _vmInstance;
+ @Mock
+ HostVO _host;
+ @Mock
+ VMTemplateVO _templateMock;
+ @Mock
+ VolumeVO _volumeMock;
+ @Mock
+ List<VolumeVO> _rootVols;
+ @Mock
+ ItWorkVO _work;
+ @Before
+ public void setup(){
+ MockitoAnnotations.initMocks(this);
+
+ _vmMgr._templateDao = _templateDao;
+ _vmMgr._volsDao = _volsDao;
+ _vmMgr.volumeMgr = _storageMgr;
+ _vmMgr._accountDao = _accountDao;
+ _vmMgr._userDao = _userDao;
+ _vmMgr._accountMgr = _accountMgr;
+ _vmMgr._configMgr = _configMgr;
+ _vmMgr._capacityMgr = _capacityMgr;
+ _vmMgr._hostDao = _hostDao;
+ _vmMgr._nodeId = 1L;
+ _vmMgr._workDao = _workDao;
+ _vmMgr._agentMgr = _agentMgr;
+
+ when(_vmMock.getId()).thenReturn(314l);
+ when(_vmInstance.getId()).thenReturn(1L);
+ when(_vmInstance.getServiceOfferingId()).thenReturn(2L);
+ when(_vmInstance.getInstanceName()).thenReturn("myVm");
+ when(_vmInstance.getHostId()).thenReturn(2L);
+ when(_vmInstance.getType()).thenReturn(VirtualMachine.Type.User);
+ when(_host.getId()).thenReturn(1L);
+ when(_hostDao.findById(anyLong())).thenReturn(null);
+ when(_configMgr.getServiceOffering(anyLong())).thenReturn(getSvcoffering(512));
+ when(_workDao.persist(_work)).thenReturn(_work);
+ when(_workDao.update("1", _work)).thenReturn(true);
+ when(_work.getId()).thenReturn("1");
+ doNothing().when(_work).setStep(ItWorkVO.Step.Done);
+ //doNothing().when(_volsDao).detachVolume(anyLong());
+ //when(_work.setStep(ItWorkVO.Step.Done)).thenReturn("1");
+
+ }
+
+
+ @Test(expected=CloudRuntimeException.class)
+ public void testScaleVM1() throws Exception {
+
+
+ DeployDestination dest = new DeployDestination(null, null, null, _host);
+ long l = 1L;
+
+ when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
+ _vmMgr.migrateForScale(_vmInstance, l, dest, l);
+
+ }
+
+ @Test (expected=CloudRuntimeException.class)
+ public void testScaleVM2() throws Exception {
+
+ DeployDestination dest = new DeployDestination(null, null, null, _host);
+ long l = 1L;
+
+ when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
+ ServiceOfferingVO newServiceOffering = getSvcoffering(512);
+ ScaleVmCommand reconfigureCmd = new ScaleVmCommand("myVmName", newServiceOffering.getCpu(),
+ newServiceOffering.getSpeed(), newServiceOffering.getRamSize(), newServiceOffering.getRamSize(), newServiceOffering.getLimitCpuUse());
+ Answer answer = new ScaleVmAnswer(reconfigureCmd, true, "details");
+ when(_agentMgr.send(2l, reconfigureCmd)).thenReturn(null);
+ _vmMgr.reConfigureVm(_vmInstance, getSvcoffering(256), false);
+
+ }
+
+ @Test (expected=CloudRuntimeException.class)
+ public void testScaleVM3() throws Exception {
+
+ /*VirtualMachineProfile<VMInstanceVO> profile = new VirtualMachineProfileImpl<VMInstanceVO>(vm);
+
+ Long srcHostId = vm.getHostId();
+ Long oldSvcOfferingId = vm.getServiceOfferingId();
+ if (srcHostId == null) {
+ throw new CloudRuntimeException("Unable to scale the vm because it doesn't have a host id");
+ }*/
+
+ when(_vmInstance.getHostId()).thenReturn(null);
+ when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
+ _vmMgr.findHostAndMigrate(VirtualMachine.Type.User, _vmInstance, 2l);
+
+ }
+
+
+ private ServiceOfferingVO getSvcoffering(int ramSize){
+
+ long id = 4L;
+ String name = "name";
+ String displayText = "displayText";
+ int cpu = 1;
+ //int ramSize = 256;
+ int speed = 128;
+
+ boolean ha = false;
+ boolean useLocalStorage = false;
+
+ ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, ha, displayText, useLocalStorage, false, null, false, null, false);
+ return serviceOffering;
+ }
+
+
+}
[44/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-452: cloudstack UI - Infrastructure menu - zone detail - guest network - add guest network - validation - Either IPv4 fields or IPv6 fields need to be filled when adding a guest network.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e806ff67
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e806ff67
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e806ff67
Branch: refs/heads/scaleupvm
Commit: e806ff674397b90e7b8c99ed3cca64f0c2af1922
Parents: 26b892d
Author: Jessica Wang <je...@citrix.com>
Authored: Tue Mar 26 16:35:10 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Tue Mar 26 16:35:42 2013 -0700
----------------------------------------------------------------------
ui/scripts/system.js | 61 ++++++++++++---------------------------------
1 files changed, 16 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e806ff67/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index c0a5d14..830d622 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1350,42 +1350,7 @@
var $form = $(this).closest("form");
var selectedNetworkOfferingId = $(this).val();
$(networkOfferingObjs).each(function(){
- if(this.id == selectedNetworkOfferingId) {
- if(this.guestiptype == "Isolated") { //*** Isolated ***
- if(this.specifyipranges == false) {
- $form.find('.form-item[rel=startipv4]').hide();
- $form.find('.form-item[rel=endipv4]').hide();
- }
- else {
- $form.find('.form-item[rel=startipv4]').css('display', 'inline-block');
- $form.find('.form-item[rel=endipv4]').css('display', 'inline-block');
- }
-
- var includingSourceNat = false;
- var serviceObjArray = this.service;
- for(var k = 0; k < serviceObjArray.length; k++) {
- if(serviceObjArray[k].name == "SourceNat") {
- includingSourceNat = true;
- break;
- }
- }
- if(includingSourceNat == true) { //Isolated with SourceNat
- cloudStack.dialog.createFormField.validation.required.remove($form.find('.form-item[rel=ip4gateway]')); //make ip4gateway optional
- cloudStack.dialog.createFormField.validation.required.remove($form.find('.form-item[rel=ip4Netmask]')); //make ip4Netmask optional
- }
- else { //Isolated with no SourceNat
- cloudStack.dialog.createFormField.validation.required.add($form.find('.form-item[rel=ip4gateway]')); //make ip4gateway required
- cloudStack.dialog.createFormField.validation.required.add($form.find('.form-item[rel=ip4Netmask]')); //make ip4Netmask required
- }
- }
- else { //*** Shared ***
- $form.find('.form-item[rel=startipv4]').css('display', 'inline-block');
- $form.find('.form-item[rel=endipv4]').css('display', 'inline-block');
-
- cloudStack.dialog.createFormField.validation.required.add($form.find('.form-item[rel=ip4gateway]')); //make ip4gateway required
- cloudStack.dialog.createFormField.validation.required.add($form.find('.form-item[rel=ip4Netmask]')); //make ip4Netmask required
- }
-
+ if(this.id == selectedNetworkOfferingId) {
if(this.specifyvlan == false) {
$form.find('.form-item[rel=vlanId]').hide();
cloudStack.dialog.createFormField.validation.required.remove($form.find('.form-item[rel=vlanId]')); //make vlanId optional
@@ -1411,13 +1376,11 @@
docID: 'helpGuestNetworkZoneNetmask'
},
startipv4: {
- label: 'IPv4 Start IP',
- validation: { required: true },
+ label: 'IPv4 Start IP',
docID: 'helpGuestNetworkZoneStartIP'
},
endipv4: {
- label: 'IPv4 End IP',
- validation: { required: true },
+ label: 'IPv4 End IP',
docID: 'helpGuestNetworkZoneEndIP'
},
//IPv4 (end)
@@ -1431,13 +1394,11 @@
label: 'IPv6 CIDR'
},
startipv6: {
- label: 'IPv6 Start IP',
- validation: { required: true },
+ label: 'IPv6 Start IP',
docID: 'helpGuestNetworkZoneStartIP'
},
endipv6: {
- label: 'IPv6 End IP',
- validation: { required: true },
+ label: 'IPv6 End IP',
docID: 'helpGuestNetworkZoneEndIP'
},
//IPv6 (end)
@@ -1449,7 +1410,17 @@
}
},
- action: function(args) { //Add guest network in advanced zone
+ action: function(args) { //Add guest network in advanced zone
+ if (
+ ((args.data.ip4gateway.length == 0) && (args.data.ip4Netmask.length == 0) && (args.data.startipv4.length == 0) && (args.data.endipv4.length == 0))
+ &&
+ ((args.data.ip6gateway.length == 0) && (args.data.ip6cidr.length == 0) && (args.data.startipv6.length == 0) && (args.data.endipv6.length == 0))
+ )
+ {
+ args.response.error("Either IPv4 fields or IPv6 fields need to be filled when adding a guest network");
+ return;
+ }
+
var $form = args.$form;
var array1 = [];
[31/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1724:ZWPS: provision to add scope of the primary storage in the zone creation wizard
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/09d76fe0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/09d76fe0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/09d76fe0
Branch: refs/heads/scaleupvm
Commit: 09d76fe0095e79f2234ab097285f843d98352fb9
Parents: 933f121
Author: Pranav Saxena <pr...@citrix.com>
Authored: Tue Mar 26 21:09:11 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Tue Mar 26 21:09:11 2013 +0530
----------------------------------------------------------------------
ui/scripts/zoneWizard.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09d76fe0/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 01dcaaf..753b038 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -3262,7 +3262,7 @@
array1.push("&podId=" + args.data.returnedPod.id);
array1.push("&clusterid=" + args.data.returnedCluster.id);
array1.push("&name=" + todb(args.data.primaryStorage.name));
- array1.push("&scope=" +todb(args.data.primaryStorage.scope));
+ array1.push("&scope=" + todb(args.data.primaryStorage.scope));
var server = args.data.primaryStorage.server;
var url = null;
[20/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1736: Changes required to get cloudstack-management service
working again.
The newly created package for cloudstack-management was not correctly
installing the service. This prevented cloud-setup-management from being
able to configure the service, and the init script didn't even believe
the service was installed. I also added sudo to the chmod command for
checking script permissions, as most scripts belong to root. It was
trying to configure the agent with cloudstack-setup-agent but the script
was still called cloud-setup-agent, so I renamed it to cloudstack-setup-agent.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ae3a0483
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ae3a0483
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ae3a0483
Branch: refs/heads/scaleupvm
Commit: ae3a04835096f3e2f8dd659a33ac46348e46b670
Parents: 8eb3ebb
Author: Brian Spindler <da...@gmail.com>
Authored: Mon Mar 25 07:47:30 2013 -0700
Committer: Chip Childers <ch...@gmail.com>
Committed: Mon Mar 25 17:23:18 2013 +0000
----------------------------------------------------------------------
debian/cloudstack-agent.install | 4 +-
debian/cloudstack-management.install | 2 +
debian/cloudstack-management.postinst | 19 +++++++++++++-
debian/rules | 9 ++++--
packaging/debian/init/cloud-management | 8 +++---
packaging/debian/replace.properties | 2 +-
.../com/cloud/server/ConfigurationServerImpl.java | 2 +-
7 files changed, 33 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/cloudstack-agent.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-agent.install b/debian/cloudstack-agent.install
index b142571..0250185 100644
--- a/debian/cloudstack-agent.install
+++ b/debian/cloudstack-agent.install
@@ -19,8 +19,8 @@
/etc/cloudstack/agent/environment.properties
/etc/cloudstack/agent/log4j-cloud.xml
/etc/init.d/cloudstack-agent
-/usr/bin/cloud-setup-agent
+/usr/bin/cloudstack-setup-agent
/usr/bin/cloud-ssh
/var/log/cloudstack/agent
/usr/share/cloudstack-agent/lib/*
-/usr/share/cloudstack-agent/plugins
\ No newline at end of file
+/usr/share/cloudstack-agent/plugins
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/cloudstack-management.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.install b/debian/cloudstack-management.install
index cecc311..e80701d 100644
--- a/debian/cloudstack-management.install
+++ b/debian/cloudstack-management.install
@@ -31,3 +31,5 @@
/usr/bin/cloud-setup-databases
/usr/bin/cloud-migrate-databases
/usr/share/cloudstack-management/*
+/usr/share/java/*
+/usr/share/tomcat6/lib/*
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/cloudstack-management.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst
index 7b6a1ed..4e9b046 100644
--- a/debian/cloudstack-management.postinst
+++ b/debian/cloudstack-management.postinst
@@ -22,5 +22,20 @@ if [ "$1" = configure ]; then
else
usermod -m -d /var/lib/cloudstack/management cloud
fi
- chown cloud /var/log/cloudstack/management
-fi
\ No newline at end of file
+
+ for i in /var/cache/cloudstack/management \
+ /var/cache/cloudstack/management/work \
+ /var/cache/cloudstack/management/temp \
+ /var/log/cloudstack/management \
+ /etc/cloudstack/management/Catalina \
+ /etc/cloudstack/management/Catalina/localhost \
+ /var/lib/cloudstack/management \
+ /etc/cloudstack/management/Catalina/localhost/client
+ do
+ chmod 0770 $i
+ chgrp cloud $i
+ done
+
+ chmod 0640 /etc/cloudstack/management/db.properties
+ chgrp cloud /etc/cloudstack/management/db.properties
+fi
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index 613d76a..3804d8d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -68,7 +68,7 @@ install:
install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
install -D packaging/debian/init/cloud-agent $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-agent
- install -D agent/bindir/cloud-setup-agent.in $(DESTDIR)/usr/bin/cloud-setup-agent
+ install -D agent/bindir/cloud-setup-agent.in $(DESTDIR)/usr/bin/cloudstack-setup-agent
install -D agent/bindir/cloud-ssh.in $(DESTDIR)/usr/bin/cloud-ssh
install -D agent/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
@@ -99,12 +99,15 @@ install:
ln -s tomcat6-nonssl.conf $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/tomcat6.conf
mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/Catalina/localhost/client
+ mkdir -p ${DESTDIR}/usr/share/tomcat6/lib
+ mkdir -p ${DESTDIR}/usr/share/java
install -D packaging/debian/init/cloud-management $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-management
install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloud-update-xenserver-licenses
- install -D server/target/cloud-server-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/$(PACKAGE)-server.jar
+ install -D server/target/cloud-server-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/java/$(PACKAGE)-server.jar
ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin
ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf
- ln -s /usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
+ ln -s ../../../usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
+ ln -s ../../java/$(PACKAGE)-server.jar $(DESTDIR)/usr/share/tomcat6/lib/$(PACKAGE)-server.jar
ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs
ln -s ../../../var/cache/$(PACKAGE)/management/temp $(DESTDIR)/usr/share/$(PACKAGE)-management/temp
ln -s ../../../var/cache/$(PACKAGE)/management/work $(DESTDIR)/usr/share/$(PACKAGE)-management/work
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/packaging/debian/init/cloud-management
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management
index 490bf1e..69a0428 100755
--- a/packaging/debian/init/cloud-management
+++ b/packaging/debian/init/cloud-management
@@ -31,11 +31,11 @@
### END INIT INFO
PATH=/bin:/usr/bin:/sbin:/usr/sbin
-NAME=cloud-management
+NAME=cloudstack-management
DESC="CloudStack-specific Tomcat servlet engine"
DAEMON=/usr/bin/jsvc
-CATALINA_HOME=/usr/share/cloud/management
-DEFAULT=/etc/cloud/management/tomcat6.conf
+CATALINA_HOME=/usr/share/cloudstack/management
+DEFAULT=/etc/cloudstack/management/tomcat6.conf
JVM_TMP=/tmp/$NAME-temp
# We have to explicitly set the HOME variable to the homedir from the user "cloud"
@@ -76,7 +76,7 @@ done
export JAVA_HOME
# Directory for per-instance configuration files and webapps
-CATALINA_BASE=/usr/share/cloud/management
+CATALINA_BASE=/usr/share/cloudstack/management
# Use the Java security manager? (yes/no)
TOMCAT6_SECURITY=no
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/packaging/debian/replace.properties
----------------------------------------------------------------------
diff --git a/packaging/debian/replace.properties b/packaging/debian/replace.properties
index fee1def..8705c78 100644
--- a/packaging/debian/replace.properties
+++ b/packaging/debian/replace.properties
@@ -59,4 +59,4 @@ SYSTEMJARS=
USAGECLASSPATH=
USAGELOG=/var/log/cloudstack/usage
USAGESYSCONFDIR=/etc/cloudstack/usage
-PACKAGE=cloud
+PACKAGE=cloudstack
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae3a0483/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 3b0ec0f..53df3b9 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -709,7 +709,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
if(!file.canExecute()) {
s_logger.info("Some of the shell script files may not have executable bit set. Fixup...");
- String cmd = "chmod ugo+x " + scriptPath;
+ String cmd = "sudo chmod ugo+x " + scriptPath;
s_logger.info("Executing " + cmd);
String result = Script.runSimpleBashScript(cmd);
if (result != null) {
[46/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
All slashes were being removed from the storage path which caused adding the pool to break.
Reviewed-by: Edison Su<su...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/99bcfd24
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/99bcfd24
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/99bcfd24
Branch: refs/heads/scaleupvm
Commit: 99bcfd24c70d751d0222944d15a468a6017fb660
Parents: 5df32e6
Author: Brian Spindler <da...@gmail.com>
Authored: Mon Mar 25 13:20:27 2013 -0700
Committer: Edison Su <su...@gmail.com>
Committed: Tue Mar 26 17:36:29 2013 -0700
----------------------------------------------------------------------
.../CloudStackPrimaryDataStoreLifeCycleImpl.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99bcfd24/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
index 2991574..b8b0859 100644
--- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
+++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
@@ -204,7 +204,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements
String hostPath = uri.getPath();
Object localStorage = dsInfos.get("localStorage");
if (localStorage != null) {
- hostPath = hostPath.replace("/", "");
+ hostPath = hostPath.replaceFirst("/", "");
}
String userInfo = uri.getUserInfo();
int port = uri.getPort();
[23/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - when switching to another region, handle a case that the region's end point is not "http://hostname:port/client/"
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ac18b9b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ac18b9b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ac18b9b0
Branch: refs/heads/scaleupvm
Commit: ac18b9b0f7f11ce2a061ce9b15feb356b4dcf4cf
Parents: 16250f8
Author: Jessica Wang <je...@citrix.com>
Authored: Mon Mar 25 15:30:01 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Mon Mar 25 15:30:32 2013 -0700
----------------------------------------------------------------------
ui/scripts/cloud.core.callbacks.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac18b9b0/ui/scripts/cloud.core.callbacks.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloud.core.callbacks.js b/ui/scripts/cloud.core.callbacks.js
index 6384f9b..1a9e045 100644
--- a/ui/scripts/cloud.core.callbacks.js
+++ b/ui/scripts/cloud.core.callbacks.js
@@ -59,7 +59,7 @@ $(document).ready(function() {
*/
if ($.urlParam('loginUrl') != 0) {
$.cookie('loginUrl', $.urlParam('loginUrl'), { expires: 1});
- document.location.href = '/client/';
+ document.location.href = window.location.href.substring(0, window.location.href.indexOf('?'));
}
/*
[14/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Fix the kvm vncAddr test
This test was broken because we reverted to the old listen on all
interfaces for vnc.
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/4f091383
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f091383
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f091383
Branch: refs/heads/scaleupvm
Commit: 4f091383642d76ef466d3487abce10f95bf8bd2c
Parents: 057a6f5
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Sat Mar 23 20:59:29 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Sat Mar 23 20:59:29 2013 +0530
----------------------------------------------------------------------
.../kvm/resource/LibvirtComputingResourceTest.java | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f091383/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
index 018f2f5..39e36d6 100644
--- a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
+++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
@@ -19,13 +19,13 @@
package com.cloud.hypervisor.kvm.resource;
-import org.junit.Test;
import com.cloud.agent.api.to.VirtualMachineTO;
-import com.cloud.hypervisor.kvm.resource.LibvirtVMDef;
import com.cloud.template.VirtualMachineTemplate.BootloaderType;
import com.cloud.vm.VirtualMachine;
-import com.cloud.vm.VirtualMachine.Type;
+import org.junit.Test;
+
import java.util.Random;
+
import static org.junit.Assert.assertEquals;
public class LibvirtComputingResourceTest {
@@ -54,7 +54,7 @@ public class LibvirtComputingResourceTest {
boolean haEnabled = false;
boolean limitCpuUse = false;
- String vncAddr = "1.2.3.4";
+ String vncAddr = "";
String vncPassword = "mySuperSecretPassword";
LibvirtComputingResource lcr = new LibvirtComputingResource();
@@ -79,7 +79,7 @@ public class LibvirtComputingResourceTest {
vmStr += "<serial type='pty'>\n";
vmStr += "<target port='0'/>\n";
vmStr += "</serial>\n";
- vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "'/>\n";
+ vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "' />\n";
vmStr += "<console type='pty'>\n";
vmStr += "<target port='0'/>\n";
vmStr += "</console>\n";
@@ -129,7 +129,7 @@ public class LibvirtComputingResourceTest {
boolean haEnabled = false;
boolean limitCpuUse = false;
- String vncAddr = "1.2.3.4";
+ String vncAddr = "";
String vncPassword = "mySuperSecretPassword";
LibvirtComputingResource lcr = new LibvirtComputingResource();
@@ -154,7 +154,7 @@ public class LibvirtComputingResourceTest {
vmStr += "<serial type='pty'>\n";
vmStr += "<target port='0'/>\n";
vmStr += "</serial>\n";
- vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "'/>\n";
+ vmStr += "<graphics type='vnc' autoport='yes' listen='" + vncAddr + "' />\n";
vmStr += "<console type='pty'>\n";
vmStr += "<target port='0'/>\n";
vmStr += "</console>\n";
[40/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
another URL correction and also fixing a mis-matched para tag that I committed previously. Oops.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/718fae43
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/718fae43
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/718fae43
Branch: refs/heads/scaleupvm
Commit: 718fae43a980c765e451b6b3f8006000fac1175e
Parents: 736d4b9
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 12:49:41 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 12:50:13 2013 -0500
----------------------------------------------------------------------
docs/en-US/getting-release.xml | 1 -
.../en-US/guest-nw-usage-with-traffic-sentinel.xml | 7 +++----
2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/718fae43/docs/en-US/getting-release.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/getting-release.xml b/docs/en-US/getting-release.xml
index a64e532..ee08a94 100644
--- a/docs/en-US/getting-release.xml
+++ b/docs/en-US/getting-release.xml
@@ -30,7 +30,6 @@
Apache CloudStack project download page</ulink>.
</para>
<para>Prior releases are available via archive.apache.org as well. See the downloads page for more information on archived releases.</para>
- </para>
<para>You'll notice several links under the 'Latest release' section. A link to a file ending in <filename>tar.bz2</filename>, as well as a PGP/GPG signature, MD5, and SHA512 file.</para>
<itemizedlist>
<listitem><para>The <filename>tar.bz2</filename> file contains the Bzip2-compressed tarball with the source code.</para></listitem>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/718fae43/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml b/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml
index eb42d64..d6fc10b 100644
--- a/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml
+++ b/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml
@@ -54,12 +54,11 @@
addTrafficMonitor. Pass in the URL of the Traffic Sentinel as protocol + host + port
(optional); for example, http://10.147.28.100:8080. For the addTrafficMonitor command
syntax, see the API Reference at <ulink
- url="http://incubator.apache.org/cloudstack/docs/api/index.html">API
+ url="http://cloudstack.apache.org/docs/api/index.html">API
Documentation</ulink>.</para>
<para>For information about how to call the &PRODUCT; API, see the Developer’s Guide at
- <ulink
- url="http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/API_Developers_Guide/index.html"
- >CloudStack API Developer's Guide</ulink>.</para>
+ <ulink url="http://cloudstack.apache.org/docs/en-US/index.html">
+ &PRODUCT; API Developer's Guide</ulink>.</para>
</listitem>
<listitem>
<para>Log in to the &PRODUCT; UI as administrator.</para>
[37/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Regions UI: Change loading state text to 'Loading...'
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d6e8701c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d6e8701c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d6e8701c
Branch: refs/heads/scaleupvm
Commit: d6e8701caeef728ce096f02b2ea89ae415141e80
Parents: fedef61
Author: Brian Federle <br...@citrix.com>
Authored: Tue Mar 26 10:18:56 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Tue Mar 26 10:19:02 2013 -0700
----------------------------------------------------------------------
ui/scripts/ui-custom/login.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d6e8701c/ui/scripts/ui-custom/login.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js
index 783a170..7a3b887 100644
--- a/ui/scripts/ui-custom/login.js
+++ b/ui/scripts/ui-custom/login.js
@@ -136,7 +136,7 @@
$('<span>').html(
// _l is not set yet, so localize directly to dictionary
// [should fix in future]
- dictionary['message.redirecting.region']
+ dictionary['label.loading'] + '...'
)
));
}
[08/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
List view UI: fix blank actions column
Fixes issue where blank actions column will show if there
are header actions, but no standard actions
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e86f8115
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e86f8115
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e86f8115
Branch: refs/heads/scaleupvm
Commit: e86f81152f6be723a1d8d7b486264c8ced8bc1ac
Parents: ff6177d
Author: Brian Federle <br...@citrix.com>
Authored: Fri Mar 22 10:28:09 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Fri Mar 22 10:28:09 2013 -0700
----------------------------------------------------------------------
ui/scripts/ui/widgets/listView.js | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e86f8115/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index 76ce526..bb3a424 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -648,7 +648,21 @@
}
// Actions column
- if (actions && renderActionCol(actions)) {
+ var actionsArray = $.map(actions, function(v, k) {
+ if (k == 'add') {
+ v.isAdd = true;
+ }
+
+ return v;
+ });
+ var headerActionsArray = $.grep(
+ actionsArray,
+ function(action) {
+ return action.isHeader || action.isAdd;
+ }
+ );
+
+ if (actions && renderActionCol(actions) && actionsArray.length != headerActionsArray.length) {
$thead.find('tr').append(
$('<th></th>')
.html(_l('label.actions'))
@@ -1014,7 +1028,21 @@
$tr.data('jsonObj', dataItem);
$tr.data('list-view-action-filter', options.actionFilter);
- if (actions && renderActionCol(actions)) {
+ var actionsArray = $.map(actions, function(v, k) {
+ if (k == 'add') {
+ v.isAdd = true;
+ }
+
+ return v;
+ });
+ var headerActionsArray = $.grep(
+ actionsArray,
+ function(action) {
+ return action.isHeader || action.isAdd;
+ }
+ );
+
+ if (actions && renderActionCol(actions) && actionsArray.length != headerActionsArray.length) {
var allowedActions = $.map(actions, function(value, key) {
return key;
});
[32/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
fixing incubator references in api-reference.xml and aws-ec2-user-setup.xml. Note I used the git repo URL for 4.1 rather than HEAD on master in the git URL.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a283dc25
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a283dc25
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a283dc25
Branch: refs/heads/scaleupvm
Commit: a283dc25474c795a35c4c2a16c0b1f7ea1d90613
Parents: 582f8a0
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 10:53:10 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 10:54:24 2013 -0500
----------------------------------------------------------------------
docs/en-US/api-reference.xml | 2 +-
docs/en-US/aws-ec2-user-setup.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a283dc25/docs/en-US/api-reference.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/api-reference.xml b/docs/en-US/api-reference.xml
index 983e76f..9a1acc1 100644
--- a/docs/en-US/api-reference.xml
+++ b/docs/en-US/api-reference.xml
@@ -19,6 +19,6 @@
<section id="api-reference">
<title>API Reference Documentation</title>
<para>You can find all the API reference documentation at the below site:</para>
- <para><ulink url="http://incubator.apache.org/cloudstack/docs/api/">http://incubator.apache.org/cloudstack/docs/api/</ulink></para>
+ <para><ulink url="http://cloudstack.apache.org/docs/api/">http://cloudstack.apache.org/docs/api/</ulink></para>
</section>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a283dc25/docs/en-US/aws-ec2-user-setup.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/aws-ec2-user-setup.xml b/docs/en-US/aws-ec2-user-setup.xml
index f41eaa1..a2d8918 100644
--- a/docs/en-US/aws-ec2-user-setup.xml
+++ b/docs/en-US/aws-ec2-user-setup.xml
@@ -66,7 +66,7 @@
cloudstack-aws-api-register. If you do not have the source then download the script using the following command.
</para>
<para>
- <programlisting>wget -O cloudstack-aws-api-register <ulink url="https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=blob_plain;f=awsapi-setup/setup/cloudstack-aws-api-register;hb=HEAD">"https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=blob_plain;f=awsapi-setup/setup/cloudstack-aws-api-register;hb=HEAD"</ulink>
+ <programlisting>wget -O cloudstack-aws-api-register <ulink url="https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob_plain;f=awsapi-setup/setup/cloudstack-aws-api-register;hb=4.1">"https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob_plain;f=awsapi-setup/setup/cloudstack-aws-api-register;hb=4.1"</ulink>
</programlisting>
</para>
<para> Then execute it, using the access and secret keys that were obtained in step <xref linkend="obtain-access-secret-keys"/>. An example is shown below.</para>
[12/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Apache CloudStack has graduated.
Fixing the links in the pom.xml
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/23d301ff
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/23d301ff
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/23d301ff
Branch: refs/heads/scaleupvm
Commit: 23d301ffd81fbfeba93ad22a18f979ce60f03e77
Parents: 8ecdbd8
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Sat Mar 23 20:26:48 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Sat Mar 23 20:26:48 2013 +0530
----------------------------------------------------------------------
pom.xml | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/23d301ff/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1faafb2..d10f536 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,8 +26,8 @@
<description>Apache CloudStack is an IaaS (“Infrastracture as a Service”) cloud orchestration platform.</description>
<url>http://www.cloudstack.org</url>
<scm>
- <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git</connection>
- <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git</developerConnection>
+ <connection>scm:git:https://git-wip-us.apache.org/repos/asf/cloudstack.git</connection>
+ <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/cloudstack.git</developerConnection>
</scm>
<issueManagement>
<system>jira</system>
@@ -99,40 +99,43 @@
<mailingLists>
<mailingList>
<name>Apache CloudStack User List</name>
- <subscribe>cloudstack-users-subscribe@incubator.apache.org</subscribe>
- <unsubscribe>cloudstack-users-unsubscribe@incubator.apache.org</unsubscribe>
- <post>cloudstack-users@incubator.apache.org</post>
- <archive>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-users</archive>
+ <subscribe>users-subscribe@cloudstack.apache.org</subscribe>
+ <unsubscribe>users-unsubscribe@cloudstack.apache.org</unsubscribe>
+ <post>users@cloudstack.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cloudstack-users</archive>
+ <otherArchives>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-users</otherArchives>
</mailingList>
<mailingList>
<name>Apache CloudStack Developer List</name>
- <subscribe>cloudstack-dev-subscribe@incubator.apache.org</subscribe>
- <unsubscribe>cloudstack-dev-unsubscribe@incubator.apache.org</unsubscribe>
- <post>cloudstack-dev@incubator.apache.org</post>
- <archive>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-dev</archive>
+ <subscribe>dev-subscribe@cloudstack.apache.org</subscribe>
+ <unsubscribe>dev-unsubscribe@cloudstack.apache.org</unsubscribe>
+ <post>dev@cloudstack.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cloudstack-dev</archive>
+ <otherArchives>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-dev</otherArchives>
</mailingList>
<mailingList>
<name>Apache CloudStack Commits List</name>
- <subscribe>cloudstack-commits-subscribe@incubator.apache.org</subscribe>
- <unsubscribe>cloudstack-commits-unsubscribe@incubator.apache.org</unsubscribe>
- <post>cloudstack-commits@incubator.apache.org</post>
- <archive>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-commits</archive>
+ <subscribe>commits-subscribe@cloudstack.apache.org</subscribe>
+ <unsubscribe>commits-unsubscribe@cloudstack.apache.org</unsubscribe>
+ <post>commits@cloudstack.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cloudstack-commits</archive>
+ <otherArchives>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-commits</otherArchives>
</mailingList>
</mailingLists>
<developers>
<developer>
<name>The Apache CloudStack Team</name>
- <email>cloudstack-dev@incubator.apache.org</email>
- <url>http://incubator.apache.org/projects/cloudstack.html</url>
+ <email>dev@cloudstack.apache.org</email>
+ <url>http://cloudstack.apache.org/</url>
<organization>Apache Software Foundation</organization>
<organizationUrl>http://apache.org/</organizationUrl>
</developer>
</developers>
<ciManagement>
- <system>Jenkin</system>
- <url>http://jenkins.cloudstack.org/</url>
+ <system>Jenkins</system>
+ <url>http://builds.apache.org/</url>
</ciManagement>
<licenses>
[07/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1761 - Available local storage disk capacity incorrectly reported in
KVM to manager. This adds collection of available storage to KVM, not
just used.
Bugfix-for: 4.0.2, 4.1, master
Submitted-by: Ted Smith <da...@gmail.com>
Signed-off-by: Marcus Sorensen <ma...@betterservers.com> 1363966235 -0600
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ff6177d1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ff6177d1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ff6177d1
Branch: refs/heads/scaleupvm
Commit: ff6177d119bb49e90fa325ca51f4eec217bae915
Parents: c305e3c
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Fri Mar 22 09:30:35 2013 -0600
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Fri Mar 22 09:30:35 2013 -0600
----------------------------------------------------------------------
.../kvm/resource/LibvirtComputingResource.java | 2 +-
.../hypervisor/kvm/storage/KVMStoragePool.java | 2 ++
.../kvm/storage/LibvirtStorageAdaptor.java | 2 ++
.../hypervisor/kvm/storage/LibvirtStoragePool.java | 10 ++++++++++
4 files changed, 15 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff6177d1/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 604bd00..f786f88 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
@@ -3559,7 +3559,7 @@ ServerResource {
localStoragePool.getUuid(), cmd.getPrivateIpAddress(),
_localStoragePath, _localStoragePath,
StoragePoolType.Filesystem, localStoragePool.getCapacity(),
- localStoragePool.getUsed());
+ localStoragePool.getAvailable());
sscmd = new StartupStorageCommand();
sscmd.setPoolInfo(pi);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff6177d1/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePool.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePool.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePool.java
index 5437e7c..d32a6fd 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePool.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePool.java
@@ -39,6 +39,8 @@ public interface KVMStoragePool {
public long getUsed();
+ public long getAvailable();
+
public boolean refresh();
public boolean isExternalSnapshot();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff6177d1/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
index d5e6ad6..ca5da5c 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
@@ -351,6 +351,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
pool.refresh();
pool.setCapacity(storage.getInfo().capacity);
pool.setUsed(storage.getInfo().allocation);
+ pool.setAvailable(storage.getInfo().available);
return pool;
} catch (LibvirtException e) {
@@ -483,6 +484,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
pool.setCapacity(sp.getInfo().capacity);
pool.setUsed(sp.getInfo().allocation);
+ pool.setAvailable(sp.getInfo().available);
return pool;
} catch (LibvirtException e) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff6177d1/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
index 32f8ce9..1396097 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
@@ -28,6 +28,7 @@ public class LibvirtStoragePool implements KVMStoragePool {
protected String uri;
protected long capacity;
protected long used;
+ protected long available;
protected String name;
protected String localPath;
protected PhysicalDiskFormat defaultFormat;
@@ -48,6 +49,7 @@ public class LibvirtStoragePool implements KVMStoragePool {
this._storageAdaptor = adaptor;
this.capacity = 0;
this.used = 0;
+ this.available = 0;
this._pool = pool;
}
@@ -65,11 +67,19 @@ public class LibvirtStoragePool implements KVMStoragePool {
this.used = used;
}
+ public void setAvailable(long available) {
+ this.available = available;
+ }
+
@Override
public long getUsed() {
return this.used;
}
+ public long getAvailable() {
+ return this.available;
+ }
+
public StoragePoolType getStoragePoolType() {
return this.type;
}
[34/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
fixed git URL in building-with-maven-steps.xml
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1a4f0b9a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1a4f0b9a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1a4f0b9a
Branch: refs/heads/scaleupvm
Commit: 1a4f0b9acff156b5dd6da522934008841b69c57b
Parents: 7cc5a2e
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 11:58:02 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 11:58:42 2013 -0500
----------------------------------------------------------------------
docs/en-US/building-with-maven-steps.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1a4f0b9a/docs/en-US/building-with-maven-steps.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/building-with-maven-steps.xml b/docs/en-US/building-with-maven-steps.xml
index 319654f..1c15bfa 100644
--- a/docs/en-US/building-with-maven-steps.xml
+++ b/docs/en-US/building-with-maven-steps.xml
@@ -25,7 +25,7 @@
<section id="building-with-maven-steps">
<title>Building Steps</title>
<para>&PRODUCT; uses git for source version control, first make sure you have the source code by pulling it:</para>
- <programlisting>git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git</programlisting>
+ <programlisting>git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git</programlisting>
<para>Several Project Object Models (POM) are defined to deal with the various build targets of &PRODUCT;. Certain features require some packages that are not compatible with the Apache license and therefore need to be downloaded on your own. Check the wiki for additional information <ulink url="https://cwiki.apache.org/CLOUDSTACK/building-with-maven.html">https://cwiki.apache.org/CLOUDSTACK/building-with-maven.html</ulink>. In order to build all the open source targets of &PRODUCT; do:</para>
<para><programlisting>mvn clean install</programlisting></para>
<para>The resulting jar files will be in the target directory of the subdirectory of the compiled module.</para>
[36/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Changed URL for downloads to reflect graduation in configure-package-repository.xml
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fedef61c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fedef61c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fedef61c
Branch: refs/heads/scaleupvm
Commit: fedef61c559b05dc6a3902709722c34c0be1b808
Parents: fa25f68
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 12:17:09 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 12:17:45 2013 -0500
----------------------------------------------------------------------
docs/en-US/configure-package-repository.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fedef61c/docs/en-US/configure-package-repository.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/configure-package-repository.xml b/docs/en-US/configure-package-repository.xml
index 9ef2307..3d102c6 100644
--- a/docs/en-US/configure-package-repository.xml
+++ b/docs/en-US/configure-package-repository.xml
@@ -34,7 +34,7 @@
in the sections for <xref linkend="sect-source-buildrpm" /> or
<xref linkend="sect-source-builddebs" /> you may find pre-built
DEB and RPM packages for your convience linked from the
- <ulink url="http://incubator.apache.org/cloudstack/downloads.html">downloads</ulink>
+ <ulink url="http://cloudstack.apache.org/downloads.html">downloads</ulink>
page.
</para>
<note>
[24/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1642: Add support CentOS 6.4
Fix the test string to match against "CentOS 6.x"
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6ade5da2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6ade5da2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6ade5da2
Branch: refs/heads/scaleupvm
Commit: 6ade5da25f8f265611f5b959f4e763ae3f070155
Parents: ac18b9b
Author: Hiroaki KAWAI <ka...@stratosphere.co.jp>
Authored: Tue Mar 26 13:16:37 2013 +0900
Committer: Hiroaki KAWAI <ka...@stratosphere.co.jp>
Committed: Tue Mar 26 13:16:37 2013 +0900
----------------------------------------------------------------------
python/lib/cloudutils/utilities.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ade5da2/python/lib/cloudutils/utilities.py
----------------------------------------------------------------------
diff --git a/python/lib/cloudutils/utilities.py b/python/lib/cloudutils/utilities.py
index 739a483..f7f25f4 100755
--- a/python/lib/cloudutils/utilities.py
+++ b/python/lib/cloudutils/utilities.py
@@ -110,7 +110,7 @@ class Distribution:
self.distro = "Fedora"
elif os.path.exists("/etc/redhat-release"):
version = file("/etc/redhat-release").readline()
- if version.find("Red Hat Enterprise Linux Server release 6") != -1 or version.find("Scientific Linux release 6") != -1 or version.find("CentOS Linux release 6") != -1 or version.find("CentOS release 6.2") != -1 or version.find("CentOS release 6.3") != -1:
+ if version.find("Red Hat Enterprise Linux Server release 6") != -1 or version.find("Scientific Linux release 6") != -1 or version.find("CentOS Linux release 6") != -1 or version.find("CentOS release 6.") != -1:
self.distro = "RHEL6"
elif version.find("CentOS release") != -1:
self.distro = "CentOS"
[47/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1788: remember, changing componentcontext.xml also needs to
change nooss, they are not in inheritance relationship any more.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/359b9319
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/359b9319
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/359b9319
Branch: refs/heads/scaleupvm
Commit: 359b93199338ec99cc8d4176f68d895a7d63bd24
Parents: 99bcfd2
Author: Edison Su <su...@gmail.com>
Authored: Tue Mar 26 17:51:21 2013 -0700
Committer: Edison Su <su...@gmail.com>
Committed: Tue Mar 26 17:51:21 2013 -0700
----------------------------------------------------------------------
client/tomcatconf/nonossComponentContext.xml.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/359b9319/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in
index 8f8dae5..1cc1722 100644
--- a/client/tomcatconf/nonossComponentContext.xml.in
+++ b/client/tomcatconf/nonossComponentContext.xml.in
@@ -326,6 +326,9 @@
<property name="name" value="HypervisorPlannerSelector"/>
</bean>
+ <bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl">
+ </bean>
+
<!--
DAO with customized configuration
-->
[35/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
fixing git URL in cloudmonkey.xml to new location.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fa25f68b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fa25f68b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fa25f68b
Branch: refs/heads/scaleupvm
Commit: fa25f68b06c7816ee6331d04dcb9a99b8fe09ae3
Parents: 1a4f0b9
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 12:08:39 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 12:09:14 2013 -0500
----------------------------------------------------------------------
docs/en-US/cloudmonkey.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fa25f68b/docs/en-US/cloudmonkey.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/cloudmonkey.xml b/docs/en-US/cloudmonkey.xml
index 5665ed4..be4d17c 100644
--- a/docs/en-US/cloudmonkey.xml
+++ b/docs/en-US/cloudmonkey.xml
@@ -24,7 +24,7 @@
<section id="cloudmonkey">
<title>CloudMonkey</title>
- <para>CloudMonkey is the &PRODUCT; Command Line Interface (CLI). It is written in Python. CloudMonkey can be used both as an interactive shell and as a command line tool which simplifies &PRODUCT; configuration and management. It can be used with &PRODUCT; CloudStack 4.0-incubating and above</para>
+ <para>CloudMonkey is the &PRODUCT; Command Line Interface (CLI). It is written in Python. CloudMonkey can be used both as an interactive shell and as a command line tool which simplifies &PRODUCT; configuration and management. It can be used with &PRODUCT; releases since the 4.0.x branch.</para>
<warning>
<para>CloudMonkey is still under development and should be considered a Work In Progress (WIP), the wiki is the most up to date documentation:</para>
<para><ulink url="https://cwiki.apache.org/CLOUDSTACK/cloudstack-cloudmonkey-cli.html">https://cwiki.apache.org/CLOUDSTACK/cloudstack-cloudmonkey-cli.html</ulink></para>
@@ -40,7 +40,7 @@
<para>Via the official Apache &PRODUCT; releases as well as the git repository.</para>
<programlisting>
<![CDATA[
-$ git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git # (optional if using a release download)
+$ git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git # (optional if using a release download)
$ mvn clean install -P developer
$ cd tools/cli # cloudmonkey-x.x.x.tar.gz will be built in dist
$ python setup.py build
[25/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
cli: Make cloudmonkey use new url and dev ml
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ccba1c72
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ccba1c72
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ccba1c72
Branch: refs/heads/scaleupvm
Commit: ccba1c728ca8f73e66f5731037dcb72ad8629c38
Parents: 6ade5da
Author: Rohit Yadav <bh...@apache.org>
Authored: Tue Mar 26 11:25:26 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Tue Mar 26 11:25:26 2013 +0530
----------------------------------------------------------------------
tools/cli/cloudmonkey/config.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ccba1c72/tools/cli/cloudmonkey/config.py
----------------------------------------------------------------------
diff --git a/tools/cli/cloudmonkey/config.py b/tools/cli/cloudmonkey/config.py
index 4a4aa99..75605df 100644
--- a/tools/cli/cloudmonkey/config.py
+++ b/tools/cli/cloudmonkey/config.py
@@ -23,8 +23,8 @@ __description__ = "Command Line Interface for Apache CloudStack"
__maintainer__ = "Rohit Yadav"
__maintaineremail__ = "bhaisaab@apache.org"
__project__ = "The Apache CloudStack Team"
-__projectemail__ = "cloudstack-dev@incubator.apache.org"
-__projecturl__ = "http://incubator.apache.org/cloudstack"
+__projectemail__ = "dev@cloudstack.apache.org"
+__projecturl__ = "http://cloudstack.apache.org"
try:
import os
[04/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-815. Docs. Add new documentation for Regions. This feature currently is available through the API only.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a0257bc5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a0257bc5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a0257bc5
Branch: refs/heads/scaleupvm
Commit: a0257bc533803c4211585ae3cfa2954f573dfc85
Parents: ff63854
Author: Jessica Tomechak <je...@gmail.com>
Authored: Fri Mar 22 05:42:24 2013 -0700
Committer: Jessica Tomechak <je...@gmail.com>
Committed: Fri Mar 22 05:49:04 2013 -0700
----------------------------------------------------------------------
docs/en-US/about-regions.xml | 49 ++++++++
docs/en-US/about-zones.xml | 10 ++-
docs/en-US/added-API-commands-4-1.xml | 7 +-
docs/en-US/changed-apicommands-4.1.xml | 16 +++-
docs/en-US/cloud-infrastructure-concepts.xml | 3 +-
docs/en-US/images/region-overview.png | Bin 0 -> 22835 bytes
docs/en-US/provisioning-steps-overview.xml | 13 +-
docs/en-US/provisioning-steps.xml | 3 +-
docs/en-US/region-add.xml | 128 +++++++++++++++++++++
9 files changed, 216 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/about-regions.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/about-regions.xml b/docs/en-US/about-regions.xml
new file mode 100644
index 0000000..432faeb
--- /dev/null
+++ b/docs/en-US/about-regions.xml
@@ -0,0 +1,49 @@
+<?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="about-regions">
+ <title>About Regions</title>
+ <para>To increase reliability of the cloud, you can optionally group resources into multiple geographic regions.
+ A region is the largest available organizational unit within a &PRODUCT; deployment.
+ A region is made up of several availability zones, where each zone is roughly equivalent to a datacenter.
+ Each region is controlled by its own cluster of Management Servers, running in one of the zones.
+ The zones in a region are typically located in close geographical proximity.
+ Regions are a useful technique for providing fault tolerance and disaster recovery.</para>
+ <para>By grouping zones into regions, the cloud can achieve higher availability and scalability.
+ User accounts can span regions, so that users can deploy VMs in multiple, widely-dispersed regions.
+ Even if one of the regions becomes unavailable, the services are still available to the end-user through VMs deployed in another region.
+ And by grouping communities of zones under their own nearby Management Servers, the latency of communications within the cloud is reduced
+ compared to managing widely-dispersed zones from a single central Management Server.
+ </para>
+ <para>
+ Usage records can also be consolidated and tracked at the region level, creating reports or invoices for each geographic region.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="./images/region-overview.png" />
+ </imageobject>
+ <textobject><phrase>region-overview.png: Nested structure of a region.</phrase></textobject>
+ </mediaobject>
+ <para>Regions are visible to the end user. When a user starts a guest VM, the user must select a region for their guest.
+ Users might also be required to copy their private templates to additional regions to enable creation of guest VMs using their templates in those regions.</para>
+ </section>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/about-zones.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/about-zones.xml b/docs/en-US/about-zones.xml
index 5385df0..8f6cd06 100644
--- a/docs/en-US/about-zones.xml
+++ b/docs/en-US/about-zones.xml
@@ -23,7 +23,12 @@
-->
<section id="about-zones">
<title>About Zones</title>
- <para>A zone is the largest organizational unit within a &PRODUCT; deployment. A zone typically corresponds to a single datacenter, although it is permissible to have multiple zones in a datacenter. The benefit of organizing infrastructure into zones is to provide physical isolation and redundancy. For example, each zone can have its own power supply and network uplink, and the zones can be widely separated geographically (though this is not required).</para>
+ <para>A zone is the second largest organizational unit within a &PRODUCT; deployment. A zone
+ typically corresponds to a single datacenter, although it is permissible to have multiple
+ zones in a datacenter. The benefit of organizing infrastructure into zones is to provide
+ physical isolation and redundancy. For example, each zone can have its own power supply and
+ network uplink, and the zones can be widely separated geographically (though this is not
+ required).</para>
<para>A zone consists of:</para>
<itemizedlist>
<listitem><para>One or more pods. Each pod contains one or more clusters of hosts and one or more primary storage servers.</para></listitem>
@@ -46,5 +51,6 @@
<listitem><para>How many primary storage servers to place in each cluster and total capacity for the storage servers.</para></listitem>
<listitem><para>How much secondary storage to deploy in a zone.</para></listitem>
</itemizedlist>
- <para>When you add a new zone, you will be prompted to configure the zone’s physical network and add the first pod, cluster, host, primary storage, and secondary storage.</para>
+ <para>When you add a new zone using the &PRODUCT; UI, you will be prompted to configure the zone’s physical network
+ and add the first pod, cluster, host, primary storage, and secondary storage.</para>
</section>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/added-API-commands-4-1.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/added-API-commands-4-1.xml b/docs/en-US/added-API-commands-4-1.xml
index aa5529e..0beb104 100644
--- a/docs/en-US/added-API-commands-4-1.xml
+++ b/docs/en-US/added-API-commands-4-1.xml
@@ -19,7 +19,7 @@
under the License.
-->
<section id="added-API-commands-4.1">
- <title>Added API Commands in 4.1-incubating</title>
+ <title>Added API Commands in 4.1</title>
<itemizedlist>
<listitem>
<para>createEgressFirewallRules (creates an egress firewall rule on the guest network.)</para>
@@ -65,5 +65,10 @@
<para>getUser (This API can only be used by the Admin. Get user details by using the API Key.)
</para>
</listitem>
+ <listitem><para>addRegion (Add a region)</para></listitem>
+ <listitem><para>removeRegion (Delete a region)</para></listitem>
+ <listitem><para>updateRegion (Modify attributes of a region)</para></listitem>
+ <listitem><para>listRegions (List regions)</para></listitem>
+ <listitem><para></para></listitem>
</itemizedlist>
</section>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/changed-apicommands-4.1.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/changed-apicommands-4.1.xml b/docs/en-US/changed-apicommands-4.1.xml
index 13553fd..1667aaf 100644
--- a/docs/en-US/changed-apicommands-4.1.xml
+++ b/docs/en-US/changed-apicommands-4.1.xml
@@ -19,7 +19,7 @@
under the License.
-->
<section id="changed-apicommands-4.1">
- <title>Changed API Commands in 4.1-incubating</title>
+ <title>Changed API Commands in 4.1</title>
<informaltable>
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1.0*" colname="1" colnum="1"/>
@@ -232,9 +232,21 @@
<para>listZones</para>
</entry>
<entry>
- <para>The following request parameters is added: securitygroupenabled</para>
+ <para>The following request parameter is added: securitygroupenabled</para>
</entry>
</row>
+ <row>
+ <entry><para>createAccount</para></entry>
+ <entry><para>The following new request parameters are added: accountid, userid</para></entry>
+ </row>
+ <row>
+ <entry><para>createUser</para></entry>
+ <entry><para>The following new request parameter is added: userid</para></entry>
+ </row>
+ <row>
+ <entry><para>createDomain</para></entry>
+ <entry><para>The following new request parameter is added: domainid</para></entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/cloud-infrastructure-concepts.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/cloud-infrastructure-concepts.xml b/docs/en-US/cloud-infrastructure-concepts.xml
index 7a7098a..2ba228a 100644
--- a/docs/en-US/cloud-infrastructure-concepts.xml
+++ b/docs/en-US/cloud-infrastructure-concepts.xml
@@ -23,7 +23,8 @@
-->
<chapter id="cloud-infrastructure-concepts">
- <title>Cloud Infrastructure Concepts</title>
+ <title>Cloud Infrastructure Concepts</title>
+ <xi:include href="about-regions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="about-zones.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="about-pods.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="about-clusters.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/images/region-overview.png
----------------------------------------------------------------------
diff --git a/docs/en-US/images/region-overview.png b/docs/en-US/images/region-overview.png
new file mode 100644
index 0000000..528445c
Binary files /dev/null and b/docs/en-US/images/region-overview.png differ
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/provisioning-steps-overview.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/provisioning-steps-overview.xml b/docs/en-US/provisioning-steps-overview.xml
index daf2cfc..5fb6196 100644
--- a/docs/en-US/provisioning-steps-overview.xml
+++ b/docs/en-US/provisioning-steps-overview.xml
@@ -26,12 +26,13 @@
<para>After the Management Server is installed and running, you can add the compute resources for it to manage. For an overview of how a &PRODUCT; cloud infrastructure is organized, see <xref linkend="cloud-infrastructure-overview" />.</para>
<para>To provision the cloud infrastructure, or to scale it up at any time, follow these procedures:</para>
<orderedlist>
- <listitem><para>Add a zone. See <xref linkend="zone-add" />.</para></listitem>
- <listitem><para>Add more pods (optional). See <xref linkend="pod-add" />.</para></listitem>
- <listitem><para>Add more clusters (optional). See <xref linkend="cluster-add" />.</para></listitem>
- <listitem><para>Add more hosts (optional). See <xref linkend="host-add" />.</para></listitem>
- <listitem><para>Add primary storage. See <xref linkend="primary-storage-add" />.</para></listitem>
- <listitem><para>Add secondary storage. See <xref linkend="secondary-storage-add" />.</para></listitem>
+ <listitem><para>Define regions (optional). See <xref linkend="region-add"/>.</para></listitem>
+ <listitem><para>Add a zone to the region. See <xref linkend="zone-add" />.</para></listitem>
+ <listitem><para>Add more pods to the zone (optional). See <xref linkend="pod-add" />.</para></listitem>
+ <listitem><para>Add more clusters to the pod (optional). See <xref linkend="cluster-add" />.</para></listitem>
+ <listitem><para>Add more hosts to the cluster (optional). See <xref linkend="host-add" />.</para></listitem>
+ <listitem><para>Add primary storage to the cluster. See <xref linkend="primary-storage-add" />.</para></listitem>
+ <listitem><para>Add secondary storage to the zone. See <xref linkend="secondary-storage-add" />.</para></listitem>
<listitem><para>Initialize and test the new cloud. See <xref linkend="initialize-and-test" />.</para></listitem>
</orderedlist>
<para>When you have finished these steps, you will have a deployment with the following basic structure:</para>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/provisioning-steps.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/provisioning-steps.xml b/docs/en-US/provisioning-steps.xml
index 8777b02..04ece13 100644
--- a/docs/en-US/provisioning-steps.xml
+++ b/docs/en-US/provisioning-steps.xml
@@ -23,8 +23,9 @@
-->
<chapter id="provisioning-steps">
<title>Steps to Provisioning Your Cloud Infrastructure</title>
- <para>This section tells how to add zones, pods, clusters, hosts, storage, and networks to your cloud. If you are unfamiliar with these entities, please begin by looking through <xref linkend="cloud-infrastructure-concepts" />.</para>
+ <para>This section tells how to add regions, zones, pods, clusters, hosts, storage, and networks to your cloud. If you are unfamiliar with these entities, please begin by looking through <xref linkend="cloud-infrastructure-concepts" />.</para>
<xi:include href="provisioning-steps-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="region-add.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="zone-add.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="pod-add.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="cluster-add.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0257bc5/docs/en-US/region-add.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/region-add.xml b/docs/en-US/region-add.xml
new file mode 100644
index 0000000..a891994
--- /dev/null
+++ b/docs/en-US/region-add.xml
@@ -0,0 +1,128 @@
+<?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="region-add">
+ <title>Adding Regions (optional)</title>
+ <para>Grouping your cloud resources into geographic regions is an optional step when provisioning the cloud.
+ For an overview of regions, see <xref linkend="about-regions"/>.</para>
+ <section id="region-first">
+ <title>The First Region: The Default Region</title>
+ <para>If you do not take action to define regions, then all the zones in your cloud will be
+ automatically grouped into a single default region. This region is assigned the region
+ ID of 1.</para>
+ <para>You can change the name or URL of the default region by using the API command updateRegion. For example:</para>
+ <programlisting>http://<IP_of_Management_Server>:8080/client/api?command=updateRegion&id=1&name=Northern&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
+ </section>
+ <section id="region-add-2">
+ <title>Adding a Region</title>
+ <para>Use these steps to add a second region in addition to the default region.</para>
+ <orderedlist>
+ <listitem><para>Each region has its own &PRODUCT; instance. Therefore, the first step of creating a new region
+ is to install the Management Server software, on one or more nodes, in the
+ geographic area where you want to set up the new region. Use the steps in the
+ Installation guide. When you come to the step where you set up the database, use
+ the additional command-line flag <code>-r <region_id></code> to set a
+ region ID for the new region. The default region is automatically assigned a
+ region ID of 1, so your first additional region might be region 2.</para>
+ <programlisting>cloud-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<password> -e <encryption_type> -m <management_server_key> -k <database_key> -r <region_id></programlisting>
+ </listitem>
+ <listitem><para>By the end of the installation procedure, the Management Server should have been started. Be sure that the Management Server installation was successful and complete.</para></listitem>
+ <listitem><para>Add region 2 to region 1. Use the API command addRegion. (For information about how to make an API call, see the Developer's Guide.)</para>
+ <programlisting>http://<IP_of_region_1_Management_Server>:8080/client/api?command=addRegion&id=2&name=Western&endpoint=http://<region_2_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
+ </listitem>
+ <listitem><para>Now perform the same command in reverse, adding region 1 to region 2.</para>
+ <programlisting>http://<IP_of_region_2_Management_Server>:8080/client/api?command=addRegion&id=2&name=Western&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
+ </listitem>
+ <listitem><para>Copy the account, user, and domain tables from the region 1 database to the region 2 database.</para>
+ <para>In the following commands, it is assumed that you have set the root password on the
+ database, which is a &PRODUCT; recommended best practice. Substitute your own MySQL
+ root password.</para>
+ <orderedlist numeration="loweralpha">
+ <listitem><para>First, run this command to copy the contents of the database:</para>
+ <programlisting># mysqldump -u root -p<mysql_password> -h <region1_db_host> cloud account user domain > region1.sql</programlisting>
+ </listitem>
+ <listitem><para>Then run this command to put the data onto the region 2 database:</para>
+ <programlisting># mysql -u root -p<mysql_password> -h <region2_db_host> cloud < region1.sql</programlisting>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ <listitem><para>Remove project accounts. Run these commands on the region 2 database:</para>
+ <programlisting>mysql> delete from account where type = 5;</programlisting>
+ </listitem>
+ <listitem><para>Set the default zone as null:</para>
+ <programlisting>mysql> update account set default_zone_id = null;</programlisting>
+ </listitem>
+ <listitem><para>Restart the Management Servers in region 2.</para></listitem>
+ </orderedlist>
+ </section>
+ <section id="region-add-n">
+ <title>Adding Third and Subsequent Regions</title>
+ <para>To add the third region, and subsequent additional regions, the steps are similar to those for adding the second region.
+ However, you must repeat certain steps additional times for each additional region:</para>
+ <orderedlist>
+ <listitem><para>Install &PRODUCT; in each additional region. Set the region ID for each region during the database setup step.</para>
+ <programlisting>cloud-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<password> -e <encryption_type> -m <management_server_key> -k <database_key> -r <region_id></programlisting></listitem>
+ <listitem><para>Once the Management Server is running, add your new region to all existing regions by
+ repeatedly calling the API command addRegion. For example, if you were adding
+ region 3:</para>
+ <programlisting>http://<IP_of_region_1_Management_Server>:8080/client/api?command=addRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D
+
+http://<IP_of_region_2_Management_Server>:8080/client/api?command=addRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting></listitem>
+ <listitem><para>Repeat the procedure in reverse to add all existing regions to the new region. For example,
+ for the third region, add the other two existing regions:</para>
+ <programlisting>http://<IP_of_region_3_Management_Server>:8080/client/api?command=addRegion&id=1&name=Northern&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D
+
+http://<IP_of_region_3_Management_Server>:8080/client/api?command=addRegion&id=2&name=Western&endpoint=http://<region_2_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting></listitem>
+ <listitem><para>Copy the account, user, and domain tables from any existing region's database to the new
+ region's database.</para>
+ <para>In the following commands, it is assumed that you have set the root password on the
+ database, which is a &PRODUCT; recommended best practice. Substitute your own MySQL
+ root password.</para>
+ <orderedlist numeration="loweralpha">
+ <listitem><para>First, run this command to copy the contents of the database:</para>
+ <programlisting># mysqldump -u root -p<mysql_password> -h <region1_db_host> cloud account user domain > region1.sql</programlisting>
+ </listitem>
+ <listitem><para>Then run this command to put the data onto the new region's database. For example, for region
+ 3:</para>
+ <programlisting># mysql -u root -p<mysql_password> -h <region3_db_host> cloud < region1.sql</programlisting>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ <listitem><para>Remove project accounts. Run these commands on the region 2 database:</para>
+ <programlisting>mysql> delete from account where type = 5;</programlisting>
+ </listitem>
+ <listitem><para>Set the default zone as null:</para>
+ <programlisting>mysql> update account set default_zone_id = null;</programlisting>
+ </listitem>
+ <listitem><para>Restart the Management Servers in the new region.</para></listitem>
+ </orderedlist>
+ </section>
+ <section id="region-delete">
+ <title>Deleting a Region</title>
+ <para>To delete a region, use the API command removeRegion. Repeat the call to remove the region from all other regions. For example, to remove the 3rd region in a three-region cloud:</para>
+ <programlisting>http://<IP_of_region_1_Management_Server>:8080/client/api?command=removeRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D
+
+http://<IP_of_region_2_Management_Server>:8080/client/api?command=removeRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D</programlisting>
+ </section>
+</section>
\ No newline at end of file
[26/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Fix top level files to use new git repo, url and MLs
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d13b15d4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d13b15d4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d13b15d4
Branch: refs/heads/scaleupvm
Commit: d13b15d4a235023e325e6c3bdfee95d3af0fadd0
Parents: ccba1c7
Author: Rohit Yadav <bh...@apache.org>
Authored: Tue Mar 26 11:26:24 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Tue Mar 26 11:26:24 2013 +0530
----------------------------------------------------------------------
CHANGES | 2 +-
INSTALL.md | 4 ++--
README.md | 10 ++++++----
README.tools.md | 2 +-
4 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d13b15d4/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index a745a46..a1edfda 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,7 @@
Apache CloudStack (Incubating) CHANGES
======================================
-Full release notes for each release are located in the project's documentation website: http://incubator.apache.org/cloudstack/docs
+Full release notes for each release are located in the project's documentation website: http://cloudstack.apache.org/docs
Version 4.0.0-incubating
------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d13b15d4/INSTALL.md
----------------------------------------------------------------------
diff --git a/INSTALL.md b/INSTALL.md
index a2137fd..4f93900 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,7 +1,7 @@
This document describes how to develop, build, package and install Apache CloudStack
(Incubating). For more information please refer to the project's website:
- http://incubator.apache.org/cloudstack
+ http://cloudstack.apache.org
Apache CloudStack developers use various platforms for development, this guide
was tested against a CentOS 6.2 x86_64 setup.
@@ -77,7 +77,7 @@ Start the MySQL service:
You may get the source code from the repository hosted on Apache:
- $ git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git
+ $ git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git
Or, you may fork a repository from the official Apache CloudStack mirror by
Apache on [Github](https://github.com/apache/incubator-cloudstack)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d13b15d4/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 7b4d973..7fb9b57 100644
--- a/README.md
+++ b/README.md
@@ -17,12 +17,14 @@ Apache CloudStack offers three methods for managing cloud
computing environments: an easy to use Web interface, command
line tools, and a full-featured RESTful API.
-Visit us at [cloudstack.org](http://incubator.apache.org/cloudstack).
+Visit us at [Apache CloudStack](http://cloudstack.apache.org).
## Mailing lists
-[Development Mailing List](mailto:cloudstack-dev-subscribe@incubator.apache.org)
-[Users Mailing list](mailto:cloudstack-users-subscribe@incubator.apache.org)
-[Commits mailing list](mailto:cloudstack-commits-subscribe@incubator.apache.org)
+[Development Mailing List](mailto:dev-subscribe@cloudstack.apache.org)
+[Users Mailing List](mailto:users-subscribe@cloudstack.apache.org)
+[Commits Mailing List](mailto:commits-subscribe@cloudstack.apache.org)
+[Issues Mailing List](mailto:issues-subscribe@cloudstack.apache.org)
+[Marketing Mailing List](mailto:marketing-subscribe@cloudstack.apache.org)
# License
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d13b15d4/README.tools.md
----------------------------------------------------------------------
diff --git a/README.tools.md b/README.tools.md
index f743c89..069c342 100644
--- a/README.tools.md
+++ b/README.tools.md
@@ -61,7 +61,7 @@ Once installed per the Vagrant installation process, run:
$ vagrant box add devcloud [path to devcloud.box]
Then, either go into the devcloudbox folder of your checked out version of the
-CloudStack code (incubator-cloudstack/tools/devcloud/devcloudbox), or copy the
+CloudStack code (cloudstack/tools/devcloud/devcloudbox), or copy the
contents of that folder to another location.
Assuming the patched Vagrant installation is working, you then
[27/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
appliance: While building systemvms fetch src tarball from new git repo
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b3a3ad74
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b3a3ad74
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b3a3ad74
Branch: refs/heads/scaleupvm
Commit: b3a3ad74c6015304881598b5b4ba3a51c912d834
Parents: d13b15d
Author: Rohit Yadav <bh...@apache.org>
Authored: Tue Mar 26 11:26:50 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Tue Mar 26 11:26:50 2013 +0530
----------------------------------------------------------------------
.../definitions/systemvmtemplate/postinstall.sh | 4 ++--
.../definitions/systemvmtemplate64/postinstall.sh | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b3a3ad74/tools/appliance/definitions/systemvmtemplate/postinstall.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
index 8e745eb..5d529de 100644
--- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh
+++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
@@ -168,8 +168,8 @@ configure_services() {
mkdir -p /var/lib/haproxy
# Get config files from master
- snapshot_url="https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=snapshot;h=HEAD;sf=tgz"
- snapshot_dir="/opt/incubator-cloudstack*"
+ snapshot_url="https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=snapshot;h=HEAD;sf=tgz"
+ snapshot_dir="/opt/cloudstack*"
cd /opt
wget $snapshot_url -O cloudstack.tar.gz
tar -zxvf cloudstack.tar.gz
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b3a3ad74/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate64/postinstall.sh b/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
index 8e745eb..5d529de 100644
--- a/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
+++ b/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
@@ -168,8 +168,8 @@ configure_services() {
mkdir -p /var/lib/haproxy
# Get config files from master
- snapshot_url="https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=snapshot;h=HEAD;sf=tgz"
- snapshot_dir="/opt/incubator-cloudstack*"
+ snapshot_url="https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=snapshot;h=HEAD;sf=tgz"
+ snapshot_dir="/opt/cloudstack*"
cd /opt
wget $snapshot_url -O cloudstack.tar.gz
tar -zxvf cloudstack.tar.gz
[18/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
rat: Ignore all veewee definition files
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/74bd7d57
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/74bd7d57
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/74bd7d57
Branch: refs/heads/scaleupvm
Commit: 74bd7d570986e4742d0c844481af947802128e9b
Parents: 57c3d4d
Author: Rohit Yadav <bh...@apache.org>
Authored: Mon Mar 25 15:08:21 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Mon Mar 25 15:08:21 2013 +0530
----------------------------------------------------------------------
pom.xml | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/74bd7d57/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ee07bfd..dab3db2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -340,16 +340,9 @@
<exclude>dist/console-proxy/js/jquery.js</exclude>
<exclude>scripts/vm/systemvm/id_rsa.cloud</exclude>
<exclude>tools/devcloud/basebuild/puppet-devcloudinitial/files/network.conf</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate/base.sh</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate/cleanup.sh</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate/definition.rb</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate/preseed.cfg</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate/zerodisk.sh</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate64/base.sh</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate64/cleanup.sh</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate64/definition.rb</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate64/preseed.cfg</exclude>
- <exclude>tools/appliance/definitions/systemvmtemplate64/zerodisk.sh</exclude>
+ <exclude>tools/appliance/definitions/devcloud/*</exclude>
+ <exclude>tools/appliance/definitions/systemvmtemplate/*</exclude>
+ <exclude>tools/appliance/definitions/systemvmtemplate64/*</exclude>
<exclude>tools/cli/cloudmonkey.egg-info/*</exclude>
<exclude>tools/devcloud/src/deps/boxes/basebox-build/definition.rb</exclude>
<exclude>tools/devcloud/src/deps/boxes/basebox-build/preseed.cfg</exclude>
[02/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1252: Failed to download default template in VMware
Proposing to modify package.sh script. Package as per OSS or NONOSS arguments.
Now package.sh will act based on the below usage i.e. with or without
arguments:
./package.sh -h
usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]
oss|OSS To package OSS specific
nonoss|NONOSS To package NONOSS specific
Examples: ./package.sh -p|--pack oss|OSS
./package.sh -p|--pack nonoss|NONOSS
./package.sh (Default OSS)
Signed-off-by: Pradeep <pr...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/01ea7232
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/01ea7232
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/01ea7232
Branch: refs/heads/scaleupvm
Commit: 01ea7232d9a7e956277f03c8471d8d4e2b60d699
Parents: 1c845d4
Author: Pradeep <pr...@citrix.com>
Authored: Fri Mar 22 16:11:51 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Fri Mar 22 16:14:07 2013 +0530
----------------------------------------------------------------------
packaging/centos63/cloud.spec | 9 ++-
packaging/centos63/package.sh | 140 ++++++++++++++++++++++++++++++-----
2 files changed, 128 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/01ea7232/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 16c3602..9b10a67 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -165,7 +165,14 @@ echo Doing CloudStack build
cp packaging/centos63/replace.properties build/replace.properties
echo VERSION=%{_maventag} >> build/replace.properties
echo PACKAGE=%{name} >> build/replace.properties
-mvn -P awsapi package -Dsystemvm
+
+if [ "%{_ossnoss}" == "NONOSS" -o "%{_ossnoss}" == "nonoss" ] ; then
+ echo "Packaging nonoss components"
+ mvn -Pawsapi,systemvm -Dnonoss package
+else
+ echo "Packaging oss components"
+ mvn -Pawsapi package -Dsystemvm
+fi
%install
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/01ea7232/packaging/centos63/package.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh
index 2515ecb..802cf7e 100755
--- a/packaging/centos63/package.sh
+++ b/packaging/centos63/package.sh
@@ -16,30 +16,130 @@
# specific language governing permissions and limitations
# under the License.
-CWD=`pwd`
-RPMDIR=$CWD/../../dist/rpmbuild
-PACK_PROJECT=cloudstack
+function usage() {
+ echo ""
+ echo "usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]"
+ echo ""
+ echo "oss|OSS To package oss components only"
+ echo "nonoss|NONOSS To package non-oss and oss components"
+ echo ""
+ echo "Examples: ./package.sh -p|--pack oss|OSS"
+ echo " ./package.sh -p|--pack nonoss|NONOSS"
+ echo " ./package.sh (Default OSS)"
+ echo ""
+ exit 1
+}
+function defaultPackaging() {
+ CWD=`pwd`
+ RPMDIR=$CWD/../../dist/rpmbuild
+ PACK_PROJECT=cloudstack
+ VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'`
-VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'`
-if echo $VERSION | grep SNAPSHOT ; then
- REALVER=`echo $VERSION | cut -d '-' -f 1`
- DEFVER="-D_ver $REALVER"
- DEFPRE="-D_prerelease 1"
- DEFREL="-D_rel SNAPSHOT"
-else
- DEFVER="-D_ver $REALVER"
- DEFPRE=
- DEFREL=
-fi
+ if echo $VERSION | grep SNAPSHOT ; then
+ REALVER=`echo $VERSION | cut -d '-' -f 1`
+ DEFVER="-D_ver $REALVER"
+ DEFPRE="-D_prerelease 1"
+ DEFREL="-D_rel SNAPSHOT"
+ else
+ DEFVER="-D_ver $REALVER"
+ DEFPRE=
+ DEFREL=
+ fi
+ mkdir -p $RPMDIR/SPECS
+ mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
+
+ (cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x)
+ (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
+
+ cp cloud.spec $RPMDIR/SPECS
+
+ (cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
+
+ exit
+}
+
+function packaging() {
+ CWD=`pwd`
+ RPMDIR=$CWD/../../dist/rpmbuild
+ PACK_PROJECT=cloudstack
+ DEFOSSNOSS="-D_ossnoss $packageval"
+ VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'`
-mkdir -p $RPMDIR/SPECS
-mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
+ if echo $VERSION | grep SNAPSHOT ; then
+ REALVER=`echo $VERSION | cut -d '-' -f 1`
+ DEFVER="-D_ver $REALVER"
+ DEFPRE="-D_prerelease 1"
+ DEFREL="-D_rel SNAPSHOT"
+ else
+ DEFVER="-D_ver $REALVER"
+ DEFPRE=
+ DEFREL=
+ fi
+ mkdir -p $RPMDIR/SPECS
+ mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
-(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
+ (cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
+ (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
-cp cloud.spec $RPMDIR/SPECS
+ cp cloud.spec $RPMDIR/SPECS
-(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
+ (cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" "$DEFOSSNOSS")
+
+ exit
+}
+
+
+if [ $# -lt 1 ] ; then
+ defaultPackaging
+elif [ $# -gt 0 ] ; then
+ SHORTOPTS="hp:"
+ LONGOPTS="help,pack:"
+ ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@" )
+
+ eval set -- "$ARGS"
+
+ while [ $# -gt 0 ] ; do
+ case "$1" in
+ -h | --help)
+ usage
+ exit 0
+ ;;
+ -p | --pack)
+ echo "Packaging Apache CloudStack"
+ packageval=$2
+ if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
+ defaultPackaging
+ elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then
+ packaging
+ else
+ echo "Error: Incorrect usage. See help ./package.sh --help|-h."
+ exit 1
+ fi
+ ;;
+ -)
+ echo "Unrecognized option."
+ usage
+ exit 1
+ ;;
+ --)
+ echo "Unrecognized option."
+ usage
+ exit 1
+ ;;
+ -*)
+ echo "Unrecognized option."
+ usage
+ exit 1
+ ;;
+ *)
+ shift
+ break
+ ;;
+ esac
+ done
+else
+ echo "Incorrect choice. Nothing to do." >&2
+ echo "./package.sh --help for details"
+fi
[19/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Summary: CLOUDSTACK-1565 - Waits for ip to come up before setting default route
Submitted-by: Jayapal Reddy <ja...@citrix.com>
Signed-off-by: Marcus Sorensen <ma...@betterservers.com> 1364226284 -0600
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8eb3ebbe
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8eb3ebbe
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8eb3ebbe
Branch: refs/heads/scaleupvm
Commit: 8eb3ebbe1abc6b33b28c58ff3cd4090dd78da58b
Parents: 74bd7d5
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Mon Mar 25 09:44:44 2013 -0600
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Mon Mar 25 09:46:47 2013 -0600
----------------------------------------------------------------------
.../debian/config/etc/init.d/cloud-early-config | 23 ++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8eb3ebbe/patches/systemvm/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
index 1f0b9a7..2b99c5b 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -390,7 +390,28 @@ setup_common() {
then
ip route add default via $GW dev eth0
else
- ip route add default via $GW dev $3
+ timer=0
+ #default route add fails if we run before interface configured with ip
+ while true
+ do
+ ip=$(ifconfig $3 | grep "inet addr:" | awk '{print $2}' | awk -F: '{print $2}')
+ if [ -z $ip ]
+ then
+ sleep 1;
+ #waiting for the interface to setup with ip
+ echo "waiting for $3 interface setup with ip"
+ else
+ ip route add default via $GW dev $3
+ break
+ fi
+
+ if [ $timer -gt 5 ]
+ then
+ echo "interface $3 is not set up with ip... configuring default route failed"
+ break
+ fi
+ timer=`expr $timer + 1`
+ done
fi
fi
[11/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - allow user to delete region whose end point matches the current URL, but set region button on top menu to blank after the region is deleted.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8ecdbd85
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8ecdbd85
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8ecdbd85
Branch: refs/heads/scaleupvm
Commit: 8ecdbd8537d34a6f44aa5b005cd6ee0bdf02bbcb
Parents: b932059
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Mar 22 12:02:27 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Fri Mar 22 12:02:27 2013 -0700
----------------------------------------------------------------------
ui/scripts/regions.js | 4 +++-
ui/scripts/ui-custom/regions.js | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8ecdbd85/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 14346c8..8839dec 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -136,10 +136,12 @@
region.endpoint == "http://localhost:8080/client/"
document.location.href == "http://localhost:8080/client/#"
*/
+ /*
if(document.location.href.indexOf(region.endpoint) != -1) {
cloudStack.dialog.notice({ message: _l('You can not remove the region that you are currently in.') });
return false;
- }
+ }
+ */
return true;
},
action: function(args) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8ecdbd85/ui/scripts/ui-custom/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/regions.js b/ui/scripts/ui-custom/regions.js
index 4620ea4..17bc86c 100644
--- a/ui/scripts/ui-custom/regions.js
+++ b/ui/scripts/ui-custom/regions.js
@@ -50,7 +50,10 @@
if(currentRegion != null) {
$regionSwitcherButton.find('.title').html(_s(currentRegion.name)).attr('title', _s(currentRegion.name));
- }
+ }
+ else {
+ $regionSwitcherButton.find('.title').html('').attr('title', '');
+ }
}
}
});
[15/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1714/CLOUDSTACK-1715 - updates to install guide sections to fix section title, add information on host global config parameter, and include reference to management lb in admin guide~
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb934e4a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb934e4a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb934e4a
Branch: refs/heads/scaleupvm
Commit: eb934e4ac8b682bf0c77e22649257765b69b7c54
Parents: 4f09138
Author: David Grizzanti <da...@sungard.com>
Authored: Wed Mar 20 11:43:19 2013 -0400
Committer: radhikap <ra...@citrix.com>
Committed: Mon Mar 25 12:03:17 2013 +0530
----------------------------------------------------------------------
.../en-US/management-server-install-multi-node.xml | 3 +--
docs/en-US/management-server-lb.xml | 7 ++++++-
docs/en-US/sys-reliability-and-ha.xml | 1 +
3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb934e4a/docs/en-US/management-server-install-multi-node.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/management-server-install-multi-node.xml b/docs/en-US/management-server-install-multi-node.xml
index 3f011b8..21cf28f 100644
--- a/docs/en-US/management-server-install-multi-node.xml
+++ b/docs/en-US/management-server-install-multi-node.xml
@@ -65,8 +65,7 @@ linkend="sect-source-buildrpm"/> or <xref linkend="sect-source-builddebs"/> as
<para>Repeat these steps on each additional Management Server. </para>
</listitem>
<listitem>
- <para>Be sure to configure a load balancer for the Management Servers. See Management Server
- Load Balancing.</para>
+ <para>Be sure to configure a load balancer for the Management Servers. See <xref linkend="management-server-lb"/>.</para>
</listitem>
</orderedlist>
</section>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb934e4a/docs/en-US/management-server-lb.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/management-server-lb.xml b/docs/en-US/management-server-lb.xml
index 85a8622..9aee154 100644
--- a/docs/en-US/management-server-lb.xml
+++ b/docs/en-US/management-server-lb.xml
@@ -19,7 +19,7 @@
under the License.
-->
<section id="management-server-lb">
- <title>Setting Zone VLAN and Running VM Maximums</title>
+ <title>Management Server Load Balancing</title>
<para>&PRODUCT; can use a load balancer to provide a virtual IP for multiple Management
Servers. The administrator is responsible for creating the load balancer rules for the
Management Servers. The application requires persistence or stickiness across multiple sessions.
@@ -58,4 +58,9 @@
</tbody>
</tgroup>
</informaltable>
+ <para>In addition to above settings, the adminstrator is responsible for setting the 'host' global
+ config value from the management server IP to load balancer virtual IP address.
+ If the 'host' value is not set to the VIP for Port 8250 and one of your management servers crashes,
+ the UI is still available but the system VMs will not be able to contact the management server.
+ </para>
</section>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb934e4a/docs/en-US/sys-reliability-and-ha.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/sys-reliability-and-ha.xml b/docs/en-US/sys-reliability-and-ha.xml
index 3d6ebe1..e3c1cd9 100644
--- a/docs/en-US/sys-reliability-and-ha.xml
+++ b/docs/en-US/sys-reliability-and-ha.xml
@@ -25,6 +25,7 @@
<chapter id="sys-reliability-and-ha">
<title>System Reliability and High Availability</title>
<xi:include href="ha-management-server.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="management-server-lb.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="ha-enabled-vm.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ha-for-hosts.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="primary-storage-outage-and-data-loss.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
[33/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@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/7cc5a2e4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7cc5a2e4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7cc5a2e4
Branch: refs/heads/scaleupvm
Commit: 7cc5a2e45b7db7c86271c6f6d7397931b5f69c4e
Parents: a283dc2 09d76fe
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 10:54:39 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 10:54:39 2013 -0500
----------------------------------------------------------------------
ui/scripts/zoneWizard.js | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
[13/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
minor correction to the otherArchive tag
otherArchive is child of otherArchives.
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/057a6f50
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/057a6f50
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/057a6f50
Branch: refs/heads/scaleupvm
Commit: 057a6f509734644e4c35ba96a8f1def12b7e5486
Parents: 23d301f
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Sat Mar 23 20:36:04 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Sat Mar 23 20:36:04 2013 +0530
----------------------------------------------------------------------
pom.xml | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/057a6f50/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d10f536..ee07bfd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,9 @@
<unsubscribe>users-unsubscribe@cloudstack.apache.org</unsubscribe>
<post>users@cloudstack.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/cloudstack-users</archive>
- <otherArchives>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-users</otherArchives>
+ <otherArchives>
+ <otherArchive>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-users</otherArchive>
+ </otherArchives>
</mailingList>
<mailingList>
<name>Apache CloudStack Developer List</name>
@@ -111,7 +113,9 @@
<unsubscribe>dev-unsubscribe@cloudstack.apache.org</unsubscribe>
<post>dev@cloudstack.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/cloudstack-dev</archive>
- <otherArchives>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-dev</otherArchives>
+ <otherArchives>
+ <otherArchive>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-dev</otherArchive>
+ </otherArchives>
</mailingList>
<mailingList>
<name>Apache CloudStack Commits List</name>
@@ -119,7 +123,9 @@
<unsubscribe>commits-unsubscribe@cloudstack.apache.org</unsubscribe>
<post>commits@cloudstack.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/cloudstack-commits</archive>
- <otherArchives>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-commits</otherArchives>
+ <otherArchives>
+ <otherArchive>http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-commits</otherArchive>
+ </otherArchives>
</mailingList>
</mailingLists>
[42/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
another incubating reference fix.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ba812535
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ba812535
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ba812535
Branch: refs/heads/scaleupvm
Commit: ba812535aa07cbad88962013bcfd1625a359cc3e
Parents: 67034f0
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 15:26:52 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 15:27:29 2013 -0500
----------------------------------------------------------------------
docs/en-US/extracting-source.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba812535/docs/en-US/extracting-source.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/extracting-source.xml b/docs/en-US/extracting-source.xml
index 97a40b6..d169040 100644
--- a/docs/en-US/extracting-source.xml
+++ b/docs/en-US/extracting-source.xml
@@ -27,10 +27,10 @@
<para>
Extracting the &PRODUCT; release is relatively simple and can be done
with a single command as follows:
- <programlisting><prompt>$</prompt> <command>tar</command> -jxvf apache-cloudstack-4.0.0-incubating-src.tar.bz2</programlisting>
+ <programlisting><prompt>$</prompt> <command>tar</command> -jxvf apache-cloudstack-4.1.0.src.tar.bz2</programlisting>
</para>
<para>
You can now move into the directory:
- <programlisting><prompt>$</prompt> <command>cd</command> ./apache-cloudstack-4.0.0-incubating-src</programlisting>
+ <programlisting><prompt>$</prompt> <command>cd</command> ./apache-cloudstack-4.1.0-src</programlisting>
</para>
</section>
[43/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1771: fixed VirtualRouter nics assignment in the Shared networks. Before the fix VR could get a different IP address from the network upon recreation. With the fix the IP address assigned to the first VR in the network, will remain with the network till its entire lifecycle (stored in placeholder nic) and will be assigned to the VR every time it recreates in the network.
Shared networks in both - Advance and Basic - zone types are covered by this checkin
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/26b892da
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/26b892da
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/26b892da
Branch: refs/heads/scaleupvm
Commit: 26b892daf3cdccc2e25711730c7e1efcdec7d2dc
Parents: ba81253
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Mon Mar 25 16:34:04 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Tue Mar 26 13:29:57 2013 -0700
----------------------------------------------------------------------
api/src/com/cloud/network/NetworkModel.java | 2 +
.../network/ExternalFirewallDeviceManagerImpl.java | 48 +++----
.../ExternalLoadBalancerDeviceManagerImpl.java | 42 ++-----
server/src/com/cloud/network/NetworkManager.java | 3 +
.../src/com/cloud/network/NetworkManagerImpl.java | 104 ++++++++++++---
server/src/com/cloud/network/NetworkModelImpl.java | 23 +++-
.../network/element/VpcVirtualRouterElement.java | 4 +-
.../com/cloud/network/guru/DirectNetworkGuru.java | 92 ++++++++++---
.../network/guru/DirectPodBasedNetworkGuru.java | 37 +++++-
.../router/VirtualNetworkApplianceManagerImpl.java | 35 +++--
.../src/com/cloud/upgrade/dao/Upgrade410to420.java | 38 ++++++
server/src/com/cloud/vm/dao/NicDao.java | 3 +
server/src/com/cloud/vm/dao/NicDaoImpl.java | 8 +
.../com/cloud/network/MockNetworkManagerImpl.java | 7 +
.../com/cloud/network/MockNetworkModelImpl.java | 9 +-
.../test/com/cloud/vpc/MockNetworkManagerImpl.java | 13 ++
.../test/com/cloud/vpc/MockNetworkModelImpl.java | 9 +-
17 files changed, 357 insertions(+), 120 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 60e1f7f..916f28a 100644
--- a/api/src/com/cloud/network/NetworkModel.java
+++ b/api/src/com/cloud/network/NetworkModel.java
@@ -259,4 +259,6 @@ public interface NetworkModel {
void checkRequestedIpAddresses(long networkId, String ip4, String ip6) throws InvalidParameterValueException;
String getStartIpv6Address(long id);
+
+ Nic getPlaceholderNic(Network network, Long podId);
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 f6ab778..ae00bf2 100644
--- a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
@@ -25,6 +25,9 @@ import java.util.Map;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
import org.apache.log4j.Logger;
import com.cloud.agent.AgentManager;
@@ -42,7 +45,6 @@ import com.cloud.agent.api.to.FirewallRuleTO;
import com.cloud.agent.api.to.IpAddressTO;
import com.cloud.agent.api.to.PortForwardingRuleTO;
import com.cloud.agent.api.to.StaticNatRuleTO;
-import org.apache.cloudstack.api.ApiConstants;
import com.cloud.configuration.Config;
import com.cloud.configuration.dao.ConfigurationDao;
import com.cloud.dc.DataCenter;
@@ -60,7 +62,6 @@ import com.cloud.host.Host;
import com.cloud.host.HostVO;
import com.cloud.host.dao.HostDao;
import com.cloud.host.dao.HostDetailsDao;
-import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.dao.ExternalFirewallDeviceDao;
import com.cloud.network.dao.ExternalFirewallDeviceVO;
@@ -80,10 +81,10 @@ import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.dao.VpnUserDao;
import com.cloud.network.rules.FirewallRule;
+import com.cloud.network.rules.FirewallRule.Purpose;
import com.cloud.network.rules.FirewallRuleVO;
import com.cloud.network.rules.PortForwardingRule;
import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.FirewallRule.Purpose;
import com.cloud.network.rules.dao.PortForwardingRulesDao;
import com.cloud.offering.NetworkOffering;
import com.cloud.offerings.dao.NetworkOfferingDao;
@@ -92,7 +93,6 @@ import com.cloud.resource.ResourceState;
import com.cloud.resource.ResourceStateAdapter;
import com.cloud.resource.ServerResource;
import com.cloud.resource.UnableDeleteHostException;
-import org.apache.cloudstack.api.response.ExternalFirewallResponse;
import com.cloud.user.Account;
import com.cloud.user.AccountManager;
import com.cloud.user.dao.AccountDao;
@@ -105,9 +105,8 @@ import com.cloud.utils.db.Transaction;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.net.NetUtils;
import com.cloud.utils.net.UrlUtil;
-import com.cloud.vm.Nic.ReservationStrategy;
-import com.cloud.vm.Nic.State;
import com.cloud.vm.NicVO;
+import com.cloud.vm.Nic.ReservationStrategy;
import com.cloud.vm.dao.DomainRouterDao;
import com.cloud.vm.dao.NicDao;
@@ -116,7 +115,8 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
@Inject HostDao _hostDao;
@Inject NetworkServiceMapDao _ntwkSrvcProviderDao;
@Inject DataCenterDao _dcDao;
- @Inject NetworkModel _networkMgr;
+ @Inject NetworkModel _networkModel;
+ @Inject NetworkManager _networkMgr;
@Inject InlineLoadBalancerNicMapDao _inlineLoadBalancerNicMapDao;
@Inject NicDao _nicDao;
@Inject AgentManager _agentMgr;
@@ -428,7 +428,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
IPAddressVO sourceNatIp = null;
if (!sharedSourceNat) {
// Get the source NAT IP address for this account
- List<? extends IpAddress> sourceNatIps = _networkMgr.listPublicIpsAssignedToAccount(network.getAccountId(),
+ List<? extends IpAddress> sourceNatIps = _networkModel.listPublicIpsAssignedToAccount(network.getAccountId(),
zoneId, true);
if (sourceNatIps.size() != 1) {
@@ -455,7 +455,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
}
// Get network rate
- Integer networkRate = _networkMgr.getNetworkRate(network.getId(), null);
+ Integer networkRate = _networkModel.getNetworkRate(network.getId(), null);
IpAddressTO ip = new IpAddressTO(account.getAccountId(), sourceNatIpAddress, add, false, !sharedSourceNat, publicVlanTag, null, null, null, networkRate, false);
IpAddressTO[] ips = new IpAddressTO[1];
@@ -483,7 +483,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
- savePlaceholderNic(network, network.getGateway());
+ _networkMgr.savePlaceholderNic(network, network.getGateway());
}
// Delete any mappings used for inline external load balancers in this network
@@ -499,14 +499,13 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
// on network shutdown, delete placeHolder nics used for the firewall device
if (!add) {
- List<NicVO> guestIps = _nicDao.listByNetworkId(network.getId());
- for (NicVO guestIp : guestIps) {
- // only external firewall and external load balancer will create NicVO with PlaceHolder reservation strategy
- if (guestIp.getReservationStrategy().equals(ReservationStrategy.PlaceHolder) && guestIp.getIp4Address().equals(network.getGateway())) {
- _nicDao.remove(guestIp.getId());
+ List<NicVO> nics = _nicDao.listByNetworkId(network.getId());
+ for (NicVO nic : nics) {
+ if (nic.getReservationStrategy().equals(ReservationStrategy.PlaceHolder) && nic.getIp4Address().equals(network.getGateway())) {
+ s_logger.debug("Removing placeholder nic " + nic + " for the network " + network);
+ _nicDao.remove(nic.getId());
}
}
-
freeFirewallForNetwork(network);
}
@@ -516,6 +515,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
return true;
}
+
@Override
public boolean applyFirewallRules(Network network, List<? extends FirewallRule> rules) throws ResourceUnavailableException {
// Find the external firewall in this zone
@@ -541,7 +541,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
if (rule.getSourceCidrList() == null && (rule.getPurpose() == Purpose.Firewall || rule.getPurpose() == Purpose.NetworkACL)) {
_fwRulesDao.loadSourceCidrs((FirewallRuleVO)rule);
}
- IpAddress sourceIp = _networkMgr.getIp(rule.getSourceIpAddressId());
+ IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
FirewallRuleTO ruleTO = new FirewallRuleTO(rule, null, sourceIp.getAddress().addr());
rulesTO.add(ruleTO);
}
@@ -568,7 +568,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
List<StaticNatRuleTO> staticNatRules = new ArrayList<StaticNatRuleTO>();
for (StaticNat rule : rules) {
- IpAddress sourceIp = _networkMgr.getIp(rule.getSourceIpAddressId());
+ IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
Vlan vlan = _vlanDao.findById(sourceIp.getVlanId());
StaticNatRuleTO ruleTO = new StaticNatRuleTO(0,vlan.getVlanTag(), sourceIp.getAddress().addr(), -1, -1, rule.getDestIpAddress(), -1, -1, "any", rule.isForRevoke(), false);
@@ -632,7 +632,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
}
// Create/delete VPN
- IpAddress ip = _networkMgr.getIp(vpn.getServerAddressId());
+ IpAddress ip = _networkModel.getIp(vpn.getServerAddressId());
// Mask the IP range with the network's VLAN tag
String[] ipRange = vpn.getIpRange().split("-");
@@ -712,14 +712,6 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
return vlanTag - lowestVlanTag;
}
- private NicVO savePlaceholderNic(Network network, String ipAddress) {
- NicVO nic = new NicVO(null, null, network.getId(), null);
- nic.setIp4Address(ipAddress);
- nic.setReservationStrategy(ReservationStrategy.PlaceHolder);
- nic.setState(State.Reserved);
- return _nicDao.persist(nic);
- }
-
public int getGloballyConfiguredCidrSize() {
try {
String globalVlanBits = _configDao.getValue(Config.GuestVlanBits.key());
@@ -771,7 +763,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
List<PortForwardingRuleTO> pfRules = new ArrayList<PortForwardingRuleTO>();
for (PortForwardingRule rule : rules) {
- IpAddress sourceIp = _networkMgr.getIp(rule.getSourceIpAddressId());
+ IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
Vlan vlan = _vlanDao.findById(sourceIp.getVlanId());
PortForwardingRuleTO ruleTO = new PortForwardingRuleTO(rule, vlan.getVlanTag(), sourceIp.getAddress().addr());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 049099d..b2a56fc 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
@@ -26,6 +26,9 @@ import java.util.UUID;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
+import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
import org.apache.log4j.Logger;
import com.cloud.agent.AgentManager;
@@ -41,7 +44,6 @@ import com.cloud.agent.api.routing.LoadBalancerConfigCommand;
import com.cloud.agent.api.routing.NetworkElementCommand;
import com.cloud.agent.api.to.IpAddressTO;
import com.cloud.agent.api.to.LoadBalancerTO;
-import org.apache.cloudstack.api.ApiConstants;
import com.cloud.configuration.Config;
import com.cloud.configuration.dao.ConfigurationDao;
import com.cloud.dc.DataCenter;
@@ -61,7 +63,6 @@ import com.cloud.host.Host;
import com.cloud.host.HostVO;
import com.cloud.host.dao.HostDao;
import com.cloud.host.dao.HostDetailsDao;
-import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.Networks.TrafficType;
@@ -69,6 +70,8 @@ import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.ExternalFirewallDeviceDao;
import com.cloud.network.dao.ExternalLoadBalancerDeviceDao;
import com.cloud.network.dao.ExternalLoadBalancerDeviceVO;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO.LBDeviceAllocationState;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO.LBDeviceState;
import com.cloud.network.dao.IPAddressDao;
import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.InlineLoadBalancerNicMapDao;
@@ -83,8 +86,6 @@ import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
import com.cloud.network.dao.PhysicalNetworkVO;
-import com.cloud.network.dao.ExternalLoadBalancerDeviceVO.LBDeviceAllocationState;
-import com.cloud.network.dao.ExternalLoadBalancerDeviceVO.LBDeviceState;
import com.cloud.network.element.IpDeployer;
import com.cloud.network.element.NetworkElement;
import com.cloud.network.element.StaticNatServiceProvider;
@@ -104,7 +105,6 @@ import com.cloud.resource.ResourceState;
import com.cloud.resource.ResourceStateAdapter;
import com.cloud.resource.ServerResource;
import com.cloud.resource.UnableDeleteHostException;
-import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
import com.cloud.user.Account;
import com.cloud.user.AccountManager;
import com.cloud.user.dao.AccountDao;
@@ -118,8 +118,7 @@ import com.cloud.utils.db.Transaction;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.net.NetUtils;
import com.cloud.utils.net.UrlUtil;
-import com.cloud.vm.Nic.ReservationStrategy;
-import com.cloud.vm.Nic.State;
+import com.cloud.vm.Nic;
import com.cloud.vm.NicVO;
import com.cloud.vm.dao.DomainRouterDao;
import com.cloud.vm.dao.NicDao;
@@ -698,25 +697,6 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
return false;
}
- private NicVO savePlaceholderNic(Network network, String ipAddress) {
- NicVO nic = new NicVO(null, null, network.getId(), null);
- nic.setIp4Address(ipAddress);
- nic.setReservationStrategy(ReservationStrategy.PlaceHolder);
- nic.setState(State.Reserved);
- return _nicDao.persist(nic);
- }
-
- private NicVO getPlaceholderNic(Network network) {
- List<NicVO> guestIps = _nicDao.listByNetworkId(network.getId());
- for (NicVO guestIp : guestIps) {
- // only external firewall and external load balancer will create NicVO with PlaceHolder reservation strategy
- if (guestIp.getReservationStrategy().equals(ReservationStrategy.PlaceHolder) && guestIp.getVmType() == null
- && guestIp.getReserver() == null && !guestIp.getIp4Address().equals(network.getGateway())) {
- return guestIp;
- }
- }
- return null;
- }
private void applyStaticNatRuleForInlineLBRule(DataCenterVO zone, Network network, boolean revoked, String publicIp, String privateIp) throws ResourceUnavailableException {
List<StaticNat> staticNats = new ArrayList<StaticNat>();
@@ -776,7 +756,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 = savePlaceholderNic(network, loadBalancingIpAddress);
+ loadBalancingIpNic = _networkMgr.savePlaceholderNic(network, loadBalancingIpAddress);
}
// Save a mapping between the source IP address and the load balancing IP address NIC
@@ -985,7 +965,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
if (add) {
// on restart network, network could have already been implemented. If already implemented then return
- NicVO selfipNic = getPlaceholderNic(guestConfig);
+ Nic selfipNic = _networkModel.getPlaceholderNic(guestConfig, null);
if (selfipNic != null) {
return true;
}
@@ -999,7 +979,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
}
} else {
// get the self-ip used by the load balancer
- NicVO selfipNic = getPlaceholderNic(guestConfig);
+ Nic selfipNic = _networkModel.getPlaceholderNic(guestConfig, null);
if (selfipNic == null) {
s_logger.warn("Network shutdwon requested on external load balancer element, which did not implement the network." +
" Either network implement failed half way through or already network shutdown is completed. So just returning.");
@@ -1027,10 +1007,10 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
if (add) {
// Insert a new NIC for this guest network to reserve the self IP
- savePlaceholderNic(guestConfig, selfIp);
+ _networkMgr.savePlaceholderNic(guestConfig, selfIp);
} else {
// release the self-ip obtained from guest network
- NicVO selfipNic = getPlaceholderNic(guestConfig);
+ Nic selfipNic = _networkModel.getPlaceholderNic(guestConfig, null);
_nicDao.remove(selfipNic.getId());
// release the load balancer allocated for the network
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 48e017e..e961f04 100755
--- a/server/src/com/cloud/network/NetworkManager.java
+++ b/server/src/com/cloud/network/NetworkManager.java
@@ -52,6 +52,7 @@ import com.cloud.utils.Pair;
import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile;
import com.cloud.vm.NicSecondaryIp;
+import com.cloud.vm.NicVO;
import com.cloud.vm.ReservationContext;
import com.cloud.vm.VMInstanceVO;
import com.cloud.vm.VirtualMachine;
@@ -346,4 +347,6 @@ public interface NetworkManager {
String allocatePublicIpForGuestNic(Long networkId, DataCenter dc, Pod pod, Account caller, String requestedIp) throws InsufficientAddressCapacityException;
boolean removeVmSecondaryIpsOfNic(long nicId);
+ NicVO savePlaceholderNic(Network network, String ip4Address);
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 b1236cc..b2ceb46 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -44,7 +44,14 @@ import org.springframework.stereotype.Component;
import com.cloud.agent.AgentManager;
import com.cloud.agent.Listener;
-import com.cloud.agent.api.*;
+import com.cloud.agent.api.AgentControlAnswer;
+import com.cloud.agent.api.AgentControlCommand;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.CheckNetworkAnswer;
+import com.cloud.agent.api.CheckNetworkCommand;
+import com.cloud.agent.api.Command;
+import com.cloud.agent.api.StartupCommand;
+import com.cloud.agent.api.StartupRoutingCommand;
import com.cloud.agent.api.to.NicTO;
import com.cloud.alert.AlertManager;
import com.cloud.api.ApiDBUtils;
@@ -52,9 +59,15 @@ import com.cloud.configuration.Config;
import com.cloud.configuration.ConfigurationManager;
import com.cloud.configuration.Resource.ResourceType;
import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.dc.*;
+import com.cloud.dc.AccountVlanMapVO;
+import com.cloud.dc.DataCenter;
import com.cloud.dc.DataCenter.NetworkType;
+import com.cloud.dc.DataCenterVO;
+import com.cloud.dc.Pod;
+import com.cloud.dc.PodVlanMapVO;
+import com.cloud.dc.Vlan;
import com.cloud.dc.Vlan.VlanType;
+import com.cloud.dc.VlanVO;
import com.cloud.dc.dao.AccountVlanMapDao;
import com.cloud.dc.dao.DataCenterDao;
import com.cloud.dc.dao.PodVlanMapDao;
@@ -67,14 +80,28 @@ import com.cloud.domain.dao.DomainDao;
import com.cloud.event.EventTypes;
import com.cloud.event.UsageEventUtils;
import com.cloud.event.dao.UsageEventDao;
-import com.cloud.exception.*;
+import com.cloud.exception.AccountLimitException;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.ConnectionException;
+import com.cloud.exception.InsufficientAddressCapacityException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.exception.UnsupportedServiceException;
import com.cloud.host.Host;
import com.cloud.host.HostVO;
import com.cloud.host.Status;
import com.cloud.host.dao.HostDao;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.network.IpAddress.State;
-import com.cloud.network.Network.*;
+import com.cloud.network.Network.Capability;
+import com.cloud.network.Network.Event;
+import com.cloud.network.Network.GuestType;
+import com.cloud.network.Network.Provider;
+import com.cloud.network.Network.Service;
import com.cloud.network.Networks.AddressFormat;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.IsolationType;
@@ -84,7 +111,6 @@ import com.cloud.network.dao.FirewallRulesDao;
import com.cloud.network.dao.IPAddressDao;
import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.LoadBalancerDao;
-import com.cloud.network.dao.LoadBalancerVO;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkDomainDao;
import com.cloud.network.dao.NetworkServiceMapDao;
@@ -104,13 +130,16 @@ import com.cloud.network.element.NetworkElement;
import com.cloud.network.element.StaticNatServiceProvider;
import com.cloud.network.element.UserDataServiceProvider;
import com.cloud.network.guru.NetworkGuru;
-import com.cloud.network.lb.LoadBalancingRule;
-import com.cloud.network.lb.LoadBalancingRule.LbDestination;
-import com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy;
-import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy;
import com.cloud.network.lb.LoadBalancingRulesManager;
-import com.cloud.network.rules.*;
+import com.cloud.network.rules.FirewallManager;
+import com.cloud.network.rules.FirewallRule;
import com.cloud.network.rules.FirewallRule.Purpose;
+import com.cloud.network.rules.FirewallRuleVO;
+import com.cloud.network.rules.PortForwardingRuleVO;
+import com.cloud.network.rules.RulesManager;
+import com.cloud.network.rules.StaticNat;
+import com.cloud.network.rules.StaticNatRule;
+import com.cloud.network.rules.StaticNatRuleImpl;
import com.cloud.network.rules.dao.PortForwardingRulesDao;
import com.cloud.network.vpc.NetworkACLManager;
import com.cloud.network.vpc.VpcManager;
@@ -123,7 +152,12 @@ import com.cloud.offerings.NetworkOfferingVO;
import com.cloud.offerings.dao.NetworkOfferingDao;
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
import com.cloud.org.Grouping;
-import com.cloud.user.*;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.user.ResourceLimitService;
+import com.cloud.user.User;
+import com.cloud.user.UserContext;
+import com.cloud.user.UserVO;
import com.cloud.user.dao.AccountDao;
import com.cloud.user.dao.UserDao;
import com.cloud.utils.Journal;
@@ -133,18 +167,21 @@ import com.cloud.utils.component.AdapterBase;
import com.cloud.utils.component.ComponentContext;
import com.cloud.utils.component.ManagerBase;
import com.cloud.utils.concurrency.NamedThreadFactory;
-import com.cloud.utils.db.*;
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.Filter;
import com.cloud.utils.db.JoinBuilder.JoinType;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
import com.cloud.utils.db.SearchCriteria.Op;
+import com.cloud.utils.db.Transaction;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.fsm.NoTransitionException;
import com.cloud.utils.fsm.StateMachine2;
import com.cloud.utils.net.Ip;
import com.cloud.utils.net.NetUtils;
-import com.cloud.vm.*;
import com.cloud.vm.Nic;
+import com.cloud.vm.Nic.ReservationStrategy;
import com.cloud.vm.NicProfile;
-import com.cloud.vm.NicSecondaryIp;
import com.cloud.vm.NicVO;
import com.cloud.vm.ReservationContext;
import com.cloud.vm.ReservationContextImpl;
@@ -152,6 +189,7 @@ import com.cloud.vm.UserVmVO;
import com.cloud.vm.VMInstanceVO;
import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachine.Type;
+import com.cloud.vm.VirtualMachineProfile;
import com.cloud.vm.dao.NicDao;
import com.cloud.vm.dao.NicSecondaryIpDao;
import com.cloud.vm.dao.NicSecondaryIpVO;
@@ -3401,14 +3439,35 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
return success;
}
+ @Override
+ @DB
public void allocateDirectIp(NicProfile nic, DataCenter dc, VirtualMachineProfile<? extends VirtualMachine> vm, Network network,
String requestedIpv4, String requestedIpv6) throws InsufficientVirtualNetworkCapcityException,
InsufficientAddressCapacityException {
boolean ipv4 = false, ipv6 = false;
+
+ Transaction txn = Transaction.currentTxn();
+ txn.start();
+
if (network.getGateway() != null) {
if (nic.getIp4Address() == null) {
ipv4 = true;
- PublicIp ip = assignPublicIpAddress(dc.getId(), null, vm.getOwner(), VlanType.DirectAttached, network.getId(), requestedIpv4, false);
+ PublicIp ip = null;
+
+ //Get ip address from the placeholder and don't allocate a new one
+ if (requestedIpv4 != null && vm.getType() == VirtualMachine.Type.DomainRouter) {
+ Nic placeholderNic = _networkModel.getPlaceholderNic(network, null);
+ if (placeholderNic != null) {
+ IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIp4Address());
+ ip = PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId()));
+ s_logger.debug("Nic got an ip address " + placeholderNic.getIp4Address() + " stored in placeholder nic for the network " + network);
+ }
+ }
+
+ if (ip == null) {
+ ip = assignPublicIpAddress(dc.getId(), null, vm.getOwner(), VlanType.DirectAttached, network.getId(), requestedIpv4, false);
+ }
+
nic.setIp4Address(ip.getAddress().toString());
nic.setGateway(ip.getGateway());
nic.setNetmask(ip.getNetmask());
@@ -3423,6 +3482,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
nic.setDns2(dc.getDns2());
}
+ //FIXME - get ipv6 address from the placeholder if it's stored there
if (network.getIp6Gateway() != null) {
if (nic.getIp6Address() == null) {
ipv6 = true;
@@ -3445,7 +3505,8 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
nic.setIp6Dns1(dc.getIp6Dns1());
nic.setIp6Dns2(dc.getIp6Dns2());
}
-
+
+ txn.commit();
}
@Override
@@ -3649,5 +3710,14 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
Ip ipAddr = ip.getAddress();
return ipAddr.addr();
}
-
+
+ @Override
+ public NicVO savePlaceholderNic(Network network, String ip4Address) {
+ NicVO nic = new NicVO(null, null, network.getId(), null);
+ nic.setIp4Address(ip4Address);
+ nic.setReservationStrategy(ReservationStrategy.PlaceHolder);
+ nic.setState(Nic.State.Reserved);
+ return _nicDao.persist(nic);
+ }
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 40a18c7..41ce103 100644
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -93,7 +93,6 @@ import com.cloud.user.DomainManager;
import com.cloud.user.dao.AccountDao;
import com.cloud.utils.component.AdapterBase;
import com.cloud.utils.component.ComponentContext;
-import com.cloud.utils.component.Manager;
import com.cloud.utils.component.ManagerBase;
import com.cloud.utils.db.DB;
import com.cloud.utils.db.JoinBuilder;
@@ -1994,4 +1993,26 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
}
return startIpv6;
}
+
+ @Override
+ public NicVO getPlaceholderNic(Network network, Long podId) {
+ List<NicVO> nics = _nicDao.listPlaceholderNicsByNetworkId(network.getId());
+ for (NicVO nic : nics) {
+ if (nic.getVmType() == null && nic.getReserver() == null && nic.getIp4Address() != null && !nic.getIp4Address().equals(network.getGateway())) {
+ 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;
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/element/VpcVirtualRouterElement.java b/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
index aa8f10d..c7d4aed 100644
--- a/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
+++ b/server/src/com/cloud/network/element/VpcVirtualRouterElement.java
@@ -142,7 +142,7 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements Vpc
Long vpcId = network.getVpcId();
if (vpcId == null) {
- s_logger.warn("Network " + network + " is not associated with any VPC");
+ s_logger.trace("Network " + network + " is not associated with any VPC");
return false;
}
@@ -185,7 +185,7 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements Vpc
Long vpcId = network.getVpcId();
if (vpcId == null) {
- s_logger.warn("Network " + network + " is not associated with any VPC");
+ s_logger.trace("Network " + network + " is not associated with any VPC");
return false;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 8707cfd..2c8acbb 100755
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -44,7 +44,6 @@ import com.cloud.network.NetworkProfile;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.Mode;
import com.cloud.network.Networks.TrafficType;
-import com.cloud.network.UserIpv6AddressVO;
import com.cloud.network.dao.IPAddressDao;
import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.NetworkVO;
@@ -55,13 +54,15 @@ import com.cloud.user.Account;
import com.cloud.utils.component.AdapterBase;
import com.cloud.utils.db.DB;
import com.cloud.utils.db.Transaction;
+import com.cloud.vm.Nic;
import com.cloud.vm.Nic.ReservationStrategy;
-import com.cloud.vm.dao.NicSecondaryIpDao;
import com.cloud.vm.NicProfile;
-import com.cloud.vm.NicSecondaryIp;
+import com.cloud.vm.NicVO;
import com.cloud.vm.ReservationContext;
import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachineProfile;
+import com.cloud.vm.dao.NicDao;
+import com.cloud.vm.dao.NicSecondaryIpDao;
@Local(value = { NetworkGuru.class })
public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
@@ -85,6 +86,8 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
Ipv6AddressManager _ipv6Mgr;
@Inject
NicSecondaryIpDao _nicSecondaryIpDao;
+ @Inject
+ NicDao _nicDao;
private static final TrafficType[] _trafficTypes = {TrafficType.Guest};
@@ -198,7 +201,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
nic.setStrategy(ReservationStrategy.Create);
}
- _networkMgr.allocateDirectIp(nic, dc, vm, network, nic.getRequestedIpv4(), nic.getRequestedIpv6());
+ allocateDirectIp(nic, network, vm, dc, nic.getRequestedIpv4(), nic.getRequestedIpv6());
nic.setStrategy(ReservationStrategy.Create);
return nic;
@@ -208,11 +211,31 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
public void reserve(NicProfile nic, Network network, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context)
throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
if (nic.getIp4Address() == null && nic.getIp6Address() == null) {
- _networkMgr.allocateDirectIp(nic, dest.getDataCenter(), vm, network, null, null);
+ allocateDirectIp(nic, network, vm, dest.getDataCenter(), null, null);
nic.setStrategy(ReservationStrategy.Create);
}
}
+ @DB
+ protected void allocateDirectIp(NicProfile nic, Network network, VirtualMachineProfile<? extends VirtualMachine> vm, DataCenter dc, String requestedIp4Addr, String requestedIp6Addr)
+ 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);
+ //save the placeholder nic if the vm is the Virtual router
+ if (vm.getType() == VirtualMachine.Type.DomainRouter) {
+ Nic placeholderNic = _networkModel.getPlaceholderNic(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());
+ }
+ }
+ txn.commit();
+ }
+
@Override
public boolean release(NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, String reservationId) {
return true;
@@ -230,24 +253,32 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
}
if (nic.getIp4Address() != null) {
- IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address());
- if (ip != null) {
- Transaction txn = Transaction.currentTxn();
- txn.start();
- _networkMgr.markIpAsUnavailable(ip.getId());
- _ipAddressDao.unassignIpAddress(ip.getId());
- //unassign nic secondary ip address
- s_logger.debug("remove nic " + nic.getId() + " secondary ip ");
- List<String> nicSecIps = null;
- nicSecIps = _nicSecondaryIpDao.getSecondaryIpAddressesForNic(nic.getId());
- for (String secIp: nicSecIps) {
- IPAddressVO pubIp = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), secIp);
- _networkMgr.markIpAsUnavailable(pubIp.getId());
- _ipAddressDao.unassignIpAddress(pubIp.getId());
+ IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address());
+ if (ip != null) {
+ Transaction txn = Transaction.currentTxn();
+ txn.start();
+
+ // if the ip address a part of placeholder, don't release it
+ Nic placeholderNic = _networkModel.getPlaceholderNic(network, null);
+ if (placeholderNic != null && placeholderNic.getIp4Address().equalsIgnoreCase(ip.getAddress().addr())) {
+ s_logger.debug("Not releasing direct ip " + ip.getId() +" yet as its ip is saved in the placeholder");
+ } else {
+ _networkMgr.markIpAsUnavailable(ip.getId());
+ _ipAddressDao.unassignIpAddress(ip.getId());
+ }
+
+ //unassign nic secondary ip address
+ s_logger.debug("remove nic " + nic.getId() + " secondary ip ");
+ List<String> nicSecIps = null;
+ nicSecIps = _nicSecondaryIpDao.getSecondaryIpAddressesForNic(nic.getId());
+ for (String secIp: nicSecIps) {
+ IPAddressVO pubIp = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), secIp);
+ _networkMgr.markIpAsUnavailable(pubIp.getId());
+ _ipAddressDao.unassignIpAddress(pubIp.getId());
+ }
+
+ txn.commit();
}
-
- txn.commit();
- }
}
if (nic.getIp6Address() != null) {
@@ -261,7 +292,24 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
}
@Override
+ @DB
public boolean trash(Network network, NetworkOffering offering, Account owner) {
+ //Have to remove all placeholder nics
+ List<NicVO> nics = _nicDao.listPlaceholderNicsByNetworkId(network.getId());
+ Transaction txn = Transaction.currentTxn();
+ txn.start();
+ for (Nic nic : nics) {
+ if (nic.getIp4Address() != null) {
+ s_logger.debug("Releasing ip " + nic.getIp4Address() + " of placeholder nic " + nic);
+ IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address());
+ _networkMgr.markIpAsUnavailable(ip.getId());
+ _ipAddressDao.unassignIpAddress(ip.getId());
+ s_logger.debug("Removing placeholder nic " + nic);
+ _nicDao.remove(nic.getId());
+ }
+ }
+
+ txn.commit();
return true;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 8efbcd7..d74cd06 100755
--- a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
@@ -17,6 +17,7 @@
package com.cloud.network.guru;
import java.net.URI;
+import java.util.List;
import javax.ejb.Local;
import javax.inject.Inject;
@@ -50,6 +51,7 @@ import com.cloud.offerings.dao.NetworkOfferingDao;
import com.cloud.utils.db.DB;
import com.cloud.utils.db.Transaction;
import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.vm.Nic;
import com.cloud.vm.Nic.ReservationStrategy;
import com.cloud.vm.NicProfile;
import com.cloud.vm.ReservationContext;
@@ -155,11 +157,34 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
nic.setDns2(dc.getDns2());
}
+ @DB
protected void getIp(NicProfile nic, Pod pod, VirtualMachineProfile<? extends VirtualMachine> vm, Network network) throws InsufficientVirtualNetworkCapcityException,
InsufficientAddressCapacityException, ConcurrentOperationException {
DataCenter dc = _dcDao.findById(pod.getDataCenterId());
if (nic.getIp4Address() == null) {
- PublicIp ip = _networkMgr.assignPublicIpAddress(dc.getId(), pod.getId(), vm.getOwner(), VlanType.DirectAttached, network.getId(), null, false);
+ Transaction txn = Transaction.currentTxn();
+ txn.start();
+
+ PublicIp ip = null;
+ List<PodVlanMapVO> podRefs = _podVlanDao.listPodVlanMapsByPod(pod.getId());
+ String podRangeGateway = null;
+ if (!podRefs.isEmpty()) {
+ podRangeGateway = _vlanDao.findById(podRefs.get(0).getVlanDbId()).getVlanGateway();
+ }
+ //Get ip address from the placeholder and don't allocate a new one
+ if (vm.getType() == VirtualMachine.Type.DomainRouter) {
+ Nic placeholderNic = _networkModel.getPlaceholderNic(network, null);
+ if (placeholderNic != null) {
+ IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIp4Address());
+ ip = PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId()));
+ s_logger.debug("Nic got an ip address " + placeholderNic.getIp4Address() + " stored in placeholder nic for the network " + network + " and gateway " + podRangeGateway);
+ }
+ }
+
+ if (ip == null) {
+ ip = _networkMgr.assignPublicIpAddress(dc.getId(), pod.getId(), vm.getOwner(), VlanType.DirectAttached, network.getId(), null, false);
+ }
+
nic.setIp4Address(ip.getAddress().toString());
nic.setFormat(AddressFormat.Ip4);
nic.setGateway(ip.getGateway());
@@ -171,6 +196,16 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
}
nic.setReservationId(String.valueOf(ip.getVlanTag()));
nic.setMacAddress(ip.getMacAddress());
+
+ //save the placeholder nic if the vm is the Virtual router
+ if (vm.getType() == VirtualMachine.Type.DomainRouter) {
+ Nic placeholderNic = _networkModel.getPlaceholderNic(network, null);
+ if (placeholderNic == null) {
+ s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIp4Address() + " for the network " + network + " with the gateway " + podRangeGateway);
+ _networkMgr.savePlaceholderNic(network, nic.getIp4Address());
+ }
+ }
+ txn.commit();
}
nic.setDns1(dc.getDns1());
nic.setDns2(dc.getDns2());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 6742f7b..45b11f7 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -27,11 +27,9 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Queue;
import java.util.Set;
import java.util.TimeZone;
import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
@@ -41,8 +39,8 @@ import java.util.concurrent.TimeUnit;
import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+
import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd;
-import com.cloud.agent.api.to.*;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
@@ -174,7 +172,6 @@ import com.cloud.network.router.VirtualRouter.RedundantState;
import com.cloud.network.router.VirtualRouter.Role;
import com.cloud.network.rules.FirewallRule;
import com.cloud.network.rules.FirewallRule.Purpose;
-import com.cloud.network.rules.FirewallRuleVO;
import com.cloud.network.rules.PortForwardingRule;
import com.cloud.network.rules.RulesManager;
import com.cloud.network.rules.StaticNat;
@@ -210,7 +207,6 @@ import com.cloud.utils.NumbersUtil;
import com.cloud.utils.Pair;
import com.cloud.utils.PasswordGenerator;
import com.cloud.utils.StringUtils;
-
import com.cloud.utils.component.ManagerBase;
import com.cloud.utils.concurrency.NamedThreadFactory;
import com.cloud.utils.db.DB;
@@ -1703,15 +1699,30 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
String defaultNetworkStartIp = null, defaultNetworkStartIpv6 = null;
if (!setupPublicNetwork) {
if (guestNetwork.getCidr() != null) {
- 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");
- }
+ //Check the placeholder nic, and if it's ip address is not empty, allocate it from there
+ String requestedGateway = null;
+ if (guestNetwork.getGateway() != null) {
+ requestedGateway = guestNetwork.getGateway();
+ } else if (plan != null && plan.getPodId() != null) {
+ Pod pod = _configMgr.getPod(plan.getPodId());
+ requestedGateway = pod.getGateway();
+ }
+ Nic placeholder = _networkModel.getPlaceholderNic(guestNetwork, null);
+ 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");
+ }
+ }
}
+ //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) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/server/src/com/cloud/upgrade/dao/Upgrade410to420.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/upgrade/dao/Upgrade410to420.java b/server/src/com/cloud/upgrade/dao/Upgrade410to420.java
index db562b1..f210dc1 100644
--- a/server/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/server/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -60,6 +60,7 @@ public class Upgrade410to420 implements DbUpgrade {
@Override
public void performDataMigration(Connection conn) {
upgradeVmwareLabels(conn);
+ createPlaceHolderNics(conn);
PreparedStatement sql = null;
try {
sql = conn.prepareStatement("update vm_template set image_data_store_id = 1 where type = 'SYSTEM' or type = 'BUILTIN'");
@@ -158,4 +159,41 @@ public class Upgrade410to420 implements DbUpgrade {
}
}
}
+
+ private void createPlaceHolderNics(Connection conn) {
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+
+ try {
+ pstmt = conn.prepareStatement("SELECT network_id, gateway, ip4_address FROM `cloud`.`nics` WHERE reserver_name IN ('DirectNetworkGuru','DirectPodBasedNetworkGuru') and vm_type='DomainRouter' AND removed IS null");
+ rs = pstmt.executeQuery();
+ while (rs.next()) {
+ Long networkId = rs.getLong(1);
+ String gateway = rs.getString(2);
+ String ip = rs.getString(3);
+ String uuid = UUID.randomUUID().toString();
+ //Insert placeholder nic for each Domain router nic in Shared network
+ pstmt = conn.prepareStatement("INSERT INTO `cloud`.`nics` (uuid, ip4_address, gateway, network_id, state, strategy) VALUES (?, ?, ?, ?, 'Reserved', 'PlaceHolder')");
+ pstmt.setString(1, uuid);
+ pstmt.setString(2, ip);
+ pstmt.setString(3, gateway);
+ pstmt.setLong(4, networkId);
+ pstmt.executeUpdate();
+ s_logger.debug("Created placeholder nic for the ipAddress " + ip);
+
+ }
+ } catch (SQLException e) {
+ throw new CloudRuntimeException("Unable to create placeholder nics", e);
+ } finally {
+ try {
+ if (rs != null) {
+ rs.close();
+ }
+ if (pstmt != null) {
+ pstmt.close();
+ }
+ } catch (SQLException e) {
+ }
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/server/src/com/cloud/vm/dao/NicDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/dao/NicDao.java b/server/src/com/cloud/vm/dao/NicDao.java
index 35d7191..eb38a8d 100644
--- a/server/src/com/cloud/vm/dao/NicDao.java
+++ b/server/src/com/cloud/vm/dao/NicDao.java
@@ -62,4 +62,7 @@ public interface NicDao extends GenericDao<NicVO, Long> {
List<NicVO> listByVmIdAndNicId(Long vmId, Long nicId);
NicVO findByIp4AddressAndVmId(String ip4Address, long instance);
+
+ List<NicVO> listPlaceholderNicsByNetworkId(long networkId);
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/server/src/com/cloud/vm/dao/NicDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/dao/NicDaoImpl.java b/server/src/com/cloud/vm/dao/NicDaoImpl.java
index b9ec72e..b427d4e 100644
--- a/server/src/com/cloud/vm/dao/NicDaoImpl.java
+++ b/server/src/com/cloud/vm/dao/NicDaoImpl.java
@@ -221,4 +221,12 @@ public class NicDaoImpl extends GenericDaoBase<NicVO, Long> implements NicDao {
return findOneBy(sc);
}
+ @Override
+ public List<NicVO> listPlaceholderNicsByNetworkId(long networkId) {
+ SearchCriteria<NicVO> sc = AllFieldsSearch.create();
+ sc.setParameters("network", networkId);
+ sc.setParameters("strategy", Nic.ReservationStrategy.PlaceHolder.toString());
+ return listBy(sc);
+ }
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 eb43cce..6da48ec 100755
--- a/server/test/com/cloud/network/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/network/MockNetworkManagerImpl.java
@@ -67,6 +67,7 @@ import com.cloud.utils.component.ManagerBase;
import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile;
import com.cloud.vm.NicSecondaryIp;
+import com.cloud.vm.NicVO;
import com.cloud.vm.ReservationContext;
import com.cloud.vm.VMInstanceVO;
import com.cloud.vm.VirtualMachine;
@@ -881,4 +882,10 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
// TODO Auto-generated method stub
return false;
}
+
+ @Override
+ public NicVO savePlaceholderNic(Network network, String ip4Address) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 83dddf4..b926519 100644
--- a/server/test/com/cloud/network/MockNetworkModelImpl.java
+++ b/server/test/com/cloud/network/MockNetworkModelImpl.java
@@ -34,16 +34,13 @@ import com.cloud.network.Network.GuestType;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.Networks.TrafficType;
-import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.NetworkVO;
import com.cloud.network.element.NetworkElement;
import com.cloud.network.element.UserDataServiceProvider;
-import com.cloud.network.rules.FirewallRule;
import com.cloud.offering.NetworkOffering;
import com.cloud.offerings.NetworkOfferingVO;
import com.cloud.user.Account;
-import com.cloud.utils.component.Manager;
import com.cloud.utils.component.ManagerBase;
import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile;
@@ -841,4 +838,10 @@ public class MockNetworkModelImpl extends ManagerBase implements NetworkModel {
// TODO Auto-generated method stub
return null;
}
+
+ @Override
+ public Nic getPlaceholderNic(Network network, Long podId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 c798cdf..ead0051 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -83,6 +83,7 @@ import com.cloud.utils.component.ManagerBase;
import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile;
import com.cloud.vm.NicSecondaryIp;
+import com.cloud.vm.NicVO;
import com.cloud.vm.ReservationContext;
import com.cloud.vm.VMInstanceVO;
import com.cloud.vm.VirtualMachine;
@@ -1411,4 +1412,16 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
// TODO Auto-generated method stub
return false;
}
+
+
+
+
+
+ @Override
+ public NicVO savePlaceholderNic(Network network, String ip4Address) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26b892da/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 7f1f945..b05e8ea 100644
--- a/server/test/com/cloud/vpc/MockNetworkModelImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkModelImpl.java
@@ -41,17 +41,14 @@ import com.cloud.network.Networks.TrafficType;
import com.cloud.network.PhysicalNetwork;
import com.cloud.network.PhysicalNetworkSetupInfo;
import com.cloud.network.PublicIpAddress;
-import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.NetworkVO;
import com.cloud.network.element.NetworkElement;
import com.cloud.network.element.UserDataServiceProvider;
-import com.cloud.network.rules.FirewallRule;
import com.cloud.offering.NetworkOffering;
import com.cloud.offerings.NetworkOfferingVO;
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
import com.cloud.user.Account;
-import com.cloud.utils.component.Manager;
import com.cloud.utils.component.ManagerBase;
import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile;
@@ -854,4 +851,10 @@ public class MockNetworkModelImpl extends ManagerBase implements NetworkModel {
return null;
}
+ @Override
+ public Nic getPlaceholderNic(Network network, Long podId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
[30/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1724:ZWPS: provision to add scope of the primary storage in the zone creation wizard
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/933f1213
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/933f1213
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/933f1213
Branch: refs/heads/scaleupvm
Commit: 933f1213c1a2b297d45f971045eb57412d8aa35b
Parents: 582f8a0
Author: Pranav Saxena <pr...@citrix.com>
Authored: Tue Mar 26 21:08:14 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Tue Mar 26 21:08:14 2013 +0530
----------------------------------------------------------------------
ui/scripts/zoneWizard.js | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/933f1213/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 5108c5c..01dcaaf 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -1177,6 +1177,24 @@
validation: { required: true }
},
+ scope: {
+ label: 'label.scope',
+ select: function(args) {
+
+ var scope = [
+ { id: 'zone', description: _l('label.zone.wide') },
+ { id: 'cluster', description: _l('label.cluster') },
+ { id: 'host', description: _l('label.host') }
+ ];
+
+ args.response.success({
+ data: scope
+ });
+
+ }
+
+ },
+
protocol: {
label: 'label.protocol',
validation: { required: true },
@@ -3244,6 +3262,7 @@
array1.push("&podId=" + args.data.returnedPod.id);
array1.push("&clusterid=" + args.data.returnedCluster.id);
array1.push("&name=" + todb(args.data.primaryStorage.name));
+ array1.push("&scope=" +todb(args.data.primaryStorage.scope));
var server = args.data.primaryStorage.server;
var url = null;
[10/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - region dropdown on top menu - show "No data to show" instead of "(Default)" if there is zero region in cloudstack.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b932059d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b932059d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b932059d
Branch: refs/heads/scaleupvm
Commit: b932059d3372b0f9a17c9d5a805d25acd5e15257
Parents: abbc3b3
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Mar 22 11:46:08 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Fri Mar 22 11:46:51 2013 -0700
----------------------------------------------------------------------
ui/scripts/regions.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b932059d/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 0959e3b..14346c8 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -27,7 +27,7 @@
args.response.success({
data: regions ? regions : [
- { id: -1, name: '(Default)' }
+ { id: -1, name: _l('label.no.data') }
]
});
}
[49/50] [abbrv] CLOUDSTACK-658 - Scaleup vm support for Xenserver
Added the framweork so that it can be extended for vmware and kvm as well.
Added unitests and marvin tests.
Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e4430d8/test/integration/smoke/test_ScaleVm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_ScaleVm.py b/test/integration/smoke/test_ScaleVm.py
new file mode 100644
index 0000000..710d2ad
--- /dev/null
+++ b/test/integration/smoke/test_ScaleVm.py
@@ -0,0 +1,221 @@
+# 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.
+""" P1 tests for Scaling up Vm
+"""
+#Import Local Modules
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.remoteSSHClient import remoteSSHClient
+from marvin.integration.lib.utils import *
+from marvin.integration.lib.base import *
+from marvin.integration.lib.common import *
+from nose.plugins.attrib import attr
+#Import System modules
+import time
+
+_multiprocess_shared_ = True
+class Services:
+ """Test VM Life Cycle Services
+ """
+
+ def __init__(self):
+ self.services = {
+
+ "account": {
+ "email": "test@test.com",
+ "firstname": "Test",
+ "lastname": "User",
+ "username": "test",
+ # Random characters are appended in create account to
+ # ensure unique username generated each time
+ "password": "password",
+ },
+ "small":
+ # Create a small virtual machine instance with disk offering
+ {
+ "displayname": "testserver",
+ "username": "root", # VM creds for SSH
+ "password": "password",
+ "ssh_port": 22,
+ "hypervisor": 'XenServer',
+ "privateport": 22,
+ "publicport": 22,
+ "protocol": 'TCP',
+ },
+ "service_offerings":
+ {
+ "small":
+ {
+ # Small service offering ID to for change VM
+ # service offering from medium to small
+ "name": "SmallInstance",
+ "displaytext": "SmallInstance",
+ "cpunumber": 1,
+ "cpuspeed": 100,
+ "memory": 256,
+ },
+ "big":
+ {
+ # Big service offering ID to for change VM
+ "name": "BigInstance",
+ "displaytext": "BigInstance",
+ "cpunumber": 1,
+ "cpuspeed": 100,
+ "memory": 512,
+ }
+ },
+ #Change this
+ "template": {
+ "displaytext": "xs",
+ "name": "xs",
+ "passwordenabled": False,
+ },
+ "diskdevice": '/dev/xvdd',
+ # Disk device where ISO is attached to instance
+ "mount_dir": "/mnt/tmp",
+ "sleep": 60,
+ "timeout": 10,
+ #Migrate VM to hostid
+ "ostype": 'CentOS 5.6 (64-bit)',
+ # CentOS 5.3 (64-bit)
+ }
+
+class TestScaleVm(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.api_client = super(TestScaleVm, cls).getClsTestClient().getApiClient()
+ cls.services = Services().services
+
+ # Get Zone, Domain and templates
+ domain = get_domain(cls.api_client, cls.services)
+ zone = get_zone(cls.api_client, cls.services)
+ cls.services['mode'] = zone.networktype
+
+ template = get_template(
+ cls.api_client,
+ zone.id,
+ cls.services["ostype"]
+ )
+ # Set Zones and disk offerings ??
+ cls.services["small"]["zoneid"] = zone.id
+ cls.services["small"]["template"] = template.id
+
+ # Create account, service offerings, vm.
+ cls.account = Account.create(
+ cls.api_client,
+ cls.services["account"],
+ domainid=domain.id
+ )
+
+ cls.small_offering = ServiceOffering.create(
+ cls.api_client,
+ cls.services["service_offerings"]["small"]
+ )
+
+ cls.big_offering = ServiceOffering.create(
+ cls.api_client,
+ cls.services["service_offerings"]["big"]
+ )
+
+ #create a virtual machine
+ cls.virtual_machine = VirtualMachine.create(
+ cls.api_client,
+ cls.services["small"],
+ accountid=cls.account.account.name,
+ domainid=cls.account.account.domainid,
+ serviceofferingid=cls.small_offering.id,
+ mode=cls.services["mode"]
+ )
+ #how does it work ??
+ cls._cleanup = [
+ cls.small_offering,
+ cls.account
+ ]
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.api_client = super(TestScaleVm, cls).getClsTestClient().getApiClient()
+ cleanup_resources(cls.api_client, cls._cleanup)
+ return
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.dbclient = self.testClient.getDbConnection()
+ self.cleanup = []
+
+ def tearDown(self):
+ #Clean up, terminate the created ISOs
+ cleanup_resources(self.apiclient, self.cleanup)
+ return
+
+ @attr(tags = ["advanced", "basic", "multicluster", "storagemotion", "xenserver"])
+ def test_01_scale_vm(self):
+ """Test scale virtual machine
+ """
+ # Validate the following
+ # Scale up the vm and see if it scales to the new svc offering and is finally in running state
+
+
+
+ self.debug("Scaling VM-ID: %s to service offering: %s" % (
+ self.virtual_machine.id,
+ self.big_offering.id
+ ))
+
+ cmd = scaleVirtualMachine.scaleVirtualMachineCmd()
+ cmd.serviceofferingid = self.big_offering.id
+ cmd.id = self.virtual_machine.id
+ self.apiclient.scaleVirtualMachine(cmd)
+
+ list_vm_response = list_virtual_machines(
+ self.apiclient,
+ id=self.virtual_machine.id
+ )
+ self.assertEqual(
+ isinstance(list_vm_response, list),
+ True,
+ "Check list response returns a valid list"
+ )
+
+ self.assertNotEqual(
+ list_vm_response,
+ None,
+ "Check virtual machine is listVirtualMachines"
+ )
+
+ vm_response = list_vm_response[0]
+
+ self.assertEqual(
+ vm_response.id,
+ self.virtual_machine.id,
+ "Check virtual machine ID of scaled VM"
+ )
+
+ self.assertEqual(
+ vm_response.serviceofferingid,
+ self.big_offering.id,
+ "Check service offering of the VM"
+ )
+
+ self.assertEqual(
+ vm_response.state,
+ 'Running',
+ "Check the state of VM"
+ )
+ return
[17/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
LICENSE: Attribute devcloud veewee definition files as well
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/57c3d4db
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/57c3d4db
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/57c3d4db
Branch: refs/heads/scaleupvm
Commit: 57c3d4dbe6fa60f9e411f2c046ae4429f9d3dc9a
Parents: 87500f9
Author: Rohit Yadav <bh...@apache.org>
Authored: Mon Mar 25 14:54:31 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Mon Mar 25 14:54:31 2013 +0530
----------------------------------------------------------------------
LICENSE | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/57c3d4db/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 00afdb4..6b81a91 100644
--- a/LICENSE
+++ b/LICENSE
@@ -370,7 +370,7 @@ Within the scripts/vm/hypervisor/xenserver directory
from OpenStack, LLC http://www.openstack.org
swift
-Within the tools/appliance/definitions/systemvmtemplate and tools/appliance/definitions/systemvmtemplate64 directory
+Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directories
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Copyright (c) 2010-2012 Patrick Debois
[45/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
CLOUDSTACK-452: cloudstack UI - zone wizard - when Basic mode is selected, hide IPv6 DNS1, IPv6 DNS2 field.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5df32e6d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5df32e6d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5df32e6d
Branch: refs/heads/scaleupvm
Commit: 5df32e6d701a20057c25db2d9932edd91564febf
Parents: e806ff6
Author: Jessica Wang <je...@citrix.com>
Authored: Tue Mar 26 16:48:50 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Tue Mar 26 16:48:50 2013 -0700
----------------------------------------------------------------------
ui/scripts/zoneWizard.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5df32e6d/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 753b038..c09da8a 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -322,7 +322,9 @@
if (args.data['network-model'] == 'Basic') {
args.$form.find('[rel=networkOfferingId]').show();
- args.$form.find('[rel=guestcidraddress]').hide();
+ args.$form.find('[rel=guestcidraddress]').hide();
+ args.$form.find('[rel=ip6dns1]').hide();
+ args.$form.find('[rel=ip6dns2]').hide();
}
else { //args.data['network-model'] == 'Advanced'
args.$form.find('[rel=networkOfferingId]').hide();
@@ -331,7 +333,10 @@
args.$form.find('[rel=guestcidraddress]').show();
else //args.data["zone-advanced-sg-enabled"] == "on
args.$form.find('[rel=guestcidraddress]').hide();
- }
+
+ args.$form.find('[rel=ip6dns1]').show();
+ args.$form.find('[rel=ip6dns2]').show();
+ }
setTimeout(function() {
if ($form.find('input[name=ispublic]').is(':checked')) {
[41/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Removed unnecessary -incubator reference from Castor docs.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/67034f0c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/67034f0c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/67034f0c
Branch: refs/heads/scaleupvm
Commit: 67034f0c3813707c2e024014abb328a01ff77de3
Parents: 718fae4
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 13:32:54 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 14:02:01 2013 -0500
----------------------------------------------------------------------
docs/en-US/castor-with-cs.xml | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67034f0c/docs/en-US/castor-with-cs.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/castor-with-cs.xml b/docs/en-US/castor-with-cs.xml
index 5049d33..7bf676b 100644
--- a/docs/en-US/castor-with-cs.xml
+++ b/docs/en-US/castor-with-cs.xml
@@ -34,8 +34,7 @@
<para>To configure CAStor:</para>
<orderedlist>
<listitem>
- <para>Install &PRODUCT; 4.0.0-incubating by following the instructions given in the INSTALL.txt
- file.</para>
+ <para>Install &PRODUCT; by following the instructions given in the INSTALL.txt file.</para>
<note>
<para>You can use the S3 storage system in &PRODUCT; without setting up and installing the
compute components.</para>
[28/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
Fix new url for centos pkging and baremetal python pkg
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/854ab395
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/854ab395
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/854ab395
Branch: refs/heads/scaleupvm
Commit: 854ab39556f4dfe544eb14ac5ccb8d210f3d42b7
Parents: b3a3ad7
Author: Rohit Yadav <bh...@apache.org>
Authored: Tue Mar 26 11:27:18 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Tue Mar 26 11:27:18 2013 +0530
----------------------------------------------------------------------
packaging/centos63/cloud.spec | 4 ++--
.../resources/security_group_agent/setup.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/854ab395/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 2184f1c..94e886b 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -33,8 +33,8 @@ Release: %{_rel}%{dist}
%endif
Version: %{_ver}
License: ASL 2.0
-Vendor: Apache CloudStack <cl...@incubator.apache.org>
-Packager: Apache CloudStack <cl...@incubator.apache.org>
+Vendor: Apache CloudStack <de...@cloudstack.apache.org>
+Packager: Apache CloudStack <de...@cloudstack.apache.org>
Group: System Environment/Libraries
# FIXME do groups for every single one of the subpackages
Source0: %{name}-%{_maventag}.tgz
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/854ab395/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py b/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py
index 2de41d2..384e04d 100755
--- a/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py
+++ b/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py
@@ -30,7 +30,7 @@ security group agent for CloudStack Baremetal""",
keywords='security group cloudstack',
author='Frank Zhang',
author_email='frank.zhang@citrix.com',
- url='http://incubator.apache.org/cloudstack/',
+ url='http://cloudstack.apache.org',
license='Apache License 2',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
[38/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Posted by ni...@apache.org.
changing URLs in the feature-overview.xml file to reflect graduation.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1a139e28
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1a139e28
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1a139e28
Branch: refs/heads/scaleupvm
Commit: 1a139e2888646fd6ec9dc83f12431f3d5c571efc
Parents: d6e8701
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Tue Mar 26 12:28:09 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Tue Mar 26 12:29:00 2013 -0500
----------------------------------------------------------------------
docs/en-US/feature-overview.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1a139e28/docs/en-US/feature-overview.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/feature-overview.xml b/docs/en-US/feature-overview.xml
index a05078f..57b6d84 100644
--- a/docs/en-US/feature-overview.xml
+++ b/docs/en-US/feature-overview.xml
@@ -56,9 +56,9 @@
documented. This API enables the creation of command line tools and
new user interfaces to suit particular needs. See the Developer’s
Guide and API Reference, both available at
- <ulink url="http://incubator.apache.org/cloudstack/docs">Apache CloudStack Guides</ulink>
+ <ulink url="http://cloudstack.apache.org/docs/en-US/index.html">Apache CloudStack Guides</ulink>
and
- <ulink url="http://incubator.apache.org/cloudstack/docs/api">Apache CloudStack API Reference</ulink>
+ <ulink url="http://cloudstack.apache.org/docs/api/index.html">Apache CloudStack API Reference</ulink>
respectively.
</para>
<para>