git commit: updated refs/heads/4.3 to 712f805

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 864e5ab2f -> 712f8054d


appliance: move built zip files to dist/

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/712f8054
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/712f8054
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/712f8054

Branch: refs/heads/4.3
Commit: 712f8054d5a9cf03bb58a273f7c78add613a2a5e
Parents: 864e5ab
Author: Rohit Yadav 
Authored: Tue Nov 25 17:26:06 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 17:26:06 2014 +0530

--
 tools/appliance/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/712f8054/tools/appliance/build.sh
--
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index e03e394..a9c0a0a 100755
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -113,5 +113,5 @@ vboxmanage clonehd $hdd_uuid 
$appliance-$build_date-$branch-hyperv.vhd --format
 zip "$appliance-$build_date-$branch-hyperv.vhd.zip" 
$appliance-$build_date-$branch-hyperv.vhd
 echo "$appliance exported for HyperV: 
dist/$appliance-$build_date-$branch-hyperv.vhd"
 
-mv *-hyperv.vhd *.bz2 *.ova dist/
+mv *.zip *.bz2 *.ova dist/
 



[1/2] git commit: updated refs/heads/4.3 to bb81082

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 712f8054d -> bb81082e5


CLOUDSTACK-7951
Limit amount of memory used by cloudstack-agent jsvc.

Signed-off-by: Edison Su 
(cherry picked from commit 7884c750a205fa8962de4ac65960a9f514770817)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20de43fd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20de43fd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20de43fd

Branch: refs/heads/4.3
Commit: 20de43fd792390d3ee57a3006d937413931ee371
Parents: 712f805
Author: Keiichi Yusa 
Authored: Thu Nov 20 17:16:01 2014 +0900
Committer: Rohit Yadav 
Committed: Tue Nov 25 17:45:59 2014 +0530

--
 packaging/centos63/cloud-agent.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20de43fd/packaging/centos63/cloud-agent.rc
--
diff --git a/packaging/centos63/cloud-agent.rc 
b/packaging/centos63/cloud-agent.rc
index ab49524..e9b203e 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -66,7 +66,7 @@ export 
CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/a
 start() {
 echo -n $"Starting $PROGNAME: "
 if hostname --fqdn >/dev/null 2>&1 ; then
-$JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+$JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
 -errfile $LOGDIR/cloudstack-agent.err -outfile 
$LOGDIR/cloudstack-agent.out $CLASS
 RETVAL=$?
 echo



git commit: updated refs/heads/4.5 to 3fe1f73

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 eae733817 -> 3fe1f732d


CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc

The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav 
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3fe1f732
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3fe1f732
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3fe1f732

Branch: refs/heads/4.5
Commit: 3fe1f732d73d9ce12837d48d15031bc41df46b4d
Parents: eae7338
Author: Rohit Yadav 
Authored: Tue Nov 25 18:01:12 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:06:57 2014 +0530

--
 packaging/centos63/cloud-agent.rc | 2 +-
 packaging/debian/init/cloud-agent | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fe1f732/packaging/centos63/cloud-agent.rc
--
diff --git a/packaging/centos63/cloud-agent.rc 
b/packaging/centos63/cloud-agent.rc
index cf9f661..6cc6abc 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -64,7 +64,7 @@ export 
CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/a
 start() {
 echo -n $"Starting $PROGNAME: "
 if hostname --fqdn >/dev/null 2>&1 ; then
-$JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+$JSVC -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
 -errfile $LOGDIR/cloudstack-agent.err -outfile 
$LOGDIR/cloudstack-agent.out $CLASS
 RETVAL=$?
 echo

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fe1f732/packaging/debian/init/cloud-agent
--
diff --git a/packaging/debian/init/cloud-agent 
b/packaging/debian/init/cloud-agent
index 7e4e7d0..a3f2ae9 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -96,7 +96,7 @@ start() {
 
 wait_for_network
 
-if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -Djna.nosys=true 
-pidfile "$PIDFILE" -errfile SYSLOG $CLASS
+if start_daemon -p $PIDFILE $DAEMON -Xms256m -Xmx2048m -cp "$CLASSPATH" 
-Djna.nosys=true -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
 RETVAL=$?
 then
 rc=0



[2/2] git commit: updated refs/heads/4.3 to bb81082

2014-11-25 Thread bhaisaab
CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc

The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bb81082e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bb81082e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bb81082e

Branch: refs/heads/4.3
Commit: bb81082e58d90da9971b7e06f4c3f8639446b2d2
Parents: 20de43f
Author: Rohit Yadav 
Authored: Tue Nov 25 18:01:12 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:03:53 2014 +0530

--
 packaging/centos63/cloud-agent.rc | 2 +-
 packaging/debian/init/cloud-agent | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb81082e/packaging/centos63/cloud-agent.rc
--
diff --git a/packaging/centos63/cloud-agent.rc 
b/packaging/centos63/cloud-agent.rc
index e9b203e..8918e50 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -66,7 +66,7 @@ export 
CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/a
 start() {
 echo -n $"Starting $PROGNAME: "
 if hostname --fqdn >/dev/null 2>&1 ; then
-$JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+$JSVC -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
 -errfile $LOGDIR/cloudstack-agent.err -outfile 
$LOGDIR/cloudstack-agent.out $CLASS
 RETVAL=$?
 echo

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb81082e/packaging/debian/init/cloud-agent
--
diff --git a/packaging/debian/init/cloud-agent 
b/packaging/debian/init/cloud-agent
index 5720d74..a14e8a2 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -96,7 +96,7 @@ start() {
 
 wait_for_network
 
-if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -Djna.nosys=true 
-pidfile "$PIDFILE" -errfile SYSLOG $CLASS
+if start_daemon -p $PIDFILE $DAEMON -Xms256m -Xmx2048m -cp "$CLASSPATH" 
-Djna.nosys=true -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
 RETVAL=$?
 then
 rc=0



git commit: updated refs/heads/master to 19d73fe

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/master 4f8252882 -> 19d73fe67


CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc

The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav 
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/19d73fe6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/19d73fe6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/19d73fe6

Branch: refs/heads/master
Commit: 19d73fe67d6c43ec4ef7c4a8e76c09e15e05a830
Parents: 4f82528
Author: Rohit Yadav 
Authored: Tue Nov 25 18:01:12 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:27:21 2014 +0530

--
 packaging/centos63/cloud-agent.rc | 2 +-
 packaging/debian/init/cloud-agent | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/centos63/cloud-agent.rc
--
diff --git a/packaging/centos63/cloud-agent.rc 
b/packaging/centos63/cloud-agent.rc
index cf9f661..6cc6abc 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -64,7 +64,7 @@ export 
CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/a
 start() {
 echo -n $"Starting $PROGNAME: "
 if hostname --fqdn >/dev/null 2>&1 ; then
-$JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+$JSVC -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
 -errfile $LOGDIR/cloudstack-agent.err -outfile 
$LOGDIR/cloudstack-agent.out $CLASS
 RETVAL=$?
 echo

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/debian/init/cloud-agent
--
diff --git a/packaging/debian/init/cloud-agent 
b/packaging/debian/init/cloud-agent
index 7e4e7d0..a3f2ae9 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -96,7 +96,7 @@ start() {
 
 wait_for_network
 
-if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -Djna.nosys=true 
-pidfile "$PIDFILE" -errfile SYSLOG $CLASS
+if start_daemon -p $PIDFILE $DAEMON -Xms256m -Xmx2048m -cp "$CLASSPATH" 
-Djna.nosys=true -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
 RETVAL=$?
 then
 rc=0



git commit: updated refs/heads/master to 6ad2f38

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/master d0ca2d5d8 -> 6ad2f3842


CLOUDSTACK-7679: Bump rabbitmq client library to latest 3.4.1

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6ad2f384
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6ad2f384
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6ad2f384

Branch: refs/heads/master
Commit: 6ad2f384265de41751fd3f9c238b82bdbf933cfd
Parents: d0ca2d5
Author: Rohit Yadav 
Authored: Tue Nov 25 19:15:28 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:16:23 2014 +0530

--
 plugins/event-bus/rabbitmq/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ad2f384/plugins/event-bus/rabbitmq/pom.xml
--
diff --git a/plugins/event-bus/rabbitmq/pom.xml 
b/plugins/event-bus/rabbitmq/pom.xml
index a109578..5f002a0 100644
--- a/plugins/event-bus/rabbitmq/pom.xml
+++ b/plugins/event-bus/rabbitmq/pom.xml
@@ -31,7 +31,7 @@
 
 com.rabbitmq
   amqp-client
-3.3.5
+3.4.1
 
 
 org.apache.cloudstack



git commit: updated refs/heads/4.5 to c775728

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 1bc13f753 -> c77572805


CLOUDSTACK-7679: Bump rabbitmq client library to latest 3.4.1

Signed-off-by: Rohit Yadav 
(cherry picked from commit 6ad2f384265de41751fd3f9c238b82bdbf933cfd)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c7757280
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c7757280
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c7757280

Branch: refs/heads/4.5
Commit: c7757280585061899c7714355a853ded9ae88f94
Parents: 1bc13f7
Author: Rohit Yadav 
Authored: Tue Nov 25 19:15:28 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:18:19 2014 +0530

--
 plugins/event-bus/rabbitmq/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c7757280/plugins/event-bus/rabbitmq/pom.xml
--
diff --git a/plugins/event-bus/rabbitmq/pom.xml 
b/plugins/event-bus/rabbitmq/pom.xml
index ab7c267..aeeda08 100644
--- a/plugins/event-bus/rabbitmq/pom.xml
+++ b/plugins/event-bus/rabbitmq/pom.xml
@@ -31,7 +31,7 @@
 
 com.rabbitmq
   amqp-client
-3.3.5
+3.4.1
 
 
 org.apache.cloudstack



[08/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7766: Field Validations Missing for Ingress and Egress Rules

(cherry picked from commit 94b16b3bd5f8b3b7635f07e9304e461cd2dc2275)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ca8ecc04
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ca8ecc04
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ca8ecc04

Branch: refs/heads/4.3
Commit: ca8ecc0470191eb35788429a7afcf604ee3d389c
Parents: 0b317ea
Author: Gabor Apati-Nagy 
Authored: Tue Oct 28 19:06:14 2014 +
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:42:56 2014 +0530

--
 ui/scripts/network.js  | 34 +++--
 ui/scripts/ui/widgets/multiEdit.js |  9 +
 2 files changed, 37 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ca8ecc04/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 8e70034..511ad41 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4459,11 +4459,19 @@
 },
 'startport': {
 edit: true,
-label: 'label.start.port'
+label: 'label.start.port',
+validation: {
+number: true,
+range: [0, 65535]
+}
 },
 'endport': {
 edit: true,
-label: 'label.end.port'
+label: 'label.end.port',
+validation: {
+number: true,
+range: [0, 65535]
+}
 },
 'icmptype': {
 edit: true,
@@ -4478,7 +4486,10 @@
 'cidr': {
 edit: true,
 label: 'label.cidr',
-isHidden: true
+isHidden: true,
+validation: {
+ipv4cidr: true
+}
 },
 'accountname': {
 edit: true,
@@ -4654,11 +4665,19 @@
 },
 'startport': {
 edit: true,
-label: 'label.start.port'
+label: 'label.start.port',
+validation: {
+number: true,
+range: [0, 65535]
+}
 },
 'endport': {
 edit: true,
-label: 'label.end.port'
+label: 'label.end.port',
+validation: {
+number: true,
+range: [0, 65535]
+}
 },
 'icmptype': {
 edit: true,
@@ -4673,7 +4692,10 @@
 'cidr': {
 edit: true,
 label: 'label.cidr',
-isHidden: true
+isHidden: true,
+validation: {
+ipv4cidr: true
+}
 },
   

[07/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7837: [UI] Make the Source CIDR column wide enough to fit the CIDR 
value without ellipsizing

Signed-off-by: Rajani Karuturi 
(cherry picked from commit 6490694231cb1184011b8504cb118ba73fe6cdc1)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0b317ea0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0b317ea0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0b317ea0

Branch: refs/heads/4.3
Commit: 0b317ea06d5cf7c9757c08b09708f4d1ddc5c5af
Parents: c6e2166
Author: Mihaela Stoica 
Authored: Tue Nov 4 11:35:57 2014 +
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:34:18 2014 +0530

--
 ui/css/cloudstack3.css | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0b317ea0/ui/css/cloudstack3.css
--
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 14bd624..4ee6916 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -7817,7 +7817,7 @@ div.container div.panel 
div#details-tab-addloadBalancer.detail-group div.loadBal
 
 .multi-edit .data .data-body .data-item > table tbody tr td span {
   overflow: hidden;
-  max-width: 78px;
+  max-width: 90%;
   display: block;
   float: left;
   text-overflow: ellipsis;
@@ -7975,6 +7975,17 @@ div.container div.panel 
div#details-tab-addloadBalancer.detail-group div.loadBal
   font-size: 10px;
 }
 
+/* special case for 'Source CIDR' column - make it wide enough to fit a CIDR 
without ellipsizing*/
+.detail-view .multi-edit table tr th.cidrlist,
+.detail-view .multi-edit table tr td.cidrlist {
+  min-width: 112px !important;
+  max-width: 112px !important;
+}
+.detail-view .multi-edit td.cidrlist input {
+  width: 85%;
+}
+
+
 /** Header fields*/
 .multi-edit .header-fields {
   position: relative;



[17/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7191:On restartNetwork destroy the VR immediatley, instead of
cleanup the rules then destroy

fix adds a provision to specify if cleanup is needed on network on
shutdown. VR is marked as to not to require network rules clean up on
network shutdown as the VR is destroyed and recreated.

ran the simulator tests that test network life cycle

(cherry picked from commit 67876b215ef5217b3d306b3642a38a3708a30494)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/816eb63e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/816eb63e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/816eb63e

Branch: refs/heads/4.3
Commit: 816eb63e972be6a1eaa20667e461d24882b3ee47
Parents: eb6987c
Author: Murali Reddy 
Authored: Mon Jul 28 16:14:50 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:46:40 2014 +0530

--
 api/src/com/cloud/network/Network.java| 18 +-
 .../engine/orchestration/NetworkOrchestrator.java | 17 ++---
 2 files changed, 31 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/816eb63e/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 b5e8173..843e874 100644
--- a/api/src/com/cloud/network/Network.java
+++ b/api/src/com/cloud/network/Network.java
@@ -114,7 +114,7 @@ public interface Network extends ControlledEntity, 
StateObject, I
 public static class Provider {
 private static List supportedProviders = new 
ArrayList();
 
-public static final Provider VirtualRouter = new 
Provider("VirtualRouter", false);
+public static final Provider VirtualRouter = new 
Provider("VirtualRouter", false, false);
 public static final Provider JuniperContrailRouter = new 
Provider("JuniperContrailRouter", false);
 public static final Provider JuniperSRX = new Provider("JuniperSRX", 
true);
 public static final Provider PaloAlto = new Provider("PaloAlto", true);
@@ -135,9 +135,21 @@ public interface Network extends ControlledEntity, 
StateObject, I
 private final String name;
 private final boolean isExternal;
 
+// set to true, if on network shutdown resources (acquired/configured 
at implemented phase) needed to cleaned up. set to false
+// if no clean-up is required ( for e.g appliance based providers like 
VirtualRouter, VM is destroyed so there is no need to cleanup).
+private final boolean needCleanupOnShutdown;
+
 public Provider(String name, boolean isExternal) {
 this.name = name;
 this.isExternal = isExternal;
+needCleanupOnShutdown = true;
+supportedProviders.add(this);
+}
+
+public Provider(String name, boolean isExternal, boolean 
needCleanupOnShutdown) {
+this.name = name;
+this.isExternal = isExternal;
+this.needCleanupOnShutdown = needCleanupOnShutdown;
 supportedProviders.add(this);
 }
 
@@ -149,6 +161,10 @@ public interface Network extends ControlledEntity, 
StateObject, I
 return isExternal;
 }
 
+public boolean cleanupNeededOnShutdown() {
+return needCleanupOnShutdown;
+}
+
 public static Provider getProvider(String providerName) {
 for (Provider provider : supportedProviders) {
 if (provider.getName().equalsIgnoreCase(providerName)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/816eb63e/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
--
diff --git 
a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
 
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index 9e869c4..d3fe98a 100755
--- 
a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ 
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -2037,11 +2037,24 @@ public class NetworkOrchestrator extends ManagerBase 
implements NetworkOrchestra
 
 @Override
 public boolean shutdownNetworkElementsAndResources(ReservationContext 
context, boolean cleanupElements, Network network) {
+
+// get providers to shutdown
+List providersToShutdown = 
getNetworkProviders(network.getId());
+
 // 1) Cleanup all the rules for the network. If it fails, just log the 
failure and proceed with shutting down
 // the elements
 b

[09/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7700: Volume Snapshot Async Job returns Success for a failed
operation.

(cherry picked from commit 1e20600ecaa3487f9d2eac53505c2e9e0f0f9e88)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1cc58b1a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1cc58b1a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1cc58b1a

Branch: refs/heads/4.3
Commit: 1cc58b1a6f0018171d6cc83237f1f9d0409335f6
Parents: ca8ecc0
Author: Min Chen 
Authored: Mon Oct 13 14:25:52 2014 -0700
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:13:50 2014 +0530

--
 .../src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1cc58b1a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
--
diff --git 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index d221fa9..4e07edd 100644
--- 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -1381,6 +1381,7 @@ public class VolumeServiceImpl implements VolumeService {
 snapshot = snapshotMgr.takeSnapshot(volume);
 } catch (Exception e) {
 s_logger.debug("Take snapshot: " + volume.getId() + " failed", e);
+throw new CloudRuntimeException("Failed to take snapshot", e);
 }
 
 return snapshot;



[14/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7319: dd with direct io is less impacting on Dom0 kernel resources

Signed-off-by: Daan Hoogland 
(cherry picked from commit c4b78c3aaa8df20c8e892b9d5108d8f34f96ed0c)
(cherry picked from commit 37baddd7212717f259c33b3bb75720d718b92d2c)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7dbafba5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7dbafba5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7dbafba5

Branch: refs/heads/4.3
Commit: 7dbafba52f282e523f44de43a2328ccfeecc1e41
Parents: 898b2e7
Author: Joris van Lieshout 
Authored: Mon Aug 11 17:12:23 2014 +0200
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:33:34 2014 +0530

--
 scripts/vm/hypervisor/xenserver/vmopsSnapshot | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7dbafba5/scripts/vm/hypervisor/xenserver/vmopsSnapshot
--
diff --git a/scripts/vm/hypervisor/xenserver/vmopsSnapshot 
b/scripts/vm/hypervisor/xenserver/vmopsSnapshot
index 5fd69a6..5d5217b 100755
--- a/scripts/vm/hypervisor/xenserver/vmopsSnapshot
+++ b/scripts/vm/hypervisor/xenserver/vmopsSnapshot
@@ -201,7 +201,7 @@ def copyfile(fromFile, toFile, isISCSI):
 logging.debug("Starting to copy " + fromFile + " to " + toFile)
 errMsg = ''
 try:
-cmd = ['dd', 'if=' + fromFile, 'of=' + toFile, 'bs=4M']
+cmd = ['dd', 'if=' + fromFile, 'iflag=direct', 'of=' + toFile, 
'oflag=direct', 'bs=4M']
 txt = util.pread2(cmd)
 except:
 try:



[15/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7302: UI: Remove Hover Interaction from breadcrumbs at top page

Signed-off-by: Mihaela Stoica 
(cherry picked from commit af377430453ecf1fb9b44ed3e29541b7f20ce5d5)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fa300f9f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fa300f9f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fa300f9f

Branch: refs/heads/4.3
Commit: fa300f9f5e0017f05b13a20688b6311bc8d63173
Parents: 7dbafba
Author: Mihaela Stoica 
Authored: Mon Aug 11 08:58:04 2014 +0100
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:34:39 2014 +0530

--
 ui/scripts/ui/widgets/cloudBrowser.js | 69 --
 1 file changed, 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fa300f9f/ui/scripts/ui/widgets/cloudBrowser.js
--
diff --git a/ui/scripts/ui/widgets/cloudBrowser.js 
b/ui/scripts/ui/widgets/cloudBrowser.js
index ffb5f15..2dcec10 100644
--- a/ui/scripts/ui/widgets/cloudBrowser.js
+++ b/ui/scripts/ui/widgets/cloudBrowser.js
@@ -355,73 +355,4 @@
 }
 }
 ));
-
-// Breadcrumb hovering
-$('#breadcrumbs li').live('mouseover', cloudStack.ui.event.bind(
-'cloudBrowser', {
-'breadcrumb': function($target, $browser, data) {
-var $hiddenPanels = data.panel.siblings().filter(function() {
-return $(this).index() > data.panel.index();
-});
-var $targetPanel = data.panel.filter(':first');
-var $targetBreadcrumb = _breadcrumb.filter($targetPanel);
-var $panelWrapper = $('').addClass('panel 
panel-highlight-wrapper');
-
-$hiddenPanels.addClass('mouseover-hidden');
-
-$browser.data('browser-panel-highlight-timer', 
setTimeout(function() {
-$('#browser').addClass('panel-highlight');
-$('.overlay').remove();
-
-// Setup panel and wrapper positioning
-$panelWrapper
-.css({
-left: $targetPanel.position().left
-})
-.width($targetPanel.width());
-$targetPanel
-.wrap($panelWrapper);
-$panelWrapper
-.zIndex(1)
-.overlay();
-$targetPanel.filter(':last').addClass('highlighted');
-
-// Setup breadcrumbs
-$targetBreadcrumb.each(function() {
-$(this).data('breadcrumb-original-zindex', 
$(this).zIndex());
-});
-$targetBreadcrumb.zIndex(10001);
-
-$hiddenPanels.hide();
-}, 1000));
-}
-}
-));
-
-$('#breadcrumbs li').live('mouseout', cloudStack.ui.event.bind(
-'cloudBrowser', {
-'breadcrumb': function($target, $browser, data) {
-var $getHiddenPanels = 
$browser.find('.panel.mouseover-hidden');
-var $visiblePanels = $getHiddenPanels.siblings();
-var $visibleBreadcrumbs = _breadcrumb.filter($visiblePanels);
-
-clearTimeout($browser.data('browser-panel-highlight-timer'));
-$('#browser').removeClass('panel-highlight');
-$('#browser .panel').removeClass('highlighted');
-$('#browser .panel.panel-highlight-wrapper').each(function() {
-var $wrapper = $(this);
-var $panel = $wrapper.find('.panel');
-
-$wrapper.after($panel);
-$wrapper.remove();
-});
-$getHiddenPanels.removeClass('mouseover-hidden').show();
-$visibleBreadcrumbs.each(function() {
-$(this).zIndex($(this).data('breadcrumb-original-zindex'));
-});
-$('.overlay').remove();
-$('#browser .panel > .highlight-arrow').remove();
-}
-}
-));
 })(jQuery, cloudStack);



[06/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7849: Sorting projects alphabetically in drop down menu

Signed-off-by: Rajani Karuturi 
(cherry picked from commit e03a7e6feaae2d024f2a53afd71e0230309b1085)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c6e21668
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c6e21668
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c6e21668

Branch: refs/heads/4.3
Commit: c6e2166876462e6f80bc27cddd9437de6b6012b9
Parents: f0a81ed
Author: Daniel Vega 
Authored: Wed Nov 5 18:30:58 2014 -0200
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:33:32 2014 +0530

--
 ui/scripts/ui-custom/projectSelect.js | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c6e21668/ui/scripts/ui-custom/projectSelect.js
--
diff --git a/ui/scripts/ui-custom/projectSelect.js 
b/ui/scripts/ui-custom/projectSelect.js
index ba4c7c7..5cb4449 100644
--- a/ui/scripts/ui-custom/projectSelect.js
+++ b/ui/scripts/ui-custom/projectSelect.js
@@ -30,11 +30,21 @@
 response: {
 success: function(args) {
 var projects = args.data;
+var arrayOfProjs = [];
 
 $(projects).map(function(index, project) {
+var proj = {id: _s(project.id), html: 
_s(project.displaytext ? project.displaytext : project.name)};
+arrayOfProjs.push(proj);
+});
+
+arrayOfProjs.sort(function(a,b) {
+return a.html.localeCompare(b.html);
+});
+
+$(arrayOfProjs).map(function(index, project) {
 var $option = $('').val(_s(project.id));
 
-$option.html(_s(project.displaytext ? 
project.displaytext : project.name));
+$option.html(_s(project.html));
 $option.appendTo($projectSelect);
 });
 },



[05/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7869: Add simulator support for findHostsForMigration API

(cherry picked from commit 8378485e56d973639dfc06013d64db6a80056a3b)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/server/ManagementServerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f0a81edb
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f0a81edb
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f0a81edb

Branch: refs/heads/4.3
Commit: f0a81edb5b80acac4685a28fabeaad978c01a59f
Parents: 1e47589
Author: Koushik Das 
Authored: Sat Nov 8 13:46:24 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:31:37 2014 +0530

--
 server/src/com/cloud/server/ManagementServerImpl.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0a81edb/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 3744cb3..afa50b0 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -1081,9 +1081,9 @@ public class ManagementServerImpl extends ManagerBase 
implements ManagementServe
 throw ex;
 }
 
-if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && 
!vm.getHypervisorType().equals(HypervisorType.VMware)
-&& !vm.getHypervisorType().equals(HypervisorType.KVM) && 
!vm.getHypervisorType().equals(HypervisorType.Ovm)
-&& !vm.getHypervisorType().equals(HypervisorType.Hyperv)) {
+if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && 
!vm.getHypervisorType().equals(HypervisorType.VMware) && 
!vm.getHypervisorType().equals(HypervisorType.KVM)
+&& !vm.getHypervisorType().equals(HypervisorType.Ovm) && 
!vm.getHypervisorType().equals(HypervisorType.Hyperv) && 
!vm.getHypervisorType().equals(HypervisorType.LXC)
+&& !vm.getHypervisorType().equals(HypervisorType.Simulator)) {
 if (s_logger.isDebugEnabled()) {
 s_logger.debug(vm + " is not XenServer/VMware/KVM/OVM/Hyperv, 
cannot migrate this VM.");
 }



[11/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7589: VM not Starting and always stuck in Stopped state after
management server restarts.

(cherry picked from commit 7cdb67dcf1ec4158ec0ab4c2fa868cc63121bbb5)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0610bf67
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0610bf67
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0610bf67

Branch: refs/heads/4.3
Commit: 0610bf670cc5c54e73c4051c3ff5d04a916ad122
Parents: 33761a3
Author: Min Chen 
Authored: Fri Sep 19 15:12:09 2014 -0700
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:22:33 2014 +0530

--
 .../jobs/impl/AsyncJobManagerImpl.java  | 57 +++-
 .../framework/jobs/impl/SyncQueueManager.java   |  2 +
 .../jobs/impl/SyncQueueManagerImpl.java | 13 -
 3 files changed, 32 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0610bf67/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
--
diff --git 
a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
 
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
index cf0e1f1..ae59848 100644
--- 
a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
+++ 
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
@@ -784,24 +784,6 @@ public class AsyncJobManagerImpl extends ManagerBase 
implements AsyncJobManager,
 return ManagementServerNode.getManagementServerId();
 }
 
-private void cleanupPendingJobs(List l) {
-for (SyncQueueItemVO item : l) {
-if (s_logger.isInfoEnabled()) {
-s_logger.info("Discard left-over queue item: " + 
item.toString());
-}
-
-String contentType = item.getContentType();
-if (contentType != null && 
contentType.equalsIgnoreCase(SyncQueueItem.AsyncJobContentType)) {
-Long jobId = item.getContentId();
-if (jobId != null) {
-s_logger.warn("Mark job as failed as its correspoding 
queue-item has been discarded. job id: " + jobId);
-completeAsyncJob(jobId, JobInfo.Status.FAILED, 0, 
"Execution was cancelled because of server shutdown");
-}
-}
-_queueMgr.purgeItem(item.getId());
-}
-}
-
 @DB
 protected List wakeupByJoinedJobCompletion(long joinedJobId) {
 SearchCriteria joinJobSC = JoinJobSearch.create("joinJobId", 
joinedJobId);
@@ -912,6 +894,22 @@ public class AsyncJobManagerImpl extends ManagerBase 
implements AsyncJobManager,
 return true;
 }
 
+private void cleanupLeftOverJobs(final long msid) {
+try {
+Transaction.execute(new TransactionCallbackNoReturn() {
+@Override
+public void doInTransactionWithoutResult(TransactionStatus 
status) {
+// purge sync queue item running on this ms node
+_queueMgr.cleanupActiveQueueItems(msid, true);
+// reset job status for all jobs running on this ms node
+_jobDao.resetJobProcess(msid, 
ApiErrorCode.INTERNAL_ERROR.getHttpCode(), "job cancelled because of management 
server restart or shutdown");
+}
+});
+} catch (Throwable e) {
+s_logger.warn("Unexpected exception in cleaning up left over jobs 
for mamagement server node " + msid, e);
+}
+}
+
 @Override
 public void onManagementNodeJoined(List 
nodeList, long selfNodeId) {
 }
@@ -919,18 +917,7 @@ public class AsyncJobManagerImpl extends ManagerBase 
implements AsyncJobManager,
 @Override
 public void onManagementNodeLeft(List 
nodeList, long selfNodeId) {
 for (final ManagementServerHost msHost : nodeList) {
-try {
-Transaction.execute(new TransactionCallbackNoReturn() {
-@Override
-public void doInTransactionWithoutResult(TransactionStatus 
status) {
-List items = 
_queueMgr.getActiveQueueItems(msHost.getId(), true);
-cleanupPendingJobs(items);
-_jobDao.resetJobProcess(msHost.getId(), 
ApiErrorCode.INTERNAL_ERROR.getHttpCode(), "job cancelled because of management 
server restart");
-}
-});
-} catch (Throwable e) {
-s_logger.warn("Unexpected exception ", e);
-}
+cleanupLeftOverJobs(msHost.getId());
 }
 }
 
@@ -940,15 +927,7 @@ public cla

[04/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7872: network getting shutdown inspite of running VM's in the network

(cherry picked from commit 709bf074de9f8f22e6a71362551c4867be884e4b)
Signed-off-by: Rohit Yadav 

Conflicts:
engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1e475892
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1e475892
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1e475892

Branch: refs/heads/4.3
Commit: 1e475892d540f5187019f746b2fd83ef6fbcf52d
Parents: 23a03ac
Author: Jayapal 
Authored: Fri Nov 7 09:37:32 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:28:20 2014 +0530

--
 .../com/cloud/network/dao/NetworkDaoImpl.java   |  2 --
 engine/schema/src/com/cloud/vm/dao/NicDao.java  |  2 ++
 .../schema/src/com/cloud/vm/dao/NicDaoImpl.java | 21 
 .../src/com/cloud/network/NetworkModelImpl.java |  7 +++
 4 files changed, 30 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e475892/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java 
b/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
index 90ba4a3..3c6ef4b 100644
--- a/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
@@ -226,7 +226,6 @@ public class NetworkDaoImpl extends 
GenericDaoBase implements N
 GarbageCollectedSearch = createSearchBuilder(Long.class);
 
GarbageCollectedSearch.selectFields(GarbageCollectedSearch.entity().getId());
 SearchBuilder join7 = _ntwkOpDao.createSearchBuilder();
-join7.and("activenics", join7.entity().getActiveNicsCount(), Op.EQ);
 join7.and("gc", join7.entity().isGarbageCollected(), Op.EQ);
 join7.and("check", join7.entity().isCheckForGc(), Op.EQ);
 GarbageCollectedSearch.join("ntwkOpGC", join7, 
GarbageCollectedSearch.entity().getId(), join7.entity().getId(), 
JoinBuilder.JoinType.INNER);
@@ -420,7 +419,6 @@ public class NetworkDaoImpl extends 
GenericDaoBase implements N
 public List findNetworksToGarbageCollect() {
 SearchCriteria sc = GarbageCollectedSearch.create();
 sc.setJoinParameters("ntwkOffGC", "isPersistent", false);
-sc.setJoinParameters("ntwkOpGC", "activenics", 0);
 sc.setJoinParameters("ntwkOpGC", "gc", true);
 sc.setJoinParameters("ntwkOpGC", "check", true);
 return customSearch(sc, null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e475892/engine/schema/src/com/cloud/vm/dao/NicDao.java
--
diff --git a/engine/schema/src/com/cloud/vm/dao/NicDao.java 
b/engine/schema/src/com/cloud/vm/dao/NicDao.java
index 79bd4d2..0f9899a 100644
--- a/engine/schema/src/com/cloud/vm/dao/NicDao.java
+++ b/engine/schema/src/com/cloud/vm/dao/NicDao.java
@@ -73,4 +73,6 @@ public interface NicDao extends GenericDao {
 List listByNetworkIdTypeAndGatewayAndBroadcastUri(long networkId, 
VirtualMachine.Type vmType, String gateway, URI broadcastUri);
 
 int countNicsForStartingVms(long networkId);
+
+int countNicsForRunningVms(long networkId);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e475892/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java 
b/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java
index a7b7625..f00fa8b 100644
--- a/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java
@@ -46,6 +46,7 @@ public class NicDaoImpl extends GenericDaoBase 
implements NicDao {
 private SearchBuilder NonReleasedSearch;
 private GenericSearchBuilder CountBy;
 private GenericSearchBuilder CountByForStartingVms;
+private GenericSearchBuilder CountByForRunningVms;
 
 @Inject
 VMInstanceDao _vmDao;
@@ -95,6 +96,17 @@ public class NicDaoImpl extends GenericDaoBase 
implements NicDao {
 join1.and("state", join1.entity().getState(), Op.EQ);
 CountByForStartingVms.join("vm", join1, 
CountByForStartingVms.entity().getInstanceId(), join1.entity().getId(), 
JoinBuilder.JoinType.INNER);
 CountByForStartingVms.done();
+
+CountByForRunningVms = createSearchBuilder(Integer.class);
+CountByForRunningVms.select(null, Func.COUNT, 
CountByForRunningVms.entity().getId());
+CountByForRunningVms.and("networkId", 
CountByForRunningVms.entity().getNetworkId(), Op.EQ);
+CountByForRunningVms.and("removed

[01/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 bb81082e5 -> b8a28dfae


CLOUDSTACK-7886: cloudstackoperations like deployvm,deleteNW are failing if CS 
fail to contact rabbit mq server. This is happening in case of Async API calls.

Signed-off-by: Koushik Das 
(cherry picked from commit 50a3c0b2e30009579c3692e639d32ea608e9e8f9)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/12d1c945
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/12d1c945
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/12d1c945

Branch: refs/heads/4.3
Commit: 12d1c945f25fd5e6791f61fa2883cddbcd212b2a
Parents: bb81082
Author: Damodar 
Authored: Tue Nov 11 18:16:06 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:11:22 2014 +0530

--
 server/src/com/cloud/api/ApiServer.java | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/12d1c945/server/src/com/cloud/api/ApiServer.java
--
diff --git a/server/src/com/cloud/api/ApiServer.java 
b/server/src/com/cloud/api/ApiServer.java
index 7aac28f..1311879 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -282,11 +282,8 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 try {
 eventBus.publish(event);
 } catch (EventBusException evx) {
-String errMsg = "F" +
-"" +
-"ailed to publish async job event on the the event bus.";
+String errMsg = "Failed to publish async job event on the the 
event bus.";
 s_logger.warn(errMsg, evx);
-throw new CloudRuntimeException(errMsg);
 }
 }
 



[13/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7463: UI: Domain Admin UI shows 'Add LDAP Users' button (should not 
be shown)

Signed-off-by: Rajani Karuturi 
(cherry picked from commit c200ada863dd4a7d5659538e4378c77a3e89d597)
Signed-off-by: Rohit Yadav 

Conflicts:
ui/scripts/accounts.js


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/898b2e70
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/898b2e70
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/898b2e70

Branch: refs/heads/4.3
Commit: 898b2e700e91e127ce89709bdf85500494e88fd1
Parents: dc80b25
Author: Gabor Apati-Nagy 
Authored: Tue Sep 2 10:26:54 2014 +0100
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:29:47 2014 +0530

--
 ui/scripts/accounts.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/898b2e70/ui/scripts/accounts.js
--
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index a15cc87..9d62f72 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -97,7 +97,8 @@
 label: 'Add LDAP Account',
 isHeader: true,
 preFilter: function(args) {
-if ((isAdmin() || isDomainAdmin()) && 
isLdapEnabled()) {
+//if (isAdmin() && true) { //for testing only
+if (isAdmin() && isLdapEnabled()) {
 return true;
 } else {
 return false;



[10/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7679: Bump rabbitmq client library to latest 3.4.1

Signed-off-by: Rohit Yadav 
(cherry picked from commit 6ad2f384265de41751fd3f9c238b82bdbf933cfd)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/33761a31
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/33761a31
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/33761a31

Branch: refs/heads/4.3
Commit: 33761a311b1e4a183f43860f8881ce087b37fcf9
Parents: 1cc58b1
Author: Rohit Yadav 
Authored: Tue Nov 25 19:15:28 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:18:45 2014 +0530

--
 plugins/event-bus/rabbitmq/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/33761a31/plugins/event-bus/rabbitmq/pom.xml
--
diff --git a/plugins/event-bus/rabbitmq/pom.xml 
b/plugins/event-bus/rabbitmq/pom.xml
index 4e8ccfd..0b4450c 100644
--- a/plugins/event-bus/rabbitmq/pom.xml
+++ b/plugins/event-bus/rabbitmq/pom.xml
@@ -31,7 +31,7 @@
 
 com.rabbitmq
   amqp-client
-3.3.5
+3.4.1
 
 
 org.apache.cloudstack



[03/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7877: The NET.IPRELEASE events are not added to usage_event on IP 
range deletion from Physical Networks.

Signed-off-by: Jayapal 
(cherry picked from commit 7e6ec2ce826969aeb79ddb1113cdc45289bc89d3)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/configuration/ConfigurationManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/23a03ac1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/23a03ac1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/23a03ac1

Branch: refs/heads/4.3
Commit: 23a03ac1b05529d23f1a5536f3cf7d28368507e5
Parents: 04acc79
Author: Damodar 
Authored: Tue Nov 11 11:25:03 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:24:33 2014 +0530

--
 .../configuration/ConfigurationManagerImpl.java | 121 ---
 1 file changed, 52 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/23a03ac1/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
--
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java 
b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 41128cd..bc13dc9 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3137,83 +3137,66 @@ ConfigurationManagerImpl extends ManagerBase implements 
ConfigurationManager, Co
 }
 
 // Check if the VLAN has any allocated public IPs
-long allocIpCount = 
_publicIpAddressDao.countIPs(vlanRange.getDataCenterId(), vlanDbId, true);
 List ips = _publicIpAddressDao.listByVlanId(vlanDbId);
-boolean success = true;
-if (allocIpCount > 0) {
-if (isAccountSpecific) {
-try {
-vlanRange = _vlanDao.acquireInLockTable(vlanDbId, 30);
-if (vlanRange == null) {
-throw new CloudRuntimeException("Unable to acquire 
vlan configuration: " + vlanDbId);
-}
-
-if (s_logger.isDebugEnabled()) {
-s_logger.debug("lock vlan " + vlanDbId + " is 
acquired");
-}
-for (IPAddressVO ip : ips) {
-if (ip.isOneToOneNat()) {
-throw new InvalidParameterValueException(
-"Can't delete account specific vlan "
-+ vlanDbId
-+ " as ip "
-+ ip
-+ " belonging to the range is used 
for static nat purposes. Cleanup the rules first");
-}
-
-if (ip.isSourceNat()) {
-throw new InvalidParameterValueException(
-"Can't delete account specific vlan "
-+ vlanDbId
-+ " as ip "
-+ ip
-+ " belonging to the range is a 
source nat ip for the network id="
-+ ip.getSourceNetworkId()
-+ ". IP range with the source nat 
ip address can be removed either as a part of Network, or account removal");
-}
-
-if (_firewallDao.countRulesByIpId(ip.getId()) > 0) {
-throw new InvalidParameterValueException("Can't 
delete account specific vlan " + vlanDbId
-+ " as ip " + ip
-+ " belonging to the range has firewall 
rules applied. Cleanup the rules first");
-}
-// release public ip address here
-success = success && 
_ipAddrMgr.disassociatePublicIpAddress(ip.getId(), userId, caller);
-}
-if (!success) {
-s_logger.warn("Some ip addresses failed to be released 
as a part of vlan " + vlanDbId
-+ " removal");
-}
-else {
-for (IPAddressVO ip : ips) {
-
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_RELEASE, 
acctVln.get(0).getId(), ip
-.getDataCenterId(), ip.getId(), 
ip.getAddress().toString(), ip.isSourceNat(), vlanRange
-.getVlanType

[18/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7144: No GSLB provider is available during assigning load
balancing rule

this fix ensures any bean implementing GslbProvider interface are injected
into GlobalLoadBalancingRulesServiceImpl.

(cherry picked from commit 9dc322d46fa5cfb9abd87c408988abad1219d607)
Signed-off-by: Rohit Yadav 

Conflicts:

server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml

server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b8a28dfa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b8a28dfa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b8a28dfa

Branch: refs/heads/4.3
Commit: b8a28dfae391a4642e06569fbe1c3dbbafa66a69
Parents: 816eb63
Author: Murali Reddy 
Authored: Mon Jul 21 16:48:28 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:50:37 2014 +0530

--
 .../core/spring-core-registry-core-context.xml  |  5 
 ...re-lifecycle-network-context-inheritable.xml |  8 +--
 .../spring-server-core-managers-context.xml |  5 ++--
 .../GlobalLoadBalancingRulesServiceImpl.java| 24 
 ...GlobalLoadBalancingRulesServiceImplTest.java |  4 +++-
 5 files changed, 32 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b8a28dfa/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
--
diff --git 
a/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml 
b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
index 5e799c0..a10bbb3 100644
--- 
a/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
+++ 
b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
@@ -229,6 +229,11 @@
 
 
 
+
+
+
+
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b8a28dfa/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
--
diff --git 
a/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
 
b/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
index a54d588..76cdfe3 100644
--- 
a/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
+++ 
b/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
@@ -96,5 +96,9 @@
 
 
-
-
\ No newline at end of file
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b8a28dfa/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
--
diff --git 
a/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
 
b/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
index 31f31cd..a5f9a0b 100644
--- 
a/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
+++ 
b/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
@@ -231,7 +231,8 @@
 
 
 
-
+
class="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" >
+
+
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b8a28dfa/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
--
diff --git 
a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
 
b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
index 62b9748..d4275d4 100644
--- 
a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
+++ 
b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
@@ -85,9 +85,10 @@ public class GlobalLoadBalancingRulesServiceImpl implements 
GlobalLoadBalancingR
 @Inject
 AgentManager _agentMgr;
 
-protected GslbServiceProvider _gslbProvider=null;
-public void setGslbServiceProvider(GslbServiceProvider provider) {
-this._gslbProvider = provider;
+protected List _gslbProviders;
+
+public void setGslbServiceProviders(List providers) {
+_gslbProviders = providers;
 }
 
 @Override
@@ -663,8 +664,8 @@ public class GlobalLoadBalancingRulesServiceImpl implements 
GlobalLoadBalancingR
 ip.getAddress().addr(), 
Integer.toString(loadBalancer.getDefaul

[02/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7884: Cloudstack MS is not responding (happening randomly) after 
some restart.

(cherry picked from commit 2ef06e754b8fd41e1af1f9bce0b2f828d7fcfb95)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/04acc79b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/04acc79b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/04acc79b

Branch: refs/heads/4.3
Commit: 04acc79b2d572bbc34f435c9d9f03c79561820d8
Parents: 12d1c94
Author: Min Chen 
Authored: Fri Oct 31 17:20:16 2014 -0700
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:21:12 2014 +0530

--
 .../cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04acc79b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
--
diff --git 
a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
 
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
index e2f9cbf..cf0e1f1 100644
--- 
a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
+++ 
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
@@ -60,6 +60,7 @@ import com.cloud.cluster.ManagementServerHost;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.Pair;
 import com.cloud.utils.Predicate;
+import com.cloud.utils.component.ComponentLifecycle;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.DB;
@@ -970,7 +971,9 @@ public class AsyncJobManagerImpl extends ManagerBase 
implements AsyncJobManager,
 private GenericSearchBuilder JoinJobTimeSearch;
 
 protected AsyncJobManagerImpl() {
-
+// override default run level for manager components to start this 
early, otherwise, VirtualMachineManagerImpl will
+// get stuck in non-initializing job queue
+setRunLevel(ComponentLifecycle.RUN_LEVEL_FRAMEWORK);
 }
 
 private void publishOnEventBus(AsyncJob job, String jobEvent) {



[12/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7581: Empty 'ID' parameters allowed in API calls

Fix is to fail API calls with empty 'id' parameter value upfront rather than
going ahead and failing with NPE later on.

Backported using fix 4e07dd1dc4b4618fff2ef25c846ce6b95a8e580d by
Koushik Das 

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dc80b253
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dc80b253
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dc80b253

Branch: refs/heads/4.3
Commit: dc80b25361e22845fafaaf28489cef9250ef2b05
Parents: 0610bf6
Author: Rohit Yadav 
Authored: Tue Nov 25 19:24:29 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:24:29 2014 +0530

--
 server/src/com/cloud/api/ApiDispatcher.java | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc80b253/server/src/com/cloud/api/ApiDispatcher.java
--
diff --git a/server/src/com/cloud/api/ApiDispatcher.java 
b/server/src/com/cloud/api/ApiDispatcher.java
index 9624c61..6fe031a 100755
--- a/server/src/com/cloud/api/ApiDispatcher.java
+++ b/server/src/com/cloud/api/ApiDispatcher.java
@@ -482,8 +482,6 @@ public class ApiDispatcher {
 field.set(cmdObj, listParam);
 break;
 case UUID:
-if (paramObj.toString().isEmpty())
-break;
 Long internalId = 
translateUuidToInternalId(paramObj.toString(), annotation);
 field.set(cmdObj, internalId);
 break;



[16/18] git commit: updated refs/heads/4.3 to b8a28df

2014-11-25 Thread bhaisaab
CLOUDSTACK-7293: UI: Fixed localization issues on the login page

- Reverted the validator.messages to the original values (jquery.validator.js).
- Added a function to localize validator.messages which is called before login.

Signed-off-by: Brian Federle 
(cherry picked from commit f212aa57c32eb05d6a69730e37ac50bdb1f0a268)
Signed-off-by: Rohit Yadav 

Conflicts:
ui/scripts/cloudStack.js


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb6987c3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb6987c3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb6987c3

Branch: refs/heads/4.3
Commit: eb6987c393597fa0fb74ebff76c8360b4df5328a
Parents: fa300f9
Author: Mihaela Stoica 
Authored: Fri Aug 8 15:19:50 2014 +0100
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:36:08 2014 +0530

--
 ui/scripts/cloudStack.js |  9 ++---
 ui/scripts/ui/utils.js   | 25 +
 2 files changed, 31 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb6987c3/ui/scripts/cloudStack.js
--
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 5195a7b..0a20aa8 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -474,8 +474,6 @@
 loginArgs.hideLoginScreen = true;
 }
 
-cloudStack.uiCustom.login(loginArgs);
-
 // Localization
 if (!$.isFunction(cloudStack.localizationFn)) { // i.e., localize is 
overridden by a plugin/module
 cloudStack.localizationFn = function(str) {
@@ -483,6 +481,11 @@
 };
 }
 
-document.title = _l('label.app.name');
+// Localize validation messages
+cloudStack.localizeValidatorMessages();
+
+cloudStack.uiCustom.login(loginArgs);
+
+document.title = _l('label.app.name');
 });
 })(cloudStack, jQuery);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb6987c3/ui/scripts/ui/utils.js
--
diff --git a/ui/scripts/ui/utils.js b/ui/scripts/ui/utils.js
index 769aea7..542365a 100644
--- a/ui/scripts/ui/utils.js
+++ b/ui/scripts/ui/utils.js
@@ -120,4 +120,29 @@
 return str;
 }
 };
+
+/**
+ * Localize validator messages
+ */
+cloudStack.localizeValidatorMessages = function() {
+$.extend($.validator.messages, {
+required: _l('message.validate.fieldrequired'),
+remote: _l('message.validate.fixfield'),
+email: _l('message.validate.email.address'),
+url: _l('message.validate.URL'),
+date: _l('message.validate.date'),
+dateISO: _l('message.validate.date.ISO'),
+number: _l('message.validate.number'),
+digits: _l('message.validate.digits'),
+creditcard: _l('message.validate.creditcard'),
+equalTo: _l('message.validate.equalto'),
+accept: _l('message.validate.accept'),
+maxlength: $.validator.format(_l('message.validate.maxlength')),
+minlength: $.validator.format(_l('message.validate.minlength')),
+rangelength: 
$.validator.format(_l('message.validate.range.length')),
+range: $.validator.format(_l('message.validate.range')),
+max: $.validator.format(_l('message.validate.max')),
+min: $.validator.format(_l('messgae.validate.min'))
+});
+};
 })(jQuery, cloudStack);



git commit: updated refs/heads/4.3 to f72eb94

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 b8a28dfae -> f72eb9455


CHANGES: update list of backported bugfixes

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f72eb945
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f72eb945
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f72eb945

Branch: refs/heads/4.3
Commit: f72eb945540e607ff25917922b4084187246f31a
Parents: b8a28df
Author: Rohit Yadav 
Authored: Tue Nov 25 20:34:11 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 20:34:11 2014 +0530

--
 CHANGES.md | 24 
 1 file changed, 24 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f72eb945/CHANGES.md
--
diff --git a/CHANGES.md b/CHANGES.md
index 90bd557..b501195 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -44,6 +44,30 @@ This is a bug fix release. The following issues were fixed:
 CLOUDSTACK-6466: cpu and ram is not getting updated correctly in 
usage_vm_instance table for usage type 2
 CLOUDSTACK-6669: Support volume resize in usage server
 CLOUDSTACK-6669: Fix support resize in usage server
+CLOUDSTACK-6743: Use edge-triggering in MessageDetector to handle bogus 
wakeup gracefully. Level triggering plus bogus wakeup can cause a tight loop to 
spin
+CLOUDSTACK-6075: Increase the ram size for router service offering
+CLOUDSTACK-7966: remove snapshot_store_ref entry, in which role is 
Primary, during storage GC
+CLOUDSTACK-7917: Validating Load Balancer Rule when updating LB + unit test
+CLOUDSTACK-7915: Remove hard-coded values for Load Balancer algorithms in 
UI
+CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc
+CLOUDSTACK-7886: cloudstackoperations like deployvm,deleteNW are failing 
if CS fail to contact rabbit mq server. This is happening in case of Async API 
calls.
+CLOUDSTACK-7884: Cloudstack MS is not responding (happening randomly) 
after some restart.
+CLOUDSTACK-7877: The NET.IPRELEASE events are not added to usage_event on 
IP range deletion from Physical Networks.
+CLOUDSTACK-7872: network getting shutdown inspite of running VM's in the 
network
+CLOUDSTACK-7869: Add simulator support for findHostsForMigration API
+CLOUDSTACK-7849: Sorting projects alphabetically in drop down menu
+CLOUDSTACK-7837: [UI] Make the Source CIDR column wide enough to fit the 
CIDR value without ellipsizing
+CLOUDSTACK-7766: Field Validations Missing for Ingress and Egress Rules
+CLOUDSTACK-7700: Volume Snapshot Async Job returns Success for a failed 
operation
+CLOUDSTACK-7679: Bump rabbitmq client library to latest 3.4.1
+CLOUDSTACK-7589: VM not Starting and always stuck in Stopped state after 
management server restarts.
+CLOUDSTACK-7581: Empty 'ID' parameters allowed in API calls
+CLOUDSTACK-7463: UI: Domain Admin UI shows 'Add LDAP Users' button (should 
not be shown)
+CLOUDSTACK-7319: dd with direct io is less impacting on Dom0 kernel 
resources
+CLOUDSTACK-7302: UI: Remove Hover Interaction from breadcrumbs at top page
+CLOUDSTACK-7293: UI: Fixed localization issues on the login page
+CLOUDSTACK-7191:On restartNetwork destroy the VR immediatley, instead of 
cleanup the rules then destroy
+CLOUDSTACK-7144: No GSLB provider is available during assigning load 
balancing rule
 
 Version 4.3.1
 -



[01/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 f72eb9455 -> 67df5b9da


CLOUDSTACK-7129: Non-admin user can use deleteNetwork with shared
networks

fix ensures only admin users can delete shared network

(cherry picked from commit 2f293f42d567b1218cb083250707eeffc5324dc3)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/30dd76fc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/30dd76fc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/30dd76fc

Branch: refs/heads/4.3
Commit: 30dd76fc6540c307d5caa26ddb056f60a379cc80
Parents: f72eb94
Author: Murali Reddy 
Authored: Fri Jul 18 17:51:02 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 22:36:55 2014 +0530

--
 server/src/com/cloud/network/NetworkServiceImpl.java | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/30dd76fc/server/src/com/cloud/network/NetworkServiceImpl.java
--
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java 
b/server/src/com/cloud/network/NetworkServiceImpl.java
index 8bae584..d3f3946 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -1797,6 +1797,11 @@ public class NetworkServiceImpl extends ManagerBase 
implements NetworkService {
 
 Account owner = _accountMgr.getAccount(network.getAccountId());
 
+// Only Admin can delete Shared networks
+if (network.getGuestType() == GuestType.Shared && 
!_accountMgr.isAdmin(caller.getId())) {
+throw new InvalidParameterValueException("Only Admins can delete 
network with guest type " + GuestType.Shared);
+}
+
 // Perform permission check
 _accountMgr.checkAccess(caller, null, true, network);
 



[08/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
add conntrackd logrotate for systemvms, dont start conntrackd on logrotate if 
it isnt running

(cherry picked from commit df4a21ae3dbb8bd4dad0bdb759990e9b90a9dc09)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6ad3ae78
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6ad3ae78
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6ad3ae78

Branch: refs/heads/4.3
Commit: 6ad3ae78e4695440cc347c50726672a5133d8faf
Parents: cd77e70
Author: Marcus Sorensen 
Authored: Sat Apr 5 00:30:28 2014 -0600
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:02:52 2014 +0530

--
 .../patches/debian/config/etc/logrotate.d/conntrackd   | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ad3ae78/systemvm/patches/debian/config/etc/logrotate.d/conntrackd
--
diff --git a/systemvm/patches/debian/config/etc/logrotate.d/conntrackd 
b/systemvm/patches/debian/config/etc/logrotate.d/conntrackd
new file mode 100644
index 000..d09d752
--- /dev/null
+++ b/systemvm/patches/debian/config/etc/logrotate.d/conntrackd
@@ -0,0 +1,13 @@
+/var/log/conntrackd-stats.log {
+daily
+rotate 2
+missingok
+compress
+delaycompress
+
+postrotate
+if [ -e /var/run/conntrackd.sock ]; then
+invoke-rc.d conntrackd restart > /dev/null
+fi
+endscript
+}



[02/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6996 Adding cluster to legacy zone failed
Lookup zone_id field in legacy_zones table to search the table for legacy zone.
Signed-off-by: Sateesh Chodapuneedi 

(cherry picked from commit 71f76edf71d155e14500f222d81c82ce03397dbf)
Signed-off-by: Rohit Yadav 

Conflicts:

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/96e14f30
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/96e14f30
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/96e14f30

Branch: refs/heads/4.3
Commit: 96e14f309ea71b212e4ad99b402c289c819d4dc9
Parents: 30dd76f
Author: Sateesh Chodapuneedi 
Authored: Fri Jun 27 14:01:39 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 22:42:13 2014 +0530

--
 .../src/com/cloud/hypervisor/vmware/dao/LegacyZoneDao.java | 2 +-
 .../src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java | 6 +++---
 .../com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96e14f30/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDao.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDao.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDao.java
index 290f1af..882084b 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDao.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDao.java
@@ -27,7 +27,7 @@ public interface LegacyZoneDao extends 
GenericDao {
  * @param zoneId - id of zone
  * @return Object of legacy zone (LegacyZoneVO) identified by zoneId
  */
-LegacyZoneVO findByZoneId(String zoneId);
+LegacyZoneVO findByZoneId(Long zoneId);
 
 /**
  * Lists all legacy CloudStack zones

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96e14f30/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
index 20d68b0..dc121a1 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
@@ -51,16 +51,16 @@
  }
 
  @Override
- public LegacyZoneVO findByZoneId(String zoneId) {
+ public LegacyZoneVO findByZoneId(Long zoneId) {
  SearchCriteria sc = zoneSearch.create();
  sc.setParameters("zoneId", zoneId);
  return findOneBy(sc);
  }
 
  @Override
-public List listAllLegacyZones() {
+ public List listAllLegacyZones() {
 SearchCriteria sc = fullTableSearch.create();
 return search(sc, null);
-}
+ }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96e14f30/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index 028fa94..ce794b1 100755
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -1240,7 +1240,7 @@ public class VmwareManagerImpl extends ManagerBase 
implements VmwareManager, Vmw
 @Override
 public boolean isLegacyZone(long dcId) {
 boolean isLegacyZone = false;
-LegacyZoneVO legacyZoneVo = _legacyZoneDao.findById(dcId);
+LegacyZoneVO legacyZoneVo = _legacyZoneDao.findByZoneId(dcId);
 if (legacyZoneVo != null) {
 isLegacyZone = true;
 }



[13/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-5907, CLOUDSTACK-6396: KVM/RBD & KVM/CLVM volumes mistakenly shown 
as OVM, disables snapshotting

modified:   server/src/com/cloud/api/ApiDBUtils.java

Signed-off-by: Daan Hoogland 
(cherry picked from commit 601827e6b34cb7debe67a8415a09440c389ba4a1)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5ac44896
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5ac44896
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5ac44896

Branch: refs/heads/4.3
Commit: 5ac44896c8ad2e5838f91b841d9d041790d17775
Parents: af79d6a
Author: Tanner Danzey 
Authored: Mon Apr 14 16:52:05 2014 -0500
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:17:09 2014 +0530

--
 server/src/com/cloud/api/ApiDBUtils.java | 22 ++
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5ac44896/server/src/com/cloud/api/ApiDBUtils.java
--
diff --git a/server/src/com/cloud/api/ApiDBUtils.java 
b/server/src/com/cloud/api/ApiDBUtils.java
index 2617097..1df872e 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -19,6 +19,7 @@ package com.cloud.api;
 import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
 
@@ -233,6 +234,7 @@ import com.cloud.storage.ImageStore;
 import com.cloud.storage.Snapshot;
 import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.Storage.ImageFormat;
+import com.cloud.storage.Storage.StoragePoolType;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePool;
 import com.cloud.storage.StorageStats;
@@ -969,6 +971,26 @@ public class ApiDBUtils {
 if (xenClusters.isEmpty()) {
 type = HypervisorType.Hyperv;
 }
+} if (format == ImageFormat.RAW) {
+// Currently, KVM only suppoorts RBD images of type RAW.
+// This results in a weird collision with OVM volumes which
+// can only be raw, thus making KVM RBD volumes show up as OVM
+// rather than RBD. This block of code can (hopefuly) by checking 
to
+// see if the pool is using either RBD or NFS. However, it isn't
+// quite clear what to do if both storage types are used. If the 
image
+// format is RAW, it narrows the hypervisor choice down to OVM and 
KVM / RBD or KVM / CLVM
+// This would be better implemented at a cluster level.
+List pools = 
s_storagePoolDao.listByDataCenterId(dcId);
+ListIterator itr = pools.listIterator();
+while(itr.hasNext()) {
+StoragePoolVO pool = itr.next();
+if(pool.getPoolType() == StoragePoolType.RBD || 
pool.getPoolType() == StoragePoolType.CLVM) {
+  // This case will note the presence of non-qcow2 primary 
stores, suggesting KVM without NFS. Otherwse,
+  // If this check is not passed, the hypervisor type will 
remain OVM.
+  type = HypervisorType.KVM;
+  break;
+}
+}
 }
 return type;
 }



[19/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6322 - Don't allow service instance creation with empty or null 
service-instance "name".

Signed-off-by: Daan Hoogland 
(cherry picked from commit 085911f0a6c256c5f2a439ec0bf79b5027cdc078)
Signed-off-by: Rohit Yadav 

Conflicts:

plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/df6172f9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/df6172f9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/df6172f9

Branch: refs/heads/4.3
Commit: df6172f93846455bb3eba2930bdfcce52dc21104
Parents: 192c706
Author: Sachchidanand Vaidya 
Authored: Wed Apr 2 01:57:07 2014 -0700
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:42:28 2014 +0530

--
 .../contrail/api/command/CreateServiceInstanceCmd.java| 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df6172f9/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
--
diff --git 
a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
 
b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
index 62ab317..9d0e942 100644
--- 
a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
+++ 
b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/api/command/CreateServiceInstanceCmd.java
@@ -90,7 +90,8 @@ public class CreateServiceInstanceCmd extends 
BaseAsyncCreateCmd {
 description = "The service offering ID that defines the resources 
consumed by the service appliance")
 private Long serviceOfferingId;
 
-@Parameter(name = ApiConstants.NAME, type = CommandType.STRING)
+@Parameter(name = ApiConstants.NAME, type = CommandType.STRING,
+   required = true, description = "The name of the service 
instance")
 private String name;
 
 /// Implementation
@@ -126,6 +127,10 @@ public class CreateServiceInstanceCmd extends 
BaseAsyncCreateCmd {
 throw new InvalidParameterValueException("Invalid ID for right 
network " + rightNetworkId);
 }
 
+if (name.isEmpty()) {
+throw new InvalidParameterValueException("service instance 
name is empty");
+}
+
 ServiceVirtualMachine svm = 
_vrouterService.createServiceInstance(zone, owner, template, serviceOffering,
   
name, left, right);
 if (svm == null) {



[15/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6374: Remove entries from lb vm map when lb rule apply fails

(cherry picked from commit 16ab5ce76c68c2a6c813daec9cd2c90d4c5eb8c6)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/473cd6f0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/473cd6f0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/473cd6f0

Branch: refs/heads/4.3
Commit: 473cd6f09aad812d8fe61bcb8ad1d3571e5eb50b
Parents: 7b7eb48
Author: Kishan Kavala 
Authored: Thu Apr 10 14:41:52 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:19:14 2014 +0530

--
 .../lb/LoadBalancingRulesManagerImpl.java   | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/473cd6f0/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
--
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java 
b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index cdb38f0..6bc2da5 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -1061,7 +1061,10 @@ public class LoadBalancingRulesManagerImpl extends 
ManagerBase implements
 applyLoadBalancerConfig(loadBalancerId);
 success = true;
 } catch (ResourceUnavailableException e) {
-if (isRollBackAllowedForProvider(loadBalancer)) {
+s_logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+success = false;
+} finally {
+if (!success) {
 final List vmInstanceIds = new ArrayList();
 Transaction.execute(new TransactionCallbackNoReturn() {
 @Override
@@ -1078,17 +1081,14 @@ public class LoadBalancingRulesManagerImpl 
extends ManagerBase implements
 }
 loadBalancer.setState(backupState);
 _lbDao.persist(loadBalancer);
+CloudRuntimeException ex = new CloudRuntimeException("Failed 
to add specified loadbalancerruleid for vms "
++ instanceIds);
+ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
+// TBD: Also pack in the instanceIds in the exception using the
+// right VO object or table name.
+throw ex;
 }
-s_logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
-}
 
-if (!success) {
-CloudRuntimeException ex = new CloudRuntimeException("Failed to 
add specified loadbalancerruleid for vms "
-+ instanceIds);
-ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
-// TBD: Also pack in the instanceIds in the exception using the
-// right VO object or table name.
-throw ex;
 }
 
 return success;



[16/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6365: support virtual host and ssl in rabbitMQ event bus

with this fix, virtual host on the AMQP server can be specified. Also
SSL can be used for connection between management server and AMQP
servers.

(cherry picked from commit bc17f177760b3b61f1df7ed9728738ffe64896d5)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/62ae7685
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/62ae7685
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/62ae7685

Branch: refs/heads/4.3
Commit: 62ae768540c451c098fb2dd90d718add7d822c4c
Parents: 473cd6f
Author: Murali Reddy 
Authored: Wed Apr 9 17:32:16 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:21:23 2014 +0530

--
 .../mom/rabbitmq/RabbitMQEventBus.java  | 29 +++-
 1 file changed, 28 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/62ae7685/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
--
diff --git 
a/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
 
b/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
index 478c8d7..30b4475 100644
--- 
a/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
+++ 
b/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
@@ -48,6 +48,18 @@ public class RabbitMQEventBus extends ManagerBase implements 
EventBus {
 private static String username;
 private static String password;
 
+public static void setVirtualHost(String virtualHost) {
+RabbitMQEventBus.virtualHost = virtualHost;
+}
+
+private static String virtualHost;
+
+public static void setUseSsl(String useSsl) {
+RabbitMQEventBus.useSsl = useSsl;
+}
+
+private static String useSsl;
+
 // AMQP exchange name where all CloudStack events will be published
 private static String amqpExchangeName;
 
@@ -92,6 +104,12 @@ public class RabbitMQEventBus extends ManagerBase 
implements EventBus {
 throw new ConfigurationException("Unable to get the port 
details of AMQP server");
 }
 
+if (useSsl != null && !useSsl.isEmpty()) {
+if (!useSsl.equalsIgnoreCase("true") && 
!useSsl.equalsIgnoreCase("false")) {
+throw new ConfigurationException("Invalid configuration 
parameter for 'ssl'.");
+}
+}
+
 if (retryInterval == null) {
 retryInterval = 1;// default to 10s to try out reconnect
 }
@@ -341,9 +359,18 @@ public class RabbitMQEventBus extends ManagerBase 
implements EventBus {
 ConnectionFactory factory = new ConnectionFactory();
 factory.setUsername(username);
 factory.setPassword(password);
-factory.setVirtualHost("/");
 factory.setHost(amqpHost);
 factory.setPort(port);
+
+if (virtualHost != null && !virtualHost.isEmpty()) {
+factory.setVirtualHost(virtualHost);
+} else {
+factory.setVirtualHost("/");
+}
+
+if (useSsl != null && !useSsl.isEmpty() && 
useSsl.equalsIgnoreCase("true")) {
+factory.useSslProtocol();
+}
 Connection connection = factory.newConnection();
 connection.addShutdownListener(disconnectHandler);
 _connection = connection;



[03/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6989: Add 3 strikes rule for RvR freezing detection

Sometime in VR ntpd would move time backward to keep sync with NTP server, which
can result in false alarm of keepalived monitering process.

This patch adds 3 strikes for keepalived process dead detection to avoid falsely
shutdown keepalived process due to time adjustment for only once.

(cherry picked from commit 75c9a20c7773c268c02fb006d1a7820cb427c94c)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7f1dd864
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7f1dd864
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7f1dd864

Branch: refs/heads/4.3
Commit: 7f1dd86443d7ef55f4ce82b4174c17e00c545df9
Parents: 96e14f3
Author: Sheng Yang 
Authored: Tue Jun 24 16:58:55 2014 -0700
Committer: Rohit Yadav 
Committed: Tue Nov 25 22:42:55 2014 +0530

--
 .../root/redundant_router/check_heartbeat.sh.templ   | 15 +++
 1 file changed, 15 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7f1dd864/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
--
diff --git 
a/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ 
b/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
index 95cabd6b..d6bdc5d 100755
--- 
a/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
+++ 
b/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ
@@ -17,13 +17,28 @@
 # under the License.
 
 
+STRIKE_FILE="[RROUTER_BIN_PATH]/keepalived.strikes"
+
 if [ -e [RROUTER_BIN_PATH]/keepalived.ts2 ]
 then
 lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2)
 thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts)
 diff=$(($thistime - $lasttime))
+s=0
 if [ $diff -lt 30 ]
 then
+if [ -e $STRIKE_FILE ]
+then
+s=`cat $STRIKE_FILE 2>/dev/null`
+fi
+s=$(($s+1))
+echo $s > $STRIKE_FILE
+else
+rm $STRIKE_FILE
+fi
+#3 strikes rule
+if [ $s -gt 2 ]
+then
 echo Keepalived process is dead! >> [RROUTER_LOG]
 [RROUTER_BIN_PATH]/services.sh stop >> [RROUTER_LOG] 2>&1
 [RROUTER_BIN_PATH]/disable_pubip.sh >> [RROUTER_LOG] 2>&1



[07/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6714: monitor script echo service command is added with quotes

(cherry picked from commit 6052a181d7ca5f7c425d56d3eca55fba4aa5)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cd77e702
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cd77e702
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cd77e702

Branch: refs/heads/4.3
Commit: cd77e702cfa5767b6c3d8f3eec8293ba800ae607
Parents: df7be28
Author: Jayapal 
Authored: Tue May 20 11:11:15 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 22:55:18 2014 +0530

--
 systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd77e702/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
--
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh 
b/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
index 809c5b7..6741c47 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
@@ -45,7 +45,7 @@ processname=$(echo $s | cut -d: -f2);
 service_name=$(echo $s | cut -d: -f3);
 pidfile=$(echo $s | cut -d: -f4);
 
-echo $service >> $configFile;
+echo "$service" >> $configFile;
 echo $processname >> $configFile
 echo $service_name >> $configFile
 echo $pidfile >> $configFile



[05/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6869: SSH Public key content is overridden by template's meta data 
when you create a instance

(cherry picked from commit 522208dec2f81997c8b14d820c4f3f1be958ee44)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/template/TemplateManagerImpl.java
server/src/com/cloud/vm/UserVmManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8992e188
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8992e188
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8992e188

Branch: refs/heads/4.3
Commit: 8992e1883647aea65a22f69d7f514d0a7fab389b
Parents: bad40a7
Author: Harikrishna Patnala 
Authored: Wed Jun 11 16:33:00 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 22:50:03 2014 +0530

--
 server/src/com/cloud/template/TemplateManagerImpl.java |  3 ++-
 server/src/com/cloud/vm/UserVmManagerImpl.java | 11 ++-
 2 files changed, 8 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8992e188/server/src/com/cloud/template/TemplateManagerImpl.java
--
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java 
b/server/src/com/cloud/template/TemplateManagerImpl.java
index 7727061..3dd91f4 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -1700,7 +1700,8 @@ public class TemplateManagerImpl extends ManagerBase 
implements TemplateManager,
 }
 }
 }
-if(cmd.getDetails() != null) {
+if (cmd.getDetails() != null) {
+details.remove("Encrypted.Password"); // new password will be 
generated during vm deployment from password enabled template
 details.putAll(cmd.getDetails());
 }
 if( !details.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8992e188/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 a40af6e..e6390a0 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2989,6 +2989,12 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Vir
 hostName, diskOfferingId);
 vm.setUuid(uuidName);
 vm.setDynamicallyScalable(template.isDynamicallyScalable());
+
+Map details = template.getDetails();
+if (details != null && !details.isEmpty()) {
+vm.details.putAll(details);
+}
+
 if (sshPublicKey != null) {
 vm.setDetail("SSH.PublicKey", sshPublicKey);
 }
@@ -3038,11 +3044,6 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Vir
 }
 }
 
-Map details = template.getDetails();
-if ( details != null && !details.isEmpty() ) {
-vm.details.putAll(details);
-}
-
 _vmDao.persist(vm);
 if (customParameters != null && customParameters.size() > 0) {
 for (String key : customParameters.keySet()) {



[20/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CHANGES: updates changes files, fix cherry-picked commits that break semantics

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/67df5b9d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/67df5b9d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/67df5b9d

Branch: refs/heads/4.3
Commit: 67df5b9dadfb7f524576edfe001b558b9123f5a0
Parents: df6172f
Author: Rohit Yadav 
Authored: Wed Nov 26 00:34:14 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 00:34:14 2014 +0530

--
 CHANGES.md   | 19 ++-
 .../kvm/storage/LibvirtStorageAdaptor.java   |  3 +--
 server/src/com/cloud/api/ApiDBUtils.java |  2 +-
 .../com/cloud/network/NetworkServiceImpl.java|  2 +-
 4 files changed, 21 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67df5b9d/CHANGES.md
--
diff --git a/CHANGES.md b/CHANGES.md
index b501195..1399abc 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -66,8 +66,25 @@ This is a bug fix release. The following issues were fixed:
 CLOUDSTACK-7319: dd with direct io is less impacting on Dom0 kernel 
resources
 CLOUDSTACK-7302: UI: Remove Hover Interaction from breadcrumbs at top page
 CLOUDSTACK-7293: UI: Fixed localization issues on the login page
-CLOUDSTACK-7191:On restartNetwork destroy the VR immediatley, instead of 
cleanup the rules then destroy
+CLOUDSTACK-7191: On restartNetwork destroy the VR immediatley, instead of 
cleanup the rules then destroy
 CLOUDSTACK-7144: No GSLB provider is available during assigning load 
balancing rule
+CLOUDSTACK-7129: Non-admin user can use deleteNetwork with shared networks
+CLOUDSTACK-6996: Adding cluster to legacy zone failed
+CLOUDSTACK-6989: Add 3 strikes rule for RvR freezing detection
+CLOUDSTACK-6908: Enable IPv6 in sysctl when only necessary
+CLOUDSTACK-6869: SSH Public key content is overridden by template's meta 
data when you create a instance
+CLOUDSTACK-6783: Return a proper LibvirtStoragePool object after creating 
the pool
+CLOUDSTACK-6714: monitor script echo service command is added with quotes
+CLOUDSTACK-6578: Fixed issue in delete remote access vpn command
+CLOUDSTACK-6577: Disable service monitoring in RVR
+CLOUDSTACK-6516: In 4.3, SSL was turned off by default.
+CLOUDSTACK-6467: Add pre/post-state transition status to messages 
published on
+CLOUDSTACK-5907, CLOUDSTACK-6396: KVM/RBD & KVM/CLVM volumes mistakenly 
shown as OVM, disables snapshotting
+CLOUDSTACK-6376: Return empty list when network tier has no ACL list 
associated.
+CLOUDSTACK-6374: Remove entries from lb vm map when lb rule apply fails
+CLOUDSTACK-6365: support virtual host and ssl in rabbitMQ event bus
+CLOUDSTACK-6328: run.sh check if an existing java process is running, 
before spawining new ones
+CLOUDSTACK-6322 - Don't allow service instance creation with empty or null 
service-instance "name".
 
 Version 4.3.1
 -

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67df5b9d/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 2925b6f..768073e 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
@@ -545,8 +545,7 @@ public class LibvirtStorageAdaptor implements 
StorageAdaptor {
 pool.setLocalPath("");
 }
 
-if (pool.getType() == StoragePoolType.RBD
- || pool.getType() == StoragePoolType.Gluster) {
+if (pool.getType() == StoragePoolType.RBD) {
 pool.setSourceHost(spd.getSourceHost());
 pool.setSourcePort(spd.getSourcePort());
 pool.setSourceDir(spd.getSourceDir());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67df5b9d/server/src/com/cloud/api/ApiDBUtils.java
--
diff --git a/server/src/com/cloud/api/ApiDBUtils.java 
b/server/src/com/cloud/api/ApiDBUtils.java
index 1df872e..54db329 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -980,7 +980,7 @@ public class ApiDBUtils {
 // quite clear what to do if both storage types are used. If the 
image
   

[14/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6376: Return empty list when network tier has no ACL list associated.

(cherry picked from commit 26746feb39da6483059be7b33a2d5cd41f042c78)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7b7eb482
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7b7eb482
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7b7eb482

Branch: refs/heads/4.3
Commit: 7b7eb48281ed79dab7cabb512554b05ec7ae6da2
Parents: 5ac4489
Author: Kishan Kavala 
Authored: Tue Mar 4 11:18:09 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:17:58 2014 +0530

--
 server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7b7eb482/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
--
diff --git a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java 
b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
index 37f1c39..28d8776 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
@@ -515,6 +515,11 @@ public class NetworkACLServiceImpl extends ManagerBase 
implements NetworkACLServ
 if (networkId != null) {
 Network network = _networkDao.findById(networkId);
 aclId = network.getNetworkACLId();
+if( aclId == null){
+// No aclId associated with the network.
+//Return empty list
+return new Pair(new ArrayList(), 0);
+}
 }
 
 if (trafficType != null) {



[18/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6328: added license header and removed white space

(cherry picked from commit d093a8a7b4a922773004fd501c3addde5f02810c)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/192c7061
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/192c7061
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/192c7061

Branch: refs/heads/4.3
Commit: 192c70616457b93559cda64f26a537ea57da4c2e
Parents: 650464e
Author: Jayapal 
Authored: Tue May 27 14:30:12 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:37:28 2014 +0530

--
 systemvm/scripts/run.sh   |  2 +-
 systemvm/scripts/utils.sh | 19 ++-
 2 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/192c7061/systemvm/scripts/run.sh
--
diff --git a/systemvm/scripts/run.sh b/systemvm/scripts/run.sh
index b6a3a27..76e89a8 100755
--- a/systemvm/scripts/run.sh
+++ b/systemvm/scripts/run.sh
@@ -34,7 +34,7 @@ LOCKFILE=$LOCKDIR/$PROGNAME.xlock
 lock $LOCKFILE $LOCKFD
 if [ $? -eq 1 ];then
   exit 1
-fi 
+fi
 
 while true
 do

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/192c7061/systemvm/scripts/utils.sh
--
diff --git a/systemvm/scripts/utils.sh b/systemvm/scripts/utils.sh
index 4d55fc7..bdd85f0 100644
--- a/systemvm/scripts/utils.sh
+++ b/systemvm/scripts/utils.sh
@@ -1,4 +1,21 @@
-#!/bin/bash
+#!/usr/bin/env bash
+# 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.
+
 
 CLOUDSTACK_HOME="/usr/local/cloud"
 



[04/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6908: Enable IPv6 in sysctl when only necessary

This new way would only enable IPv6 when VR is created in IPv6 shared network.
Otherwise IPv6 sysctl options remain disable.

(cherry picked from commit c181485ae596f49d9dfd8b78f4184ab7fcad6a8a)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bad40a74
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bad40a74
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bad40a74

Branch: refs/heads/4.3
Commit: bad40a74812c929ca643accaa6485516a5e0b309
Parents: 7f1dd86
Author: Sheng Yang 
Authored: Fri Jun 13 11:05:35 2014 -0700
Committer: Rohit Yadav 
Committed: Tue Nov 25 22:45:58 2014 +0530

--
 systemvm/patches/debian/config/etc/init.d/cloud-early-config | 1 +
 systemvm/patches/debian/config/etc/sysctl.conf   | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bad40a74/systemvm/patches/debian/config/etc/init.d/cloud-early-config
--
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config 
b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 4783ec2..8cc927f 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -387,6 +387,7 @@ setup_interface() {
 
 setup_interface_ipv6() {
   sysctl net.ipv6.conf.all.disable_ipv6=0
+  sysctl net.ipv6.conf.all.forwarding=1
   sysctl net.ipv6.conf.all.accept_ra=1
   
   local intfnum=$1

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bad40a74/systemvm/patches/debian/config/etc/sysctl.conf
--
diff --git a/systemvm/patches/debian/config/etc/sysctl.conf 
b/systemvm/patches/debian/config/etc/sysctl.conf
index d15276a..1ba1282 100644
--- a/systemvm/patches/debian/config/etc/sysctl.conf
+++ b/systemvm/patches/debian/config/etc/sysctl.conf
@@ -51,8 +51,8 @@ net.nf_conntrack_max = 100
 net.netfilter.nf_conntrack_max = 100
 
 # Disable IPv6
-net.ipv6.conf.all.disable_ipv6 = 0
-net.ipv6.conf.all.forwarding = 1
-net.ipv6.conf.all.accept_ra = 1
+net.ipv6.conf.all.disable_ipv6 = 1
+net.ipv6.conf.all.forwarding = 0
+net.ipv6.conf.all.accept_ra = 0
 net.ipv6.conf.all.accept_redirects = 0
 net.ipv6.conf.all.autoconf = 0



[10/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6577: Disable service monitoring in RVR

(cherry picked from commit b9b623bccc6819f4a8f96054c51ecc5d3f1db944)
Signed-off-by: Rohit Yadav 

Conflicts:

server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fac57a0a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fac57a0a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fac57a0a

Branch: refs/heads/4.3
Commit: fac57a0a837a2d8a291029ed99479796c8d625c9
Parents: dddc648
Author: Jayapal 
Authored: Mon May 5 13:45:51 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:10:27 2014 +0530

--
 .../VirtualNetworkApplianceManagerImpl.java | 22 
 1 file changed, 13 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fac57a0a/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 b0e1228..f3c6ffa 100755
--- 
a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ 
b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -2372,20 +2372,24 @@ public class VirtualNetworkApplianceManagerImpl extends 
ManagerBase implements V
 if (reprogramGuestNtwks) {
 finalizeIpAssocForNetwork(cmds, router, provider, 
guestNetworkId, null);
 finalizeNetworkRulesForNetwork(cmds, router, provider, 
guestNetworkId);
-}
 
-finalizeUserDataAndDhcpOnStart(cmds, router, provider, 
guestNetworkId);
-}
+NetworkOffering offering = 
_networkOfferingDao.findById((_networkDao.findById(guestNetworkId)).getNetworkOfferingId());
+//service monitoring is currently not added in RVR
+if (!offering.getRedundantRouter()) {
+String serviceMonitringSet = 
_configDao.getValue(Config.EnableServiceMonitoring.key());
+
+if (serviceMonitringSet != null && 
serviceMonitringSet.equalsIgnoreCase("true")) {
+finalizeMonitorServiceOnStrat(cmds, profile, router, 
provider, guestNetworkId, true);
+} else {
+finalizeMonitorServiceOnStrat(cmds, profile, router, 
provider, guestNetworkId, false);
+}
+}
 
-String serviceMonitringSet = 
_configDao.getValue(Config.EnableServiceMonitoring.key());
+}
 
-if (serviceMonitringSet != null && 
serviceMonitringSet.equalsIgnoreCase("true")) {
-finalizeMonitorServiceOnStrat(cmds, profile, router, provider, 
routerGuestNtwkIds.get(0), true);
- } else {
-finalizeMonitorServiceOnStrat(cmds, profile, router, provider, 
routerGuestNtwkIds.get(0), false);
+finalizeUserDataAndDhcpOnStart(cmds, router, provider, 
guestNetworkId);
 }
 
-
 return true;
 }
 



[12/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6467: Add pre/post-state transition status to messages published on

... event bus by UserVmStateListener. Allow system VM resource state
post-transitions to be published.

(cherry picked from commit 9c4de764f74bffd5cd547f8514d4a6897fb961c2)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/vm/UserVmStateListener.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/af79d6aa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/af79d6aa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/af79d6aa

Branch: refs/heads/4.3
Commit: af79d6aaf7b2305e4032f01ed0fe7dff2a01fee3
Parents: 7e5c7d4
Author: jeff 
Authored: Mon Apr 21 14:47:12 2014 +
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:16:01 2014 +0530

--
 server/src/com/cloud/vm/UserVmStateListener.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af79d6aa/server/src/com/cloud/vm/UserVmStateListener.java
--
diff --git a/server/src/com/cloud/vm/UserVmStateListener.java 
b/server/src/com/cloud/vm/UserVmStateListener.java
index f783ffa..213ff8a 100644
--- a/server/src/com/cloud/vm/UserVmStateListener.java
+++ b/server/src/com/cloud/vm/UserVmStateListener.java
@@ -72,12 +72,12 @@ public class UserVmStateListener implements 
StateListener

[17/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6328: run.sh check if an existing java process is running, before 
spawining new ones

Signed-off-by: Jayapal 
(cherry picked from commit 96b1c6bf3cae3c03a872770ceb420c5daef21713)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/650464ed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/650464ed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/650464ed

Branch: refs/heads/4.3
Commit: 650464eda05d9e392ef7f99a6e08a6576de41ce7
Parents: 62ae768
Author: Saurav Lahiri 
Authored: Tue Apr 15 12:08:11 2014 +
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:37:13 2014 +0530

--
 systemvm/patches/debian/config/etc/init.d/cloud | 14 -
 systemvm/scripts/run.sh | 30 +++-
 systemvm/scripts/utils.sh   | 21 ++
 3 files changed, 50 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/650464ed/systemvm/patches/debian/config/etc/init.d/cloud
--
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud 
b/systemvm/patches/debian/config/etc/init.d/cloud
index 83853bc..b18b8b1 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud
+++ b/systemvm/patches/debian/config/etc/init.d/cloud
@@ -75,17 +75,15 @@ _failure() {
 }
 RETVAL=$?
 CLOUDSTACK_HOME="/usr/local/cloud"
+if [ -f  $CLOUDSTACK_HOME/systemvm/utils.sh ];
+then
+  . $CLOUDSTACK_HOME/systemvm/utils.sh
+else
+  _failure
+fi
 
 # mkdir -p /var/log/vmops
 
-get_pids() {
-  local i
-  for i in $(ps -ef| grep java | grep -v grep | awk '{print $2}'); 
-  do 
-echo $(pwdx $i) | grep "$CLOUDSTACK_HOME"  | awk -F: '{print $1}'; 
-  done
-}
-
 start() {
local pid=$(get_pids)
if [ "$pid" != "" ]; then

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/650464ed/systemvm/scripts/run.sh
--
diff --git a/systemvm/scripts/run.sh b/systemvm/scripts/run.sh
index 146d96f..b6a3a27 100755
--- a/systemvm/scripts/run.sh
+++ b/systemvm/scripts/run.sh
@@ -23,15 +23,31 @@
 #_run.sh runs the agent client.
 
 # set -x
- 
+readonly PROGNAME=$(basename "$0")
+readonly LOCKDIR=/tmp
+readonly LOCKFD=500
+
+CLOUDSTACK_HOME="/usr/local/cloud"
+. $CLOUDSTACK_HOME/systemvm/utils.sh
+
+LOCKFILE=$LOCKDIR/$PROGNAME.xlock
+lock $LOCKFILE $LOCKFD
+if [ $? -eq 1 ];then
+  exit 1
+fi 
+
 while true
 do
-  ./_run.sh "$@" &
-  wait
-  ex=$?
-  if [ $ex -eq 0 ] || [ $ex -eq 1 ] || [ $ex -eq 66 ] || [ $ex -gt 128 ]; then
-  # permanent errors
-  sleep 5
+  pid=$(get_pids)
+  action=`cat /usr/local/cloud/systemvm/user_request`
+  if [ "$pid" == "" ] && [ "$action" == "start" ] ; then
+./_run.sh "$@" &
+wait
+ex=$?
+if [ $ex -eq 0 ] || [ $ex -eq 1 ] || [ $ex -eq 66 ] || [ $ex -gt 128 ]; 
then
+# permanent errors
+sleep 5
+fi
   fi
 
   # user stop agent by service cloud stop

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/650464ed/systemvm/scripts/utils.sh
--
diff --git a/systemvm/scripts/utils.sh b/systemvm/scripts/utils.sh
new file mode 100644
index 000..4d55fc7
--- /dev/null
+++ b/systemvm/scripts/utils.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+CLOUDSTACK_HOME="/usr/local/cloud"
+
+get_pids() {
+  local i
+  for i in $(ps -ef| grep java | grep -v grep | awk '{print $2}');
+  do
+echo $(pwdx $i) | grep "$CLOUDSTACK_HOME"  | awk -F: '{print $1}';
+  done
+}
+
+lock()
+{
+  lockfile=$1
+  lockfd=$2
+  eval "exec $lockfd>$lockfile"
+  flock -n $lockfd\
+&& return 0 \
+|| return 1
+}



[06/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6783: Return a proper LibvirtStoragePool object after creating the 
pool

In situations where libvirt lost the storage pool the KVM Agent will re-create 
the
storage pool in libvirt.

This could be then libvirt is restarted for example.

The object returned internally was missing essential information like the 
sourceDir
aka the Ceph pool, the monitor IPs, cephx information and such.

In this case the first operation on this newly created pool would fail. All 
operations
afterwards would succeed.

(cherry picked from commit 48899e4c815dc2db7c714db08577d253bd5e2a09)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/df7be282
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/df7be282
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/df7be282

Branch: refs/heads/4.3
Commit: df7be28266861a7f0d92fc3541d802d6edce5be7
Parents: 8992e18
Author: Wido den Hollander 
Authored: Tue May 27 16:18:25 2014 +0200
Committer: Rohit Yadav 
Committed: Tue Nov 25 22:53:53 2014 +0530

--
 .../hypervisor/kvm/storage/LibvirtStorageAdaptor.java | 14 ++
 1 file changed, 14 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df7be282/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 76659ec..2925b6f 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
@@ -545,6 +545,20 @@ public class LibvirtStorageAdaptor implements 
StorageAdaptor {
 pool.setLocalPath("");
 }
 
+if (pool.getType() == StoragePoolType.RBD
+ || pool.getType() == StoragePoolType.Gluster) {
+pool.setSourceHost(spd.getSourceHost());
+pool.setSourcePort(spd.getSourcePort());
+pool.setSourceDir(spd.getSourceDir());
+String authUsername = spd.getAuthUserName();
+if (authUsername != null) {
+Secret secret = 
conn.secretLookupByUUIDString(spd.getSecretUUID());
+String secretValue = new 
String(Base64.encodeBase64(secret.getByteValue()));
+pool.setAuthUsername(authUsername);
+pool.setAuthSecret(secretValue);
+}
+}
+
 pool.setCapacity(sp.getInfo().capacity);
 pool.setUsed(sp.getInfo().allocation);
 pool.setAvailable(sp.getInfo().available);



[11/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6516: In 4.3, SSL was turned off by default.

However, for SSVM, the value from configuration server overrides the default in 
Config.java. Work around is to change in global properties.

Local testing, checking a fresh install has the above property false by default.

Signed-off-by: Nitin Mehta
(cherry picked from commit 05802004e27f91f4c23274ca123f1ecf9fde5ac2)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7e5c7d48
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7e5c7d48
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7e5c7d48

Branch: refs/heads/4.3
Commit: 7e5c7d488ab60fdab48d51dd6921912607f4f100
Parents: fac57a0
Author: Amogh Vasekar 
Authored: Fri Apr 25 14:48:15 2014 -0700
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:12:59 2014 +0530

--
 server/src/com/cloud/server/ConfigurationServerImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e5c7d48/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 c204b4d..358e0db 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -201,8 +201,8 @@ public class ConfigurationServerImpl extends ManagerBase 
implements Configuratio
 _configDao.update(Config.UseSecondaryStorageVm.key(), 
Config.UseSecondaryStorageVm.getCategory(), "true");
 s_logger.debug("ConfigurationServer made secondary storage vm 
required.");
 
-_configDao.update(Config.SecStorageEncryptCopy.key(), 
Config.SecStorageEncryptCopy.getCategory(), "true");
-s_logger.debug("ConfigurationServer made secondary storage copy 
encrypted.");
+_configDao.update(Config.SecStorageEncryptCopy.key(), 
Config.SecStorageEncryptCopy.getCategory(), "false");
+s_logger.debug("ConfigurationServer made secondary storage copy 
encrypt set to false.");
 
 _configDao.update("secstorage.secure.copy.cert", "realhostip");
 s_logger.debug("ConfigurationServer made secondary storage copy 
use realhostip.");



[09/20] git commit: updated refs/heads/4.3 to 67df5b9

2014-11-25 Thread bhaisaab
CLOUDSTACK-6578: Fixed issue in delete remote access vpn command

(cherry picked from commit 40836344de54091d795817f41a4fa136ecdb0f5d)
Signed-off-by: Rohit Yadav 

Conflicts:
api/src/com/cloud/network/vpn/RemoteAccessVpnService.java
server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dddc6488
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dddc6488
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dddc6488

Branch: refs/heads/4.3
Commit: dddc6488d45e1faca958326c252b36ece412bc84
Parents: 6ad3ae7
Author: Jayapal 
Authored: Mon May 5 13:56:59 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 23:08:44 2014 +0530

--
 .../cloud/network/vpn/RemoteAccessVpnService.java|  4 +++-
 .../command/user/vpn/DeleteRemoteAccessVpnCmd.java   |  6 +-
 .../network/vpn/RemoteAccessVpnManagerImpl.java  | 15 ---
 3 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dddc6488/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java
--
diff --git a/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java 
b/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java
index de7692d..ef5bd2b 100644
--- a/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java
+++ b/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java
@@ -33,7 +33,9 @@ public interface RemoteAccessVpnService {
 
 RemoteAccessVpn createRemoteAccessVpn(long vpnServerAddressId, String 
ipRange, boolean openFirewall)
 throws NetworkRuleConflictException;
-void destroyRemoteAccessVpnForIp(long vpnServerAddressId, Account caller) 
throws ResourceUnavailableException;
+
+boolean destroyRemoteAccessVpnForIp(long ipId, Account caller) throws 
ResourceUnavailableException;
+
 RemoteAccessVpn startRemoteAccessVpn(long vpnServerAddressId, boolean 
openFirewall) throws ResourceUnavailableException;
 
 VpnUser addVpnUser(long vpnOwnerId, String userName, String password);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dddc6488/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java
index 640a89a..fdd3c10 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java
@@ -18,6 +18,8 @@ package org.apache.cloudstack.api.command.user.vpn;
 
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.BaseAsyncCmd;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.response.AccountResponse;
@@ -85,7 +87,9 @@ public class DeleteRemoteAccessVpnCmd extends BaseAsyncCmd {
 
 @Override
 public void execute() throws ResourceUnavailableException {
-_ravService.destroyRemoteAccessVpnForIp(publicIpId, 
CallContext.current().getCallingAccount());
+if (! _ravService.destroyRemoteAccessVpnForIp(publicIpId, 
CallContext.current().getCallingAccount())) {
+   throw new 
ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete remote access 
vpn");
+}
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dddc6488/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
--
diff --git a/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java 
b/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
index c7e67c1..0acb0a2 100755
--- a/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
@@ -261,16 +261,18 @@ public class RemoteAccessVpnManagerImpl extends 
ManagerBase implements RemoteAcc
 }
 }
 
-@Override @DB
-public void destroyRemoteAccessVpnForIp(long ipId, Account caller) throws 
ResourceUnavailableException {
+@Override
+@DB
+public boolean destroyRemoteAccessVpnForIp(long ipId, Account caller) 
throws ResourceUnavailableException {
 final RemoteAccessVpnVO vpn = 
_remoteAccessVpnDao.findByPublicIpAddress(ipId);
 if (vpn == null) {
 s_logger.debug("there are no Remote access vpns for p

[1/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 67df5b9da -> 2b264e6b5


CLOUDSTACK-6269: [Simulator] Exception "Unable to send command"

Added fix for CLOUDSTACK-6269.More details inside the bug

Signed-off-by: Santhosh Edukulla 
(cherry picked from commit 3060f884ab62d92ade9073a147dee204aba4a889)
Signed-off-by: Rohit Yadav 

Conflicts:

plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7332ea8a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7332ea8a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7332ea8a

Branch: refs/heads/4.3
Commit: 7332ea8a1caa093ec5036098619d04317b269fd5
Parents: 67df5b9
Author: Santhosh Edukulla 
Authored: Wed Mar 26 00:45:44 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:13:36 2014 +0530

--
 .../com/cloud/agent/manager/MockVmManagerImpl.java  | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7332ea8a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
--
diff --git 
a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
 
b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
index 28e235e..6867470 100644
--- 
a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
+++ 
b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
@@ -16,6 +16,19 @@
 // under the License.
 package com.cloud.agent.manager;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import com.cloud.network.VirtualNetworkApplianceService;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.BumpUpPriorityCommand;
@@ -567,7 +580,8 @@ public class MockVmManagerImpl extends ManagerBase 
implements MockVmManager {
 
 @Override
 public GetDomRVersionAnswer getDomRVersion(GetDomRVersionCmd cmd) {
-return new GetDomRVersionAnswer(cmd, null, null, null);
+String template_version = "CloudStack Release "+ 
VirtualNetworkApplianceService._minVRVersion.toString();
+return new GetDomRVersionAnswer(cmd, null, template_version, 
UUID.randomUUID().toString());
 }
 
 @Override



[5/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
CLOUDSTACK-6192: Return failure on StartCommand and PrepareForMigrationCommand
when connectPhysicalDisk fails, rather than continuing on

(cherry picked from commit fb0b2eb26731a6db00c65dcd799653a213475387)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a88c3dd8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a88c3dd8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a88c3dd8

Branch: refs/heads/4.3
Commit: a88c3dd8a4dd108aa434440c83d6ca5cc3985e83
Parents: c2c6ecf
Author: Marcus Sorensen 
Authored: Tue Mar 4 14:18:51 2014 -0700
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:21:20 2014 +0530

--
 .../kvm/resource/LibvirtComputingResource.java   | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a88c3dd8/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 dbd2327..c65fed8 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
@@ -3075,7 +3075,7 @@ ServerResource {
 
 NicTO[] nics = vm.getNics();
 
-boolean success = false;
+boolean skipDisconnect = false;
 
 try {
 Connect conn = 
LibvirtConnection.getConnectionByVmName(vm.getName());
@@ -3091,13 +3091,16 @@ ServerResource {
 }
 }
 
-_storagePoolMgr.connectPhysicalDisksViaVmSpec(vm);
+if (!_storagePoolMgr.connectPhysicalDisksViaVmSpec(vm)) {
+skipDisconnect = true;
+return new PrepareForMigrationAnswer(cmd, "failed to connect 
physical disks to host");
+}
 
 synchronized (_vms) {
 _vms.put(vm.getName(), State.Migrating);
 }
 
-success = true;
+skipDisconnect = true;
 
 return new PrepareForMigrationAnswer(cmd);
 } catch (LibvirtException e) {
@@ -3107,7 +3110,7 @@ ServerResource {
 } catch (URISyntaxException e) {
 return new PrepareForMigrationAnswer(cmd, e.toString());
 } finally {
-if (!success) {
+if (!skipDisconnect) {
 _storagePoolMgr.disconnectPhysicalDisksViaVmSpec(vm);
 }
 }
@@ -3654,7 +3657,9 @@ ServerResource {
 
 createVbd(conn, vmSpec, vmName, vm);
 
-_storagePoolMgr.connectPhysicalDisksViaVmSpec(vmSpec);
+if (!_storagePoolMgr.connectPhysicalDisksViaVmSpec(vmSpec)) {
+return new StartAnswer(cmd, "Failed to connect physical disks 
to host");
+}
 
 createVifs(vmSpec, vm);
 



[2/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
CLOUDSTACK-6236:Negative ref_cnt of template(snapshot/volume)_store_ref results 
in out-of-range error in Mysql

(cherry picked from commit cd8af6a3e2a180ea4d2cfea8a273dbb0929e0a87)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/88ec0843
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/88ec0843
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/88ec0843

Branch: refs/heads/4.3
Commit: 88ec08439dfc65178c56c365e276c0018ca03d6d
Parents: 7332ea8
Author: Min Chen 
Authored: Wed Mar 12 15:44:18 2014 -0700
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:14:53 2014 +0530

--
 .../storage/datastore/db/SnapshotDataStoreVO.java| 11 ++-
 .../storage/datastore/db/TemplateDataStoreVO.java| 11 ++-
 .../storage/datastore/db/VolumeDataStoreVO.java  | 11 ++-
 3 files changed, 30 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88ec0843/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
 
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
index db86c3f..7acc891 100644
--- 
a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
+++ 
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
@@ -29,6 +29,8 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import 
org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 import 
org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State;
@@ -44,6 +46,8 @@ import com.cloud.utils.fsm.StateObject;
 @Entity
 @Table(name = "snapshot_store_ref")
 public class SnapshotDataStoreVO implements 
StateObject, DataObjectInStore {
+private static final Logger s_logger = 
Logger.getLogger(SnapshotDataStoreVO.class);
+
 @Id
 @GeneratedValue(strategy = GenerationType.IDENTITY)
 Long id;
@@ -266,7 +270,12 @@ public class SnapshotDataStoreVO implements 
StateObject 0) {
+refCnt--;
+}
+else {
+s_logger.warn("We should not try to decrement a zero reference 
count even though our code has guarded");
+}
 }
 
 public Long getVolumeId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88ec0843/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
 
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
index a3696d8..af89ee5 100755
--- 
a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
+++ 
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
@@ -29,6 +29,8 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import 
org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 import 
org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State;
@@ -45,6 +47,8 @@ import com.cloud.utils.fsm.StateObject;
 @Entity
 @Table(name = "template_store_ref")
 public class TemplateDataStoreVO implements 
StateObject, DataObjectInStore {
+private static final Logger s_logger = 
Logger.getLogger(TemplateDataStoreVO.class);
+
 @Id
 @GeneratedValue(strategy = GenerationType.IDENTITY)
 Long id;
@@ -369,7 +373,12 @@ public class TemplateDataStoreVO implements 
StateObject 0) {
+refCnt--;
+}
+else{
+s_logger.warn("We should not try to decrement a zero reference 
count even though our code has guarded");
+}
 }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88ec0843/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
 
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
index e34d4a6..bd15f1c 100755
--- 
a/engine/schema/src/org/apache

[8/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
CLOUDSTACK-6020 ipv4 address can be a larger number then
Interger.MAX_VALUE
(cherry picked from commit b3829e54d6b7af426f797ffb9fa54b4cd2abffc0)

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2b264e6b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2b264e6b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2b264e6b

Branch: refs/heads/4.3
Commit: 2b264e6b57b90d6eb5d202c4fe72e64d867b3f9b
Parents: 11eab3d
Author: Daan Hoogland 
Authored: Tue Feb 4 18:40:18 2014 +0100
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:37:18 2014 +0530

--
 utils/src/com/cloud/utils/net/Ip.java  |  2 +-
 utils/test/com/cloud/utils/net/IpTest.java | 43 +
 2 files changed, 44 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2b264e6b/utils/src/com/cloud/utils/net/Ip.java
--
diff --git a/utils/src/com/cloud/utils/net/Ip.java 
b/utils/src/com/cloud/utils/net/Ip.java
index 2cdfd9c..93972e7 100644
--- a/utils/src/com/cloud/utils/net/Ip.java
+++ b/utils/src/com/cloud/utils/net/Ip.java
@@ -56,7 +56,7 @@ public class Ip implements Serializable, Comparable {
 }
 
 public boolean isIp4() {
-return ip < Integer.MAX_VALUE;
+return ip <= 2L * Integer.MAX_VALUE + 1;
 }
 
 public boolean isIp6() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2b264e6b/utils/test/com/cloud/utils/net/IpTest.java
--
diff --git a/utils/test/com/cloud/utils/net/IpTest.java 
b/utils/test/com/cloud/utils/net/IpTest.java
new file mode 100644
index 000..48615d7
--- /dev/null
+++ b/utils/test/com/cloud/utils/net/IpTest.java
@@ -0,0 +1,43 @@
+// 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
+// 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.utils.net;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class IpTest {
+
+@Test
+public void testUltimate() {
+Ip max = new Ip(2L * Integer.MAX_VALUE +1 );
+assertEquals("Maximal address not created", "255.255.255.255", 
max.addr());
+}
+@Test
+public void testTurningOfTheCentury() {
+Ip eve = new Ip(Integer.MAX_VALUE);
+assertEquals("Minimal address not created", "127.255.255.255", 
eve.addr());
+Ip dawn = new Ip(Integer.MAX_VALUE + 1L);
+assertEquals("Minimal address not created", "128.0.0.0", dawn.addr());
+}
+@Test
+public void testStart() {
+Ip min = new Ip(0);
+assertEquals("Minimal address not created", "0.0.0.0", min.addr());
+}
+
+}



[4/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
CLOUDSTACK-6210: LDAP:listLdapUsers api throws exception when we click on "Add 
LDAP Account" This occurs when ldap basedn is not configured. Throwing an IAE 
and a proper message is returned from the api call

Signed-off-by: Ian Duffy 
(cherry picked from commit 4552ec632201e7432afae7770f5854aaa244267c)
Signed-off-by: Rohit Yadav 

Conflicts:

plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2c6ecf8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2c6ecf8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2c6ecf8

Branch: refs/heads/4.3
Commit: c2c6ecf828d85e3a5085ea28baed0ed9e1ba5d9e
Parents: 2534b54
Author: Rajani Karuturi 
Authored: Fri Mar 7 11:13:35 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:19:54 2014 +0530

--
 .../apache/cloudstack/ldap/LdapUserManager.java |  10 +-
 .../cloudstack/ldap/LdapUserManagerSpec.groovy  | 263 ++-
 2 files changed, 146 insertions(+), 127 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2c6ecf8/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java
--
diff --git 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java
 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java
index 59a41de..f80142f 100644
--- 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java
+++ 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java
@@ -25,6 +25,8 @@ import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.*;
 
+import org.apache.commons.lang.StringUtils;
+
 public class LdapUserManager {
 
 @Inject
@@ -181,6 +183,10 @@ public class LdapUserManager {
controls.setSearchScope(_ldapConfiguration.getScope());

controls.setReturningAttributes(_ldapConfiguration.getReturnAttributes());
 
-   return context.search(_ldapConfiguration.getBaseDn(), 
generateSearchFilter(username), controls);
+String basedn = _ldapConfiguration.getBaseDn();
+if (StringUtils.isBlank(basedn)) {
+throw new IllegalArgumentException("ldap basedn is not 
configured");
+}
+return context.search(basedn, generateSearchFilter(username), 
controls);
 }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2c6ecf8/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy
--
diff --git 
a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy
 
b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy
index fa735d3..9fbc81f 100644
--- 
a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy
+++ 
b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy
@@ -21,10 +21,9 @@ import org.apache.cloudstack.ldap.LdapUserManager
 import spock.lang.Shared
 
 import javax.naming.NamingException
-import javax.naming.NamingEnumeration
 import javax.naming.directory.Attribute
 import javax.naming.directory.Attributes
-import javax.naming.directory.DirContext
+import javax.naming.directory.InitialDirContext
 import javax.naming.directory.SearchControls
 import javax.naming.directory.SearchResult
 import javax.naming.ldap.LdapContext
@@ -51,83 +50,83 @@ class LdapUserManagerSpec extends spock.lang.Specification {
 
 private def createGroupSearchContext() {
 
-   def umSearchResult = Mock(SearchResult)
-   umSearchResult.getName() >> principal;
-   umSearchResult.getAttributes() >> principal
+def umSearchResult = Mock(SearchResult)
+umSearchResult.getName() >> principal;
+umSearchResult.getAttributes() >> principal
 
-   def uniqueMembers = new BasicNamingEnumerationImpl()
-   uniqueMembers.add(umSearchResult);
-   def attributes = Mock(Attributes)
-   def uniqueMemberAttribute = Mock(Attribute)
-   uniqueMemberAttribute.getId() >> "uniquemember"
-   uniqueMemberAttribute.getAll() >> uniqueMembers
-   attributes.get("uniquemember") >> uniqueMemberAttribute
+def uniqueMembers = new BasicNamingEnumerationImpl()
+uniqueMembers.add(umSearchResult);
+def attributes = Mock(Attributes)
+def uniqueMemberAttribute = Mock(Attribute)
+uniqueMemberAttribute.getId() >> "uniquemember"
+uniqueMember

[3/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
CLOUDSTACK-6236:fix a copy-and-paste error for decrRefCnt in
VolumeDataStoreVO.
(cherry picked from commit 672bb353be2f159966f351ab2de914b433a934f9)

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2534b548
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2534b548
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2534b548

Branch: refs/heads/4.3
Commit: 2534b54853d81d41e364348e0cc0cecb3c950294
Parents: 88ec084
Author: Min Chen 
Authored: Wed Sep 3 10:33:11 2014 -0700
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:15:05 2014 +0530

--
 .../storage/datastore/db/VolumeDataStoreVO.java   | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2534b548/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
 
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
index bd15f1c..f5589da 100755
--- 
a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
+++ 
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
@@ -348,12 +348,7 @@ public class VolumeDataStoreVO implements 
StateObject 0) {
-refCnt--;
-}
-else {
-s_logger.warn("We should not try to decrement a zero reference 
count even though our code has guarded");
-}
+this.refCnt = refCnt;
 }
 
 public void incrRefCnt() {
@@ -361,7 +356,12 @@ public class VolumeDataStoreVO implements 
StateObject 0) {
+refCnt--;
+}
+else {
+s_logger.warn("We should not try to decrement a zero reference 
count even though our code has guarded");
+}
 }
 
 public String getExtractUrl() {



[7/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
CLOUDSTACK-6172: Adding new test case to verify this fix

Signed-off-by: Rohit Yadav 

Conflicts:

test/integration/component/test_volumes.py

Signed-off-by: sanjeev 

CLOUDSTACK-6172: Fixed review comments provided in RR 25771
(cherry picked from commit 2d19bcb46ad7c78b4842c1f52f552998a33f8836)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/11eab3d2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/11eab3d2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/11eab3d2

Branch: refs/heads/4.3
Commit: 11eab3d285620b2a62078bd48f6b9e4089ef10e9
Parents: 77446d2
Author: sanjeev 
Authored: Thu Sep 18 14:18:14 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:23:19 2014 +0530

--
 test/integration/component/test_volumes.py | 138 
 1 file changed, 138 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11eab3d2/test/integration/component/test_volumes.py
--
diff --git a/test/integration/component/test_volumes.py 
b/test/integration/component/test_volumes.py
index ee0f91d..89a3372 100644
--- a/test/integration/component/test_volumes.py
+++ b/test/integration/component/test_volumes.py
@@ -1264,3 +1264,141 @@ class TestDeployVmWithCustomDisk(cloudstackTestCase):
 except Exception as e:
 self.fail("Create volume failed with exception: %s" % e)
 return
+
+class TestMigrateVolume(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+cls.testClient = super(TestMigrateVolume, cls).getClsTestClient()
+cls.api_client = cls.testClient.getApiClient()
+
+cls.services = Services().services
+# Get Zone, Domain and templates
+cls.domain = get_domain(cls.api_client)
+cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+cls.services['mode'] = cls.zone.networktype
+cls.disk_offering = DiskOffering.create(
+cls.api_client,
+cls.services["disk_offering"]
+)
+template = get_template(
+cls.api_client,
+cls.zone.id,
+cls.services["ostype"]
+)
+cls.services["zoneid"] = cls.zone.id
+cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+cls.services["virtual_machine"]["template"] = template.id
+cls.services["virtual_machine"]["diskofferingid"] = 
cls.disk_offering.id
+
+# Create VMs, VMs etc
+cls.account = Account.create(
+cls.api_client,
+cls.services["account"],
+domainid=cls.domain.id
+)
+cls.small_offering = ServiceOffering.create(
+cls.api_client,
+cls.services["service_offering"]
+)
+cls.virtual_machine = VirtualMachine.create(
+cls.api_client,
+cls.services["virtual_machine"],
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.small_offering.id,
+mode=cls.services["mode"]
+)
+cls._cleanup = [
+cls.small_offering,
+cls.account
+   ]
+return
+
+@classmethod
+def tearDownClass(cls):
+try:
+cleanup_resources(cls.api_client, cls._cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+
+def setUp(self):
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+return
+
+def tearDown(self):
+cleanup_resources(self.apiclient, self.cleanup)
+return
+
+@attr(tags=["advanced","sg","advancedsg"], required_hardware='true')
+def test_01_migrateVolume(self):
+"""
+@Desc:Volume is not retaining same uuid when migrating from one 
storage to another.
+Step1:Create a volume/data disk
+Step2:Verify UUID of the volume
+Step3:Migrate the volume to another primary storage within the cluster
+Step4:Migrating volume to new primary storage should succeed
+Step5:volume UUID should not change even after migration
+"""
+vol = Volume.create(
+self.apiclient,
+self.services["volume"],
+diskofferingid=self.disk_offering.id,
+zoneid=self.zone.id,
+account=self.account.name,
+domainid=self.account.domainid,
+)
+self.assertIsNotNone(vol,"Failed to create volume")
+vol_res = Volume.list(
+self.apiclient,
+id=vol.id
+ 

[6/8] git commit: updated refs/heads/4.3 to 2b264e6

2014-11-26 Thread bhaisaab
CLOUDSTACK-6172: Volume is not retaining same uuid when migrating from one 
storage to another.

(cherry picked from commit 624139d8ef9ea9462ba81d2d3941ee5ac9467b20)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/77446d27
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/77446d27
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/77446d27

Branch: refs/heads/4.3
Commit: 77446d2716a4d174c4505123758310ba0fe48e2d
Parents: a88c3dd
Author: Sanjay Tripathi 
Authored: Wed Feb 26 14:41:48 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 18:23:04 2014 +0530

--
 .../src/com/cloud/storage/dao/VolumeDao.java|  8 
 .../com/cloud/storage/dao/VolumeDaoImpl.java| 20 
 .../storage/volume/VolumeServiceImpl.java   |  1 +
 3 files changed, 29 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77446d27/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
--
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDao.java 
b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
index 24ade51..47f1990 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
@@ -103,4 +103,12 @@ public interface VolumeDao extends GenericDao, StateDaohttp://git-wip-us.apache.org/repos/asf/cloudstack/blob/77446d27/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java 
b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index 2fb9dba..697983c 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -555,6 +555,26 @@ public class VolumeDaoImpl extends 
GenericDaoBase implements Vol
 }
 
 @Override
+@DB
+public boolean updateUuid(long srcVolId, long destVolId) {
+TransactionLegacy txn = TransactionLegacy.currentTxn();
+txn.start();
+try {
+VolumeVO srcVol = findById(srcVolId);
+VolumeVO destVol = findById(destVolId);
+String uuid = srcVol.getUuid();
+srcVol.setUuid(null);
+destVol.setUuid(uuid);
+update(srcVolId, srcVol);
+update(destVolId, destVol);
+} catch (Exception e) {
+throw new CloudRuntimeException("Unable to persist the sequence 
number for this host");
+}
+txn.commit();
+return true;
+}
+
+@Override
 public ScopeType getVolumeStoragePoolScope(long volumeId) {
 // finding the storage scope where the volume is present
 TransactionLegacy txn = TransactionLegacy.currentTxn();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77446d27/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
--
diff --git 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 4e07edd..18972ef 100644
--- 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -886,6 +886,7 @@ public class VolumeServiceImpl implements VolumeService {
 }
 srcVolume.processEvent(Event.OperationSuccessed);
 destVolume.processEvent(Event.OperationSuccessed, 
result.getAnswer());
+_volumeDao.updateUuid(srcVolume.getId(), destVolume.getId());
 destroyVolume(srcVolume.getId());
 srcVolume = volFactory.getVolume(srcVolume.getId());
 AsyncCallFuture destroyFuture = 
expungeVolumeAsync(srcVolume);



[3/4] cloudstack-docs git commit: Merge remote-tracking branch 'andy/master'

2014-11-26 Thread bhaisaab
Merge remote-tracking branch 'andy/master'

This closes #8


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/commit/574089e9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/tree/574089e9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/diff/574089e9

Branch: refs/heads/master
Commit: 574089e922a6d8087fa2f14414f075d612051c69
Parents: be0f4dd cbd7a13
Author: Rohit Yadav 
Authored: Wed Nov 26 19:35:16 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 19:35:16 2014 +0530

--
 rtd/source/networking/vxlan.rst | 10 ++
 1 file changed, 10 insertions(+)
--




[4/4] cloudstack-docs git commit: Merge remote-tracking branch 'rajani/patch-1'

2014-11-26 Thread bhaisaab
Merge remote-tracking branch 'rajani/patch-1'

This closes #6


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/commit/60fc60e6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/tree/60fc60e6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/diff/60fc60e6

Branch: refs/heads/master
Commit: 60fc60e67c65a22c646618b304c9a85134a9038e
Parents: 574089e 8f17a2f
Author: Rohit Yadav 
Authored: Wed Nov 26 19:36:58 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 19:36:58 2014 +0530

--
 rtd/source/developer_guide.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--




[2/4] cloudstack-docs git commit: Update vxlan.rst

2014-11-26 Thread bhaisaab
Update vxlan.rst

Added section about MTU sizes and examples.

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/commit/cbd7a136
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/tree/cbd7a136
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/diff/cbd7a136

Branch: refs/heads/master
Commit: cbd7a13622780142127f06bf2f0d2888afea3c68
Parents: be0f4dd
Author: andrijapanic 
Authored: Wed Nov 26 13:10:32 2014 +0100
Committer: andrijapanic 
Committed: Wed Nov 26 13:10:32 2014 +0100

--
 rtd/source/networking/vxlan.rst | 10 ++
 1 file changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/cbd7a136/rtd/source/networking/vxlan.rst
--
diff --git a/rtd/source/networking/vxlan.rst b/rtd/source/networking/vxlan.rst
index d3b54a8..85da616 100644
--- a/rtd/source/networking/vxlan.rst
+++ b/rtd/source/networking/vxlan.rst
@@ -73,6 +73,16 @@ To check the capability of your system, execute the 
following commands.
# If it's not, your iproute2 utility doesn't support VXLAN.
 
 
+Important note on MTU size
+~~~
+
+When new vxlan interfaces are created, kernel will obtain current MTU size of 
the physical interface (ethX or the bridge)
+and then create vxlan interface/bridge that are exactly 50 bytes smaller than 
the MTU on physical interface/bridge.
+This means that in order to support default MTU size of 1500 bytes inside VM, 
your vxlan interface/bridge must also
+have MTU of 1500 bytes, meaning that your physical interface/bridge must have 
MTU of at least 1550 bytes.
+In order to configure "jumbo frames" you can i.e. make physical 
interface/bridge with 9000 bytes MTU, then all the vxlan
+interfaces will be created with MTU of 8950 bytes, and then MTU size inside VM 
can be set to 8950 bytes.
+
 Advanced: Build kernel and iproute2
 ~~~
 



[1/4] cloudstack-docs git commit: updated instructions to install jdk1.7

2014-11-26 Thread bhaisaab
Repository: cloudstack-docs
Updated Branches:
  refs/heads/master be0f4dd40 -> 60fc60e67


updated instructions to install jdk1.7

for apt-get and yum corrected the java install commands to install jdk1.7

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/commit/8f17a2fe
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/tree/8f17a2fe
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs/diff/8f17a2fe

Branch: refs/heads/master
Commit: 8f17a2fecd70341dad7dd585d318d7cbbc526cce
Parents: 0414fdd
Author: Rajani Karuturi 
Authored: Tue Aug 19 15:26:51 2014 +0530
Committer: Rajani Karuturi 
Committed: Tue Aug 19 15:26:51 2014 +0530

--
 rtd/source/developer_guide.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/8f17a2fe/rtd/source/developer_guide.rst
--
diff --git a/rtd/source/developer_guide.rst b/rtd/source/developer_guide.rst
index 0e49688..661cd11 100644
--- a/rtd/source/developer_guide.rst
+++ b/rtd/source/developer_guide.rst
@@ -66,7 +66,7 @@ Install ``openjdk``. As we're using Linux, OpenJDK is our 
first choice.
 
 ::
 
-   apt-get install openjdk-6-jdk
+   apt-get install openjdk-7-jdk
 
 Install ``tomcat6``, note that the new version of tomcat on
 `Ubuntu `__ is the
@@ -143,7 +143,7 @@ Install ``openjdk``. As we're using Linux, OpenJDK is our 
first choice.
 
 ::
 
-   yum -y install java-1.6.0-openjdk
+   yum -y install java-1.7.0-openjdk-devel
 
 Install ``tomcat6``, note that the version of tomcat6 in the default
 CentOS 6.4 repo is 6.0.24, so we will grab the 6.0.35 version. The



[05/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5839: fixed xml serializer to process collection field when its 
elements are of String type

(cherry picked from commit c3680cc111c3d43838da298aa6f639b84eb43b5f)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/api/response/ApiResponseSerializer.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4d244523
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4d244523
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4d244523

Branch: refs/heads/4.3
Commit: 4d24452334acb00532ba2358401444a8510d4b3f
Parents: 4fdfd8f
Author: Alena Prokharchyk 
Authored: Wed Jan 8 15:38:08 2014 -0800
Committer: Rohit Yadav 
Committed: Wed Nov 26 22:13:28 2014 +0530

--
 server/src/com/cloud/api/response/ApiResponseSerializer.java | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d244523/server/src/com/cloud/api/response/ApiResponseSerializer.java
--
diff --git a/server/src/com/cloud/api/response/ApiResponseSerializer.java 
b/server/src/com/cloud/api/response/ApiResponseSerializer.java
index a3e6f0f..5e407d6 100644
--- a/server/src/com/cloud/api/response/ApiResponseSerializer.java
+++ b/server/src/com/cloud/api/response/ApiResponseSerializer.java
@@ -28,6 +28,7 @@ import com.google.gson.annotations.SerializedName;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseCmd;
 import org.apache.cloudstack.api.ResponseObject;
+
 import org.apache.cloudstack.api.response.*;
 import org.apache.log4j.Logger;
 
@@ -232,6 +233,8 @@ public class ApiResponseSerializer {
 if (idFieldName != null) {
 sb.append("<" + "uuidProperty" + ">" + 
idFieldName + "");
 }
+} else if (value instanceof String) {
+
sb.append("<").append(serializedName.value()).append(">").append(value).append("");
 }
 }
 if (usedUuidList) {



[12/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CHANGES: update CHANGES list of issues for 4.3.2

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8de48946
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8de48946
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8de48946

Branch: refs/heads/4.3
Commit: 8de4894696fb96cc9cc54b99cf2e53a2dce61852
Parents: ba7711b
Author: Rohit Yadav 
Authored: Thu Nov 27 00:06:45 2014 +0530
Committer: Rohit Yadav 
Committed: Thu Nov 27 00:06:45 2014 +0530

--
 CHANGES.md | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8de48946/CHANGES.md
--
diff --git a/CHANGES.md b/CHANGES.md
index 1399abc..9fdba2a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -84,7 +84,24 @@ This is a bug fix release. The following issues were fixed:
 CLOUDSTACK-6374: Remove entries from lb vm map when lb rule apply fails
 CLOUDSTACK-6365: support virtual host and ssl in rabbitMQ event bus
 CLOUDSTACK-6328: run.sh check if an existing java process is running, 
before spawining new ones
-CLOUDSTACK-6322 - Don't allow service instance creation with empty or null 
service-instance "name".
+CLOUDSTACK-6322: Don't allow service instance creation with empty or null 
service-instance "name".
+CLOUDSTACK-6269: [Simulator] Exception "Unable to send command"
+CLOUDSTACK-6236: Negative ref_cnt of template(snapshot/volume)_store_ref 
results in out-of-range error in Mysql
+CLOUDSTACK-6210: LDAP:listLdapUsers api throws exception when we click on 
"Add LDAP Account"
+CLOUDSTACK-6192: Return failure on StartCommand and 
PrepareForMigrationCommand when connectPhysicalDisk fails
+CLOUDSTACK-6172: Volume is not retaining same uuid when migrating from one 
storage to another.
+CLOUDSTACK-6020: ipv4 address can be a larger number then 
Interger.MAX_VALUE
+CLOUDSTACK-5962: Value of Global parameter "custom.diskoffering.size.min" 
is not reflected in UI during new instance creation.
+CLOUDSTACK-5870: API support for retrieving user data
+CLOUDSTACK-5865: Unable to use login API if domainId parameter is id and 
not uuid
+CLOUDSTACK-5839: return canEnableIndividualService in 
listNetworkServiceProvidersResponse
+CLOUDSTACK-5821: systemvmiso is locked by systevmvm in hyperv
+CLOUDSTACK-5762: VM wizard, custom compute offering: Fix error label
+CLOUDSTACK-5719: UI > Network > Add Guest Network > when Physical Network 
dropdown is changed, refresh Network Offering dropdown
+CLOUDSTACK-5576: UI > IP Address > EnableVPN, DisableVPN: change label.
+CLOUDSTACK-5501: Allow one vpn customer gateway with multiple connections
+CLOUDSTACK-5446: delete all the leftover snapshots on primary storage in 
case of snapshot errors
+
 
 Version 4.3.1
 -



[01/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 2b264e6b5 -> 8de489469


CLOUDSTACK-5962: Value of Global parameter "custom.diskoffering.size.min" is 
not reflected in UI during new instance creation.

Added fields to /api and /server classes for CustomDiskOfferingMinSize
to be available in CapabilitiesResponse. Fixed UI code in Instance
Wizard to have this config value as the minimum selectable option when
we are in custom disk size mode.

(cherry picked from commit 883d7f17f78433b37e4f20103b532b3b20582014)
Signed-off-by: Rohit Yadav 

Conflicts:
api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java
server/src/com/cloud/server/ManagementServerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/17c3e83c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/17c3e83c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/17c3e83c

Branch: refs/heads/4.3
Commit: 17c3e83cae5e21b9d69cc84216c504766d0ef0a2
Parents: 2b264e6
Author: Gabor Apati-Nagy 
Authored: Fri Mar 28 14:39:02 2014 +
Committer: Rohit Yadav 
Committed: Wed Nov 26 21:59:16 2014 +0530

--
 api/src/org/apache/cloudstack/api/ApiConstants.java|  1 +
 .../api/command/user/config/ListCapabilitiesCmd.java   |  1 +
 .../cloudstack/api/response/CapabilitiesResponse.java  | 13 +++--
 server/src/com/cloud/server/ManagementServerImpl.java  |  2 ++
 ui/index.jsp   |  2 +-
 ui/scripts/instanceWizard.js   |  6 ++
 ui/scripts/ui-custom/instanceWizard.js |  7 ++-
 7 files changed, 28 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17c3e83c/api/src/org/apache/cloudstack/api/ApiConstants.java
--
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java 
b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 68abf8d..b7ac97b 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -400,6 +400,7 @@ public class ApiConstants {
 public static final String INSTANCE_NAME = "instancename";
 public static final String START_VM = "startvm";
 public static final String HA_HOST = "hahost";
+public static final String CUSTOM_DISK_OFF_MIN_SIZE = 
"customdiskofferingminsize";
 public static final String CUSTOM_DISK_OFF_MAX_SIZE = 
"customdiskofferingmaxsize";
 public static final String DEFAULT_ZONE_ID = "defaultzoneid";
 public static final String LIVE_MIGRATE = "livemigrate";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17c3e83c/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java
index 2176bc0..78d5be9 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java
@@ -52,6 +52,7 @@ public class ListCapabilitiesCmd extends BaseCmd {
 response.setSupportELB((String)capabilities.get("supportELB"));
 
response.setProjectInviteRequired((Boolean)capabilities.get("projectInviteRequired"));
 
response.setAllowUsersCreateProjects((Boolean)capabilities.get("allowusercreateprojects"));
+
response.setDiskOffMinSize((Long)capabilities.get("customDiskOffMinSize"));
 
response.setDiskOffMaxSize((Long)capabilities.get("customDiskOffMaxSize"));
 
response.setRegionSecondaryEnabled((Boolean)capabilities.get("regionSecondaryEnabled"));
 
response.setKVMSnapshotEnabled((Boolean)capabilities.get("KVMSnapshotEnabled"));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17c3e83c/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java 
b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java
index 3ce31b5..b64ebdd 100644
--- a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java
@@ -43,9 +43,14 @@ public class CapabilitiesResponse extends BaseResponse {
 @SerializedName(ApiConstants.ALLOW_USER_CREATE_PROJECTS) 
@Param(description="true if regular user is allowed to create projects")
 private Boolean allowUsersCreateProjects;
 
-@SerializedName(ApiConstants.CUSTOM_DISK_OFF_MAX_SI

[04/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5839 : return canEnableIndividualService in 
listNetworkServiceProvidersResponse

(cherry picked from commit 07557eb5705e4a822055b204f2d4d86d31eb1d67)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4fdfd8f9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4fdfd8f9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4fdfd8f9

Branch: refs/heads/4.3
Commit: 4fdfd8f9139a45a84e8d9b84952606a5ad41e64a
Parents: 6609191
Author: Alena Prokharchyk 
Authored: Wed Jan 8 14:15:18 2014 -0800
Committer: Rohit Yadav 
Committed: Wed Nov 26 22:11:23 2014 +0530

--
 server/src/com/cloud/api/ApiResponseHelper.java | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4fdfd8f9/server/src/com/cloud/api/ApiResponseHelper.java
--
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java 
b/server/src/com/cloud/api/ApiResponseHelper.java
index 4d06a15..cab4f61 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -2679,6 +2679,10 @@ public class ApiResponseHelper implements 
ResponseGenerator {
 }
 response.setServices(services);
 
+Provider serviceProvider = 
Provider.getProvider(result.getProviderName());
+boolean canEnableIndividualServices = 
ApiDBUtils.canElementEnableIndividualServices(serviceProvider);
+response.setCanEnableIndividualServices(canEnableIndividualServices);
+
 response.setObjectName("networkserviceprovider");
 return response;
 }



[07/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5762: VM wizard, custom compute offering: Fix error label

(cherry picked from commit 71767cfe8199af075ca0d97db6535d2661071b9a)
Signed-off-by: Rohit Yadav 

Conflicts:
ui/css/cloudstack3.css


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8784f58f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8784f58f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8784f58f

Branch: refs/heads/4.3
Commit: 8784f58ff29721538efa67d113b185a35d57040c
Parents: 3622471
Author: Brian Federle 
Authored: Thu Oct 23 11:29:02 2014 -0700
Committer: Rohit Yadav 
Committed: Wed Nov 26 22:23:21 2014 +0530

--
 ui/css/cloudstack3.css | 11 +++
 1 file changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8784f58f/ui/css/cloudstack3.css
--
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 4ee6916..e8f5248 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -6015,6 +6015,17 @@ label.error {
   margin-left: 26px;
 }
 
+.instance-wizard .step.service-offering .custom-size .field label.error {
+  position: relative;
+  top: 0;
+  left: 0;
+}
+
+.instance-wizard .step.service-offering .custom-iops .field input {
+  width: 88%;
+  margin-left: 26px;
+}
+
 /*** Network*/
 .multi-wizard.instance-wizard .no-network {
   background: #FF;



[03/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5865. Unable to use login API if domainId parameter is id and not 
uuid

(cherry picked from commit e5512960afa384245cfb9d012ac6482b2b7f8940)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/66091911
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/66091911
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/66091911

Branch: refs/heads/4.3
Commit: 66091911331cd9a8cc8c7cee39d8f9f1e866a1b4
Parents: 1e63d0b
Author: Likitha Shetty 
Authored: Tue Jan 14 13:45:50 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 22:07:51 2014 +0530

--
 server/src/com/cloud/api/ApiServer.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66091911/server/src/com/cloud/api/ApiServer.java
--
diff --git a/server/src/com/cloud/api/ApiServer.java 
b/server/src/com/cloud/api/ApiServer.java
index 1311879..e39cc85 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -868,7 +868,11 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 
 @Override
 public Long fetchDomainId(String domainUUID) {
-return _domainMgr.getDomain(domainUUID).getId();
+Domain domain = _domainMgr.getDomain(domainUUID);
+if (domain != null)
+return domain.getId();
+else 
+return null; 
 }
 
 @Override



[11/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5446:
delete all the leftover snapshots on primary storage in case of snapshot
errors, after a new backup snapshot is finished

(cherry picked from commit 2667855ccb932f9a03ddf6639f6411c73fea1b2c)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ba7711b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ba7711b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ba7711b0

Branch: refs/heads/4.3
Commit: ba7711b06685993bca5443ebdf6ccb76e87b9f6f
Parents: e9c5a03
Author: Edison Su 
Authored: Wed Nov 19 14:31:51 2014 -0800
Committer: Rohit Yadav 
Committed: Wed Nov 26 23:43:59 2014 +0530

--
 scripts/storage/qcow2/managesnapshot.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba7711b0/scripts/storage/qcow2/managesnapshot.sh
--
diff --git a/scripts/storage/qcow2/managesnapshot.sh 
b/scripts/storage/qcow2/managesnapshot.sh
index 42bd1eb..6f13600 100755
--- a/scripts/storage/qcow2/managesnapshot.sh
+++ b/scripts/storage/qcow2/managesnapshot.sh
@@ -146,7 +146,8 @@ destroy_snapshot() {
 fi
 lvm lvremove -f "${vg}/${snapshotname}-cow"
   elif [ -f $disk ]; then
- $qemu_img snapshot -d "$snapshotname" $disk
+ #delete all the existing snapshots
+ $qemu_img snapshot -l $disk |tail -n +3|awk '{print $1}'|xargs -I {} 
$qemu_img snapshot -d {} $disk >&2
  if [ $? -gt 0 ]
  then
failed=2



[10/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5501: Allow one vpn customer gateway with multiple connections

This restriction was purposely avoid confusion of VPN setup, but later found too
strictly and cause troubles for deployment. Removed after testing one customer
gateway with multiple connections.

(cherry picked from commit 0a62eb8380390acc7b76a211ef802de0e19aaf13)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e9c5a03f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e9c5a03f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e9c5a03f

Branch: refs/heads/4.3
Commit: e9c5a03fb0253261b466fd1e3b496cbd500a8049
Parents: 6cd4b28
Author: Sheng Yang 
Authored: Mon May 12 18:26:53 2014 -0700
Committer: Rohit Yadav 
Committed: Wed Nov 26 23:36:47 2014 +0530

--
 .../src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java  | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c5a03f/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
--
diff --git a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java 
b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
index 4b21cb2..db7533e 100644
--- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
@@ -250,14 +250,9 @@ public class Site2SiteVpnManagerImpl extends ManagerBase 
implements Site2SiteVpn
 }
 
 if 
(_vpnConnectionDao.findByVpnGatewayIdAndCustomerGatewayId(vpnGatewayId, 
customerGatewayId) != null) {
-throw new InvalidParameterValueException("The vpn connection with 
customer gateway id " + customerGatewayId + " or vpn gateway id " 
-+ vpnGatewayId + " already existed!");
+throw new InvalidParameterValueException("The vpn connection with 
customer gateway id " + customerGatewayId + " and vpn gateway id " + 
vpnGatewayId +
+" already existed!");
 }
-if (_vpnConnectionDao.findByCustomerGatewayId(customerGatewayId) != 
null) {
-throw new InvalidParameterValueException("The vpn connection with 
specified customer gateway id " + customerGatewayId +
-" already exists!");
-}
-
 String[] cidrList = customerGateway.getGuestCidrList().split(",");
 
 // Remote sub nets cannot overlap VPC's sub net



[02/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5870: API support for retrieving user data

(cherry picked from commit bd79fb33a6978a9dbe7933bcda1579238da4bb27)
Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/server/ManagementServerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1e63d0b1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1e63d0b1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1e63d0b1

Branch: refs/heads/4.3
Commit: 1e63d0b1346ba6db99b9c094ce28a8f5dbd4600b
Parents: 17c3e83
Author: Alena Prokharchyk 
Authored: Thu Jan 16 15:31:01 2014 -0800
Committer: Rohit Yadav 
Committed: Wed Nov 26 22:06:44 2014 +0530

--
 api/src/com/cloud/vm/UserVmService.java |  8 +++
 .../api/command/admin/vm/GetVMUserDataCmd.java  | 63 
 .../api/response/VMUserDataResponse.java| 26 
 client/tomcatconf/commands.properties.in|  1 +
 .../com/cloud/server/ManagementServerImpl.java  |  2 +
 server/src/com/cloud/vm/UserVmManagerImpl.java  | 12 
 6 files changed, 112 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e63d0b1/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 e6ca719..4c64dcf 100755
--- a/api/src/com/cloud/vm/UserVmService.java
+++ b/api/src/com/cloud/vm/UserVmService.java
@@ -478,4 +478,12 @@ public interface UserVmService {
 
 UserVm expungeVm(long vmId) throws ResourceUnavailableException, 
ConcurrentOperationException;
 
+/**
+ * Finds and returns an encrypted password for a VM.
+ *
+ * @param  userVmId
+ * @return Base64 encoded userdata
+ */
+String getVmUserData(long vmId);
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e63d0b1/api/src/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java 
b/api/src/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java
new file mode 100644
index 000..b02dc11
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java
@@ -0,0 +1,63 @@
+package org.apache.cloudstack.api.command.admin.vm;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.cloudstack.api.response.VMUserDataResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.user.Account;
+import com.cloud.uservm.UserVm;
+
+@APICommand(name = "getVirtualMachineUserData", description = "Returns user 
data associated with the VM", responseObject = VMUserDataResponse.class, since 
= "4.4")
+public class GetVMUserDataCmd extends BaseCmd {
+public static final Logger s_logger = 
Logger.getLogger(GetVMUserDataCmd.class);
+private static final String s_name = "getvirtualmachineuserdataresponse";
+
+/
+ API parameters /
+/
+
+@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = 
CommandType.UUID, entityType = UserVmResponse.class, required = true, 
description = "The ID of the virtual machine")
+private Long vmId;
+
+/
+/// Accessors ///
+/
+
+public long getId() {
+return vmId;
+}
+
+/
+/// API Implementation///
+/
+
+@Override
+public void execute() {
+String userData = _userVmService.getVmUserData(getId());
+VMUserDataResponse resp = new VMUserDataResponse();
+resp.setVmId(_entityMgr.findById(UserVm.class, getId()).getUuid());
+resp.setUserData(userData);
+resp.setObjectName("virtualmachineuserdata");
+resp.setResponseName(getCommandName());
+this.setResponseObject(resp);
+}
+
+@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
+p

[06/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5821 systemvmiso is locked by systevmvm in hyperv

(cherry picked from commit 7ac48934f77c3b9a72c05300163088a4c198ebf2)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/36224710
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/36224710
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/36224710

Branch: refs/heads/4.3
Commit: 3622471099294dce91dd6dce5d096fa791ddf9ef
Parents: 4d24452
Author: Rajesh Battala 
Authored: Tue Jan 28 06:42:54 2014 +0530
Committer: Rohit Yadav 
Committed: Wed Nov 26 22:15:35 2014 +0530

--
 systemvm/patches/debian/config/etc/init.d/cloud-early-config | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/36224710/systemvm/patches/debian/config/etc/init.d/cloud-early-config
--
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config 
b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 8cc927f..a34db68 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -135,7 +135,7 @@ get_boot_params() {
  virtualpc|hyperv)
   # Hyper-V is recognized as virtualpc hypervisor type. Boot args are 
passed using KVP Daemon
   #waiting for the hv_kvp_daemon to start up
-  #sleep 30 need to fix the race condition of hv_kvp_daemon and 
cloud-early-config
+  #sleep  need to fix the race condition of hv_kvp_daemon and 
cloud-early-config
   sleep 5
   cp -f /var/opt/hyperv/.kvp_pool_0 /var/cache/cloud/cmdline
   cat /dev/null > /var/opt/hyperv/.kvp_pool_0
@@ -1250,6 +1250,10 @@ start() {
   patch_log4j
   parse_cmd_line
   change_password
+  if [ "$hyp" == "hyperv" ]; then
+# eject the systemvm.iso
+  eject
+  fi
   case $TYPE in 
  router)
  [ "$NAME" == "" ] && NAME=router



[08/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5719: UI > Network > Add Guest Network > when Physical Network 
dropdown is changed, refresh Network Offering dropdown (because each physical 
network has its own tags which maps to different network offerings)

(cherry picked from commit 0af0c041e9b05d52d72936b6ecd194ee07be7421)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bce07b68
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bce07b68
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bce07b68

Branch: refs/heads/4.3
Commit: bce07b68b8c26f3b44d0e91d76295aaf1d9d15f6
Parents: 8784f58
Author: Jessica Wang 
Authored: Thu Oct 9 13:14:52 2014 -0700
Committer: Rohit Yadav 
Committed: Wed Nov 26 22:24:52 2014 +0530

--
 ui/scripts/sharedFunctions.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bce07b68/ui/scripts/sharedFunctions.js
--
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 86a4a92..b33b099 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -476,7 +476,7 @@ var addGuestNetworkDialog = {
 networkOfferingId: {
 label: 'label.network.offering',
 docID: 'helpGuestNetworkZoneNetworkOffering',
-dependsOn: ['zoneId', 'scope'],
+dependsOn: ['zoneId', 'physicalNetworkId', 'scope'],
 select: function(args) {   

if(args.$form.find('.form-item[rel=zoneId]').find('select').val() == null || 
args.$form.find('.form-item[rel=zoneId]').find('select').val().length == 0) {
args.response.success({



[09/12] git commit: updated refs/heads/4.3 to 8de4894

2014-11-26 Thread bhaisaab
CLOUDSTACK-5576: UI > IP Address > EnableVPN, DisableVPN: change label.

(cherry picked from commit e796d418b4ff7d3644bcc962b796d929b3d7baf7)
Signed-off-by: Rohit Yadav 

Conflicts:
ui/scripts/network.js


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6cd4b289
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6cd4b289
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6cd4b289

Branch: refs/heads/4.3
Commit: 6cd4b289b2d73359152a4bf53b74edee8e725384
Parents: bce07b6
Author: Jessica Wang 
Authored: Fri Oct 17 14:46:23 2014 -0700
Committer: Rohit Yadav 
Committed: Wed Nov 26 23:31:25 2014 +0530

--
 client/WEB-INF/classes/resources/messages.properties | 10 +-
 ui/scripts/network.js|  8 +++-
 2 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6cd4b289/client/WEB-INF/classes/resources/messages.properties
--
diff --git a/client/WEB-INF/classes/resources/messages.properties 
b/client/WEB-INF/classes/resources/messages.properties
index 1af9b30..c6ab351 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -522,7 +522,7 @@ label.DHCP.server.type=DHCP Server Type
 label.dhcp=DHCP
 label.direct.ips=Shared Network IPs
 label.disable.provider=Disable provider
-label.disable.vpn=Disable VPN
+label.disable.vpn=Disable Remote Access VPN
 label.disabled=Disabled
 label.disabling.vpn.access=Disabling VPN Access
 label.disk.allocated=Disk Allocated
@@ -572,7 +572,7 @@ label.email=Email
 label.enable.provider=Enable provider
 label.enable.s3=Enable S3-backed Secondary Storage
 label.enable.swift=Enable Swift
-label.enable.vpn=Enable VPN
+label.enable.vpn=Enable Remote Access VPN
 label.enabling.vpn.access=Enabling VPN Access
 label.enabling.vpn=Enabling VPN
 label.end.IP=End IP
@@ -1436,7 +1436,7 @@ message.detach.iso.confirm=Please confirm that you want 
to detach the ISO from t
 message.disable.account=Please confirm that you want to disable this account.  
By disabling the account, all users for this account will no longer have access 
to their cloud resources.  All running virtual machines will be immediately 
shut down.
 message.disable.snapshot.policy=You have successfully disabled your current 
snapshot policy.
 message.disable.user=Please confirm that you would like to disable this user.
-message.disable.vpn.access=Please confirm that you want to disable VPN Access.
+message.disable.vpn.access=Please confirm that you want to disable Remote 
Access VPN.
 message.disable.vpn=Are you sure you want to disable VPN?
 message.download.ISO=Please click 0 to download ISO
 message.download.template=Please click 0 to download 
template
@@ -1449,9 +1449,9 @@ message.edit.traffic.type=Please specify the traffic 
label you want associated w
 message.enable.account=Please confirm that you want to enable this account.
 message.enable.user=Please confirm that you would like to enable this user.
 message.enable.vpn.access=VPN is currently disabled for this IP Address.  
Would you like to enable VPN access?
-message.enable.vpn=Please confirm that you want VPN access enabled for this IP 
address.
+message.enable.vpn=Please confirm that you want Remote Access VPN enabled for 
this IP address.
 message.enabled.vpn.ip.sec=Your IPSec pre-shared key is
-message.enabled.vpn=Your VPN access is currently enabled and can be accessed 
via the IP
+message.enabled.vpn=Your Remote Access VPN is currently enabled and can be 
accessed via the IP
 message.enabling.security.group.provider=Enabling Security Group provider
 message.enabling.zone=Enabling zone
 message.enter.token=Please enter the token that you were given in your invite 
e-mail.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6cd4b289/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 511ad41..9d3b6ae 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2275,7 +2275,13 @@
 return 'label.enable.vpn';
 },
 complete: function(args) {
-return _l('message.enabled.vpn') + ' ' 
+ args.remoteaccessvpn.publicip + '.' + '' + 
_l('message.enabled.vpn.ip.sec') + '' + args.remoteaccessvpn.presharedkey;
+var msg;
+if (args.vpn.state == "Running") {
+msg = _l('message.enabled.vpn') + 
' ' + args.remoteaccessvpn.publ

git commit: updated refs/heads/master to 488c178

2014-11-27 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/master 612b4ae6d -> 488c17858


CLOUDSTACK-6075: Increase the ram size for router service offering

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/488c1785
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/488c1785
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/488c1785

Branch: refs/heads/master
Commit: 488c17858f17f548d907cd72df54e0abdfd439b2
Parents: 612b4ae
Author: Harikrishna Patnala 
Authored: Thu Nov 27 12:41:22 2014 +0530
Committer: Rohit Yadav 
Committed: Thu Nov 27 16:04:59 2014 +0530

--
 .../com/cloud/upgrade/dao/Upgrade442to450.java  | 85 
 .../lb/InternalLoadBalancerVMManager.java   |  2 +-
 server/src/com/cloud/configuration/Config.java  |  2 +-
 .../router/VirtualNetworkApplianceManager.java  |  2 +-
 setup/db/db/schema-442to450.sql |  2 +
 5 files changed, 90 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488c1785/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
--
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java 
b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
index dc1057f..aeb44a1 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
@@ -68,8 +68,93 @@ public class Upgrade442to450 implements DbUpgrade {
 updateSystemVmTemplates(conn);
 dropInvalidKeyFromStoragePoolTable(conn);
 dropDuplicatedForeignKeyFromAsyncJobTable(conn);
+upgradeMemoryOfVirtualRoutervmOffering(conn);
+upgradeMemoryOfInternalLoadBalancervmOffering(conn);
 }
 
+private void upgradeMemoryOfVirtualRoutervmOffering(Connection conn) {
+PreparedStatement updatePstmt = null;
+PreparedStatement selectPstmt = null;
+ResultSet selectResultSet = null;
+int newRamSize = 256; //256MB
+long serviceOfferingId = 0;
+
+/**
+ * Pick first row in service_offering table which has system vm type 
as domainrouter. User added offerings would start from 2nd row onwards.
+ * We should not update/modify any user-defined offering.
+ */
+
+try {
+selectPstmt = conn.prepareStatement("SELECT id FROM 
`cloud`.`service_offering` WHERE vm_type='domainrouter'");
+updatePstmt = conn.prepareStatement("UPDATE 
`cloud`.`service_offering` SET ram_size=? WHERE id=?");
+selectResultSet = selectPstmt.executeQuery();
+if(selectResultSet.next()) {
+serviceOfferingId = selectResultSet.getLong("id");
+}
+
+updatePstmt.setInt(1, newRamSize);
+updatePstmt.setLong(2, serviceOfferingId);
+updatePstmt.executeUpdate();
+} catch (SQLException e) {
+throw new CloudRuntimeException("Unable to upgrade ram_size of 
service offering for domain router. ", e);
+} finally {
+try {
+if (selectPstmt != null) {
+selectPstmt.close();
+}
+if (selectResultSet != null) {
+selectResultSet.close();
+}
+if (updatePstmt != null) {
+updatePstmt.close();
+}
+} catch (SQLException e) {
+}
+}
+s_logger.debug("Done upgrading RAM for service offering of domain 
router to " + newRamSize);
+}
+
+private void upgradeMemoryOfInternalLoadBalancervmOffering(Connection 
conn) {
+PreparedStatement updatePstmt = null;
+PreparedStatement selectPstmt = null;
+ResultSet selectResultSet = null;
+int newRamSize = 256; //256MB
+long serviceOfferingId = 0;
+
+/**
+ * Pick first row in service_offering table which has system vm type 
as internalloadbalancervm. User added offerings would start from 2nd row 
onwards.
+ * We should not update/modify any user-defined offering.
+ */
+
+try {
+selectPstmt = conn.prepareStatement("SELECT id FROM 
`cloud`.`service_offering` WHERE vm_type='internalloadbalancervm'");
+updatePstmt = conn.prepareStatement("UPDATE 
`cloud`.`service_offering` SET ram_size=? WHERE id=?");
+selectResultSet = selectPstmt.executeQuery();
+if(selectResultSet.next()) {
+serviceOfferingId = selectResultSet.getLong("id");
+}
+
+updatePstmt.setInt(1, newRamSize);
+updatePstmt.setLong(2, serviceOfferingId);
+updatePstmt.executeUpda

git commit: updated refs/heads/4.5 to cdfdda2

2014-11-27 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 737a4c43c -> cdfdda205


CLOUDSTACK-6075: Increase the ram size for router service offering

Signed-off-by: Rohit Yadav 
(cherry picked from commit 488c17858f17f548d907cd72df54e0abdfd439b2)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cdfdda20
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cdfdda20
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cdfdda20

Branch: refs/heads/4.5
Commit: cdfdda205126bce86a4411264aca4347cfb6e254
Parents: 737a4c4
Author: Harikrishna Patnala 
Authored: Thu Nov 27 12:41:22 2014 +0530
Committer: Rohit Yadav 
Committed: Thu Nov 27 16:05:34 2014 +0530

--
 .../com/cloud/upgrade/dao/Upgrade442to450.java  | 85 
 .../lb/InternalLoadBalancerVMManager.java   |  2 +-
 server/src/com/cloud/configuration/Config.java  |  2 +-
 .../router/VirtualNetworkApplianceManager.java  |  2 +-
 setup/db/db/schema-442to450.sql |  2 +
 5 files changed, 90 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cdfdda20/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
--
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java 
b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
index dc1057f..aeb44a1 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
@@ -68,8 +68,93 @@ public class Upgrade442to450 implements DbUpgrade {
 updateSystemVmTemplates(conn);
 dropInvalidKeyFromStoragePoolTable(conn);
 dropDuplicatedForeignKeyFromAsyncJobTable(conn);
+upgradeMemoryOfVirtualRoutervmOffering(conn);
+upgradeMemoryOfInternalLoadBalancervmOffering(conn);
 }
 
+private void upgradeMemoryOfVirtualRoutervmOffering(Connection conn) {
+PreparedStatement updatePstmt = null;
+PreparedStatement selectPstmt = null;
+ResultSet selectResultSet = null;
+int newRamSize = 256; //256MB
+long serviceOfferingId = 0;
+
+/**
+ * Pick first row in service_offering table which has system vm type 
as domainrouter. User added offerings would start from 2nd row onwards.
+ * We should not update/modify any user-defined offering.
+ */
+
+try {
+selectPstmt = conn.prepareStatement("SELECT id FROM 
`cloud`.`service_offering` WHERE vm_type='domainrouter'");
+updatePstmt = conn.prepareStatement("UPDATE 
`cloud`.`service_offering` SET ram_size=? WHERE id=?");
+selectResultSet = selectPstmt.executeQuery();
+if(selectResultSet.next()) {
+serviceOfferingId = selectResultSet.getLong("id");
+}
+
+updatePstmt.setInt(1, newRamSize);
+updatePstmt.setLong(2, serviceOfferingId);
+updatePstmt.executeUpdate();
+} catch (SQLException e) {
+throw new CloudRuntimeException("Unable to upgrade ram_size of 
service offering for domain router. ", e);
+} finally {
+try {
+if (selectPstmt != null) {
+selectPstmt.close();
+}
+if (selectResultSet != null) {
+selectResultSet.close();
+}
+if (updatePstmt != null) {
+updatePstmt.close();
+}
+} catch (SQLException e) {
+}
+}
+s_logger.debug("Done upgrading RAM for service offering of domain 
router to " + newRamSize);
+}
+
+private void upgradeMemoryOfInternalLoadBalancervmOffering(Connection 
conn) {
+PreparedStatement updatePstmt = null;
+PreparedStatement selectPstmt = null;
+ResultSet selectResultSet = null;
+int newRamSize = 256; //256MB
+long serviceOfferingId = 0;
+
+/**
+ * Pick first row in service_offering table which has system vm type 
as internalloadbalancervm. User added offerings would start from 2nd row 
onwards.
+ * We should not update/modify any user-defined offering.
+ */
+
+try {
+selectPstmt = conn.prepareStatement("SELECT id FROM 
`cloud`.`service_offering` WHERE vm_type='internalloadbalancervm'");
+updatePstmt = conn.prepareStatement("UPDATE 
`cloud`.`service_offering` SET ram_size=? WHERE id=?");
+selectResultSet = selectPstmt.executeQuery();
+if(selectResultSet.next()) {
+serviceOfferingId = selectResultSet.getLong("id");
+}
+
+updatePstmt.setInt(1, newRamSize);
+

git commit: updated refs/heads/4.4 to 9d7624f

2014-11-27 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 207d4653f -> 9d7624f6a


Occasionally the while loop can exit with no data (Probably recieving an EOF) 
before receiveing CMDline data from the certial port. Continue looping until 
cmdline is populated

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9d7624f6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9d7624f6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9d7624f6

Branch: refs/heads/4.4
Commit: 9d7624f6acac104415ae64d7c7126b5771141d8e
Parents: 207d465
Author: David Bierce 
Authored: Fri Sep 12 10:52:29 2014 -0500
Committer: Rohit Yadav 
Committed: Thu Nov 27 16:56:47 2014 +0530

--
 .../debian/config/etc/init.d/cloud-early-config | 22 +++-
 1 file changed, 12 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d7624f6/systemvm/patches/debian/config/etc/init.d/cloud-early-config
--
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config 
b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 97bca12..1240389 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -117,16 +117,18 @@ get_boot_params() {
   if [ ! -e /dev/vport0p1 ]; then
 log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too 
old." && exit 2
   fi
-  while read line; do
-if [[ $line == cmdline:* ]]; then
-  cmd=${line//cmdline:/}
-  echo $cmd > /var/cache/cloud/cmdline
-elif [[ $line == pubkey:* ]]; then
-  pubkey=${line//pubkey:/}
-  echo $pubkey > /var/cache/cloud/authorized_keys
-  echo $pubkey > /root/.ssh/authorized_keys
-fi
-  done < /dev/vport0p1
+ while [$cmd -eq ""]; do
+while read line; do
+  if [[ $line == cmdline:* ]]; then
+cmd=${line//cmdline:/}
+echo $cmd > /var/cache/cloud/cmdline
+  elif [[ $line == pubkey:* ]]; then
+pubkey=${line//pubkey:/}
+echo $pubkey > /var/cache/cloud/authorized_keys
+echo $pubkey > /root/.ssh/authorized_keys
+  fi
+done < /dev/vport0p1
+ done
   chmod go-rwx /root/.ssh/authorized_keys
   ;;
  vmware)



git commit: updated refs/heads/4.2 to 7edde4a

2014-11-27 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.2 14b846877 -> 7edde4a5c


PATCH: CLOUDSTACK-6254

Fixes the cleanup process to only remove the Template symlink, instead of 
delete the template from Secondary Storage.

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7edde4a5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7edde4a5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7edde4a5

Branch: refs/heads/4.2
Commit: 7edde4a5c7d849f5c9184972f8d4bc1f79770f65
Parents: 14b8468
Author: David Bierce 
Authored: Wed Aug 27 09:31:18 2014 -0500
Committer: Rohit Yadav 
Committed: Thu Nov 27 16:59:06 2014 +0530

--
 .../storage/image/datastore/ImageStoreEntity.java  |  3 ++-
 .../storage/image/store/ImageStoreImpl.java|  5 +++--
 .../storage/image/BaseImageStoreDriverImpl.java|  3 ++-
 .../cloudstack/storage/image/ImageStoreDriver.java |  4 +++-
 .../driver/CloudStackImageStoreDriverImpl.java | 17 -
 .../src/com/cloud/storage/StorageManagerImpl.java  |  4 ++--
 6 files changed, 24 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7edde4a5/engine/api/src/org/apache/cloudstack/storage/image/datastore/ImageStoreEntity.java
--
diff --git 
a/engine/api/src/org/apache/cloudstack/storage/image/datastore/ImageStoreEntity.java
 
b/engine/api/src/org/apache/cloudstack/storage/image/datastore/ImageStoreEntity.java
index 7ebfd0d..be82364 100644
--- 
a/engine/api/src/org/apache/cloudstack/storage/image/datastore/ImageStoreEntity.java
+++ 
b/engine/api/src/org/apache/cloudstack/storage/image/datastore/ImageStoreEntity.java
@@ -27,6 +27,7 @@ import 
org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 
 import com.cloud.storage.ImageStore;
+import com.cloud.storage.Upload;
 import com.cloud.storage.Storage.ImageFormat;
 
 public interface ImageStoreEntity extends DataStore, ImageStore {
@@ -44,5 +45,5 @@ public interface ImageStoreEntity extends DataStore, 
ImageStore {
 
 String createEntityExtractUrl(String installPath, ImageFormat format, 
DataObject dataObject);  // get the entity download URL
 
-void deleteExtractUrl(String installPath, String url);
+void deleteExtractUrl(String installPath, String url, Upload.Type volume);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7edde4a5/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
--
diff --git 
a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
 
b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
index 7bbe324..5c05955 100644
--- 
a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
+++ 
b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
@@ -45,6 +45,7 @@ import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.dao.VMTemplateDao;
+import com.cloud.storage.Upload;
 import com.cloud.utils.component.ComponentContext;
 
 public class ImageStoreImpl implements ImageStoreEntity {
@@ -195,8 +196,8 @@ public class ImageStoreImpl implements ImageStoreEntity {
 }
 
 @Override
-public void deleteExtractUrl(String installPath, String url) {
-driver.deleteEntityExtractUrl(this, installPath, url);
+public void deleteExtractUrl(String installPath, String url, Upload.Type 
entityType ) {
+driver.deleteEntityExtractUrl(this, installPath, url, entityType);
 }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7edde4a5/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
--
diff --git 
a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
 
b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
index 2905f08..8e884d5 100644
--- 
a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
+++ 
b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
@@ -30,6 +30,7 @@ import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.storage.dao.VolumeDao;
 import com.cloud.storage.download.DownloadMonitor;
+import com.cloud.storage.Upload;
 import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
 import org.apache.c

git commit: updated refs/heads/4.3 to 0a935a3

2014-11-27 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.3 8de489469 -> 0a935a336


CLOUDSTACK-2823: Loop through cmdline when patching routers

Backported from https://reviews.apache.org/r/25585/diff which did not merge
this fix on 4.3 branch. Occasionally the while loop can exit with no data 
(Probably
 recieving an EOF) before receiveing CMDline data from the certial port.
Continue looping until cmdline is populated

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0a935a33
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0a935a33
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0a935a33

Branch: refs/heads/4.3
Commit: 0a935a336ebf9dcc1c3b25a56f629bb9a217b56f
Parents: 8de4894
Author: David Bierce 
Authored: Thu Nov 27 16:50:51 2014 +0530
Committer: Rohit Yadav 
Committed: Thu Nov 27 16:54:34 2014 +0530

--
 .../debian/config/etc/init.d/cloud-early-config | 23 +++-
 1 file changed, 13 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0a935a33/systemvm/patches/debian/config/etc/init.d/cloud-early-config
--
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config 
b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index a34db68..e46db2b 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -117,16 +117,19 @@ get_boot_params() {
   if [ ! -e /dev/vport0p1 ]; then
 log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too 
old." && exit 2
   fi
-  while read line; do
-if [[ $line == cmdline:* ]]; then
-  cmd=${line//cmdline:/}
-  echo $cmd > /var/cache/cloud/cmdline
-elif [[ $line == pubkey:* ]]; then
-  pubkey=${line//pubkey:/}
-  echo $pubkey > /var/cache/cloud/authorized_keys
-  echo $pubkey > /root/.ssh/authorized_keys
-fi
-  done < /dev/vport0p1
+
+  while [$cmd -eq ""]; do
+  while read line; do
+if [[ $line == cmdline:* ]]; then
+  cmd=${line//cmdline:/}
+  echo $cmd > /var/cache/cloud/cmdline
+elif [[ $line == pubkey:* ]]; then
+  pubkey=${line//pubkey:/}
+  echo $pubkey > /var/cache/cloud/authorized_keys
+  echo $pubkey > /root/.ssh/authorized_keys
+fi
+  done < /dev/vport0p1
+  done
   chmod go-rwx /root/.ssh/authorized_keys
   ;;
  vmware)



git commit: updated refs/heads/master to 21a6bef

2014-11-28 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/master 9f4c267d5 -> 21a6bef53


CLOUDSTACK-7989: Ignore Auth API calls in unauthenticated HTTP handlers

If an auth API call (such as login, logout) is called on unauthenticated port
such as the 8096 integration server port, we need to ignore such API calls
as calling auth APIs on 8096 is un-necessary and is undefined.

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/21a6bef5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/21a6bef5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/21a6bef5

Branch: refs/heads/master
Commit: 21a6bef53b05d430f2cff53ae37033432603136d
Parents: 9f4c267
Author: Rohit Yadav 
Authored: Fri Nov 28 15:43:29 2014 +0530
Committer: Rohit Yadav 
Committed: Fri Nov 28 15:43:29 2014 +0530

--
 server/src/com/cloud/api/ApiServer.java| 17 +++--
 .../api/auth/APIAuthenticationManagerImpl.java |  3 ++-
 2 files changed, 13 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/21a6bef5/server/src/com/cloud/api/ApiServer.java
--
diff --git a/server/src/com/cloud/api/ApiServer.java 
b/server/src/com/cloud/api/ApiServer.java
index 435efa0..e60af3b 100644
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -66,6 +66,7 @@ import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.ResponseObject;
 import org.apache.cloudstack.api.ResponseObject.ResponseView;
 import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.auth.APIAuthenticationManager;
 import org.apache.cloudstack.api.command.admin.account.ListAccountsCmdByAdmin;
 import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
 import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
@@ -204,6 +205,8 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 private ConfigurationDao _configDao;
 @Inject
 private EntityManager _entityMgr;
+@Inject
+APIAuthenticationManager _authManager;
 
 List _pluggableServices;
 List _apiAccessCheckers;
@@ -485,6 +488,10 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 }
 throw new 
ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, "Invalid request, no 
command sent");
 } else {
+// Don't allow Login/Logout APIs to go past this point
+if (_authManager.getAPIAuthenticator(command[0]) != null) {
+return null;
+}
 final Map paramMap = new HashMap();
 final Set keys = params.keySet();
 final Iterator keysIter = keys.iterator();
@@ -522,12 +529,10 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 else
 buildAuditTrail(auditTrailSb, command[0], response);
 } else {
-if (!command[0].equalsIgnoreCase("login") && 
!command[0].equalsIgnoreCase("logout")) {
-final String errorString = "Unknown API command: " + 
command[0];
-s_logger.warn(errorString);
-auditTrailSb.append(" " + errorString);
-throw new 
ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, errorString);
-}
+final String errorString = "Unknown API command: " + 
command[0];
+s_logger.warn(errorString);
+auditTrailSb.append(" " + errorString);
+throw new 
ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, errorString);
 }
 }
 } catch (final InvalidParameterValueException ex) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/21a6bef5/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
--
diff --git a/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java 
b/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
index fc21b19..9d0ab68 100644
--- a/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
+++ b/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
@@ -57,7 +57,7 @@ public class APIAuthenticationManagerImpl extends ManagerBase 
implements APIAuth
 APICommand command = authenticator.getAnnotation(APICommand.class);
 if (command != null && !command.name().isEmpty()
 && APIAuthenticator.class.isAssignableFrom(authen

git commit: updated refs/heads/4.5 to d28b716

2014-11-28 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 66afce66b -> d28b716d8


CLOUDSTACK-7989: Ignore Auth API calls in unauthenticated HTTP handlers

If an auth API call (such as login, logout) is called on unauthenticated port
such as the 8096 integration server port, we need to ignore such API calls
as calling auth APIs on 8096 is un-necessary and is undefined.

Signed-off-by: Rohit Yadav 
(cherry picked from commit 21a6bef53b05d430f2cff53ae37033432603136d)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d28b716d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d28b716d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d28b716d

Branch: refs/heads/4.5
Commit: d28b716d8aec70f7f8b53990b22a7932fa4725d2
Parents: 66afce6
Author: Rohit Yadav 
Authored: Fri Nov 28 15:43:29 2014 +0530
Committer: Rohit Yadav 
Committed: Fri Nov 28 15:46:17 2014 +0530

--
 server/src/com/cloud/api/ApiServer.java| 17 +++--
 .../api/auth/APIAuthenticationManagerImpl.java |  3 ++-
 2 files changed, 13 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d28b716d/server/src/com/cloud/api/ApiServer.java
--
diff --git a/server/src/com/cloud/api/ApiServer.java 
b/server/src/com/cloud/api/ApiServer.java
index 2156d60..f35bd9d 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -66,6 +66,7 @@ import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.ResponseObject;
 import org.apache.cloudstack.api.ResponseObject.ResponseView;
 import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.auth.APIAuthenticationManager;
 import org.apache.cloudstack.api.command.admin.account.ListAccountsCmdByAdmin;
 import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
 import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
@@ -204,6 +205,8 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 private ConfigurationDao _configDao;
 @Inject
 private EntityManager _entityMgr;
+@Inject
+APIAuthenticationManager _authManager;
 
 List _pluggableServices;
 List _apiAccessCheckers;
@@ -483,6 +486,10 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 }
 throw new 
ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, "Invalid request, no 
command sent");
 } else {
+// Don't allow Login/Logout APIs to go past this point
+if (_authManager.getAPIAuthenticator(command[0]) != null) {
+return null;
+}
 final Map paramMap = new HashMap();
 final Set keys = params.keySet();
 final Iterator keysIter = keys.iterator();
@@ -520,12 +527,10 @@ public class ApiServer extends ManagerBase implements 
HttpRequestHandler, ApiSer
 else
 buildAuditTrail(auditTrailSb, command[0], response);
 } else {
-if (!command[0].equalsIgnoreCase("login") && 
!command[0].equalsIgnoreCase("logout")) {
-final String errorString = "Unknown API command: " + 
command[0];
-s_logger.warn(errorString);
-auditTrailSb.append(" " + errorString);
-throw new 
ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, errorString);
-}
+final String errorString = "Unknown API command: " + 
command[0];
+s_logger.warn(errorString);
+auditTrailSb.append(" " + errorString);
+throw new 
ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, errorString);
 }
 }
 } catch (final InvalidParameterValueException ex) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d28b716d/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
--
diff --git a/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java 
b/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
index fc21b19..9d0ab68 100644
--- a/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
+++ b/server/src/com/cloud/api/auth/APIAuthenticationManagerImpl.java
@@ -57,7 +57,7 @@ public class APIAuthenticationManagerImpl extends ManagerBase 
implements APIAuth
 APICommand command = authenticator.getAnnotation(APICommand.class);
 if (command != null && !comm

git commit: updated refs/heads/master to 0128d62

2014-11-28 Thread bhaisaab
Repository: cloudstack
Updated Branches:
  refs/heads/master 21a6bef53 -> 0128d6299


packaging: add license to missing cloud.limits

I think Hugo/Daan forgot to add license header on one of the new centos7
packaging :)

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0128d629
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0128d629
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0128d629

Branch: refs/heads/master
Commit: 0128d62992028f1de6b42bc0679fa1cb0322c9b8
Parents: 21a6bef
Author: Rohit Yadav 
Authored: Fri Nov 28 16:10:37 2014 +0530
Committer: Rohit Yadav 
Committed: Fri Nov 28 16:10:37 2014 +0530

--
 packaging/centos7/cloud.limits | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0128d629/packaging/centos7/cloud.limits
--
diff --git a/packaging/centos7/cloud.limits b/packaging/centos7/cloud.limits
index fe85be4..7debeb2 100644
--- a/packaging/centos7/cloud.limits
+++ b/packaging/centos7/cloud.limits
@@ -1,2 +1,19 @@
+# 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.
+
 cloud hard nofile 4096
 cloud soft nofile 4096



[33/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
UI cleanup


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/db9c97e7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/db9c97e7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/db9c97e7

Branch: refs/heads/useraccount-refactoring
Commit: db9c97e7f4701034fa30d952b58e4928610c504a
Parents: 4798db0
Author: Brian Federle 
Authored: Thu Aug 22 13:14:54 2013 -0700
Committer: Brian Federle 
Committed: Wed Nov 26 11:48:27 2014 -0800

--
 ui/scripts/ui/core.js | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/db9c97e7/ui/scripts/ui/core.js
--
diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js
index 94edb19..c5816a0 100644
--- a/ui/scripts/ui/core.js
+++ b/ui/scripts/ui/core.js
@@ -285,6 +285,9 @@
 .appendTo(this);
 var context = args.context;
 
+// Cleanup login
+$('.login').remove();
+
 // Create pageElems
 $.each(pageElems, function(id, fn) {
 var $elem = $('').attr({



[13/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7965: Fix script related to force delete domain test case

Signed-off-by: SrikanteswaraRao Talluri 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f825288
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f825288
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f825288

Branch: refs/heads/useraccount-refactoring
Commit: 4f825288290cc7ec67301a3aa1306d30eb1e682b
Parents: 9585aa0
Author: Ashutosh K 
Authored: Mon Nov 24 16:16:55 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Tue Nov 25 18:18:16 2014 +0530

--
 test/integration/component/test_persistent_networks.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f825288/test/integration/component/test_persistent_networks.py
--
diff --git a/test/integration/component/test_persistent_networks.py 
b/test/integration/component/test_persistent_networks.py
index f782700..ff563df 100644
--- a/test/integration/component/test_persistent_networks.py
+++ b/test/integration/component/test_persistent_networks.py
@@ -2784,15 +2784,15 @@ class TestVPCNetworkOperations(cloudstackTestCase):
 "vlan must not be null for persistent network: %s" %
 persistent_network_2.id)
 
-# Force delete domain
-child_domain.delete(self.apiclient, cleanup=True)
-
 except Exception as e:
 self.cleanup.append(account_1)
 self.cleanup.append(account_2)
 self.cleanup.append(child_domain)
 self.fail(e)
 
+# Force delete domain
+child_domain.delete(self.apiclient, cleanup=True)
+
 self.debug("Waiting for account.cleanup.interval" +
" to cleanup any remaining resouces")
 # Sleep 3*account.gc to ensure that all resources are deleted



[03/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
4.4.2 upgrade schema
remove 441to450 ddl
(cherry picked from commit 5578616143f2eb1aded26b86101c73858a67fa35)
(cherry picked from commit f18d6238b0219061e5ad81dc8852de6290da9e55)

Conflicts:
engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java

schema: Add upgrade paths from 4.3.2 to 4.4.0

Signed-off-by: Rohit Yadav 
(cherry picked from commit 73c62837b5f9e0c4acb1f513c32f3c9579316e00)

Conflicts:
engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
setup/db/db/schema-441to450.sql

merged new work from schema-441to450.sql into schema-442to450.sql


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3cb78fc7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3cb78fc7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3cb78fc7

Branch: refs/heads/useraccount-refactoring
Commit: 3cb78fc74221e521c205b21590e6d8a4a24e6b91
Parents: d475b62
Author: Daan Hoogland 
Authored: Thu Nov 13 20:01:35 2014 +0100
Committer: Daan Hoogland 
Committed: Mon Nov 24 16:25:44 2014 +0100

--
 .../cloud/upgrade/DatabaseUpgradeChecker.java   | 138 ++--
 .../com/cloud/upgrade/dao/Upgrade441to442.java  |  64 ++
 .../com/cloud/upgrade/dao/Upgrade441to450.java  | 239 --
 .../com/cloud/upgrade/dao/Upgrade442to450.java  | 234 ++
 setup/db/db/schema-441to442.sql |  21 +
 setup/db/db/schema-441to450-cleanup.sql |  33 -
 setup/db/db/schema-441to450.sql | 770 ---
 setup/db/db/schema-442to450-cleanup.sql |  33 +
 setup/db/db/schema-442to450.sql | 770 +++
 9 files changed, 1203 insertions(+), 1099 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3cb78fc7/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
--
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java 
b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
index c7216cb..dcf32d8 100644
--- a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -69,7 +69,8 @@ import com.cloud.upgrade.dao.Upgrade430to440;
 import com.cloud.upgrade.dao.Upgrade431to440;
 import com.cloud.upgrade.dao.Upgrade432to440;
 import com.cloud.upgrade.dao.Upgrade440to441;
-import com.cloud.upgrade.dao.Upgrade441to450;
+import com.cloud.upgrade.dao.Upgrade441to442;
+import com.cloud.upgrade.dao.Upgrade442to450;
 import com.cloud.upgrade.dao.Upgrade450to460;
 import com.cloud.upgrade.dao.UpgradeSnapshot217to224;
 import com.cloud.upgrade.dao.UpgradeSnapshot223to224;
@@ -100,8 +101,8 @@ public class DatabaseUpgradeChecker implements 
SystemIntegrityChecker {
 new Upgrade227to228(), new Upgrade228to229(), new 
Upgrade229to2210(), new Upgrade2210to2211(),
 new Upgrade2211to2212(), new Upgrade2212to2213(), new 
Upgrade2213to2214(), new Upgrade2214to30(),
 new Upgrade30to301(), new Upgrade301to302(), new 
Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
-new Upgrade420to421(), new Upgrade421to430(), new 
Upgrade430to440(), new Upgrade440to441(),
-new Upgrade441to450(), new Upgrade450to460()});
+new Upgrade420to421(), new Upgrade421to430(), new 
Upgrade430to440(), new Upgrade440to441(), new Upgrade441to442(),
+new Upgrade442to450(), new Upgrade450to460()});
 
 _upgradeMap.put("2.1.8", new DbUpgrade[] {new Upgrade218to22(), new 
Upgrade221to222(), new UpgradeSnapshot217to224(),
 new Upgrade222to224(), new Upgrade218to224DomainVlans(), new 
Upgrade224to225(), new Upgrade225to226(),
@@ -109,7 +110,8 @@ public class DatabaseUpgradeChecker implements 
SystemIntegrityChecker {
 new Upgrade2211to2212(), new Upgrade2212to2213(), new 
Upgrade2213to2214(),
 new Upgrade2214to30(), new Upgrade30to301(), new 
Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new 
Upgrade410to420(), new Upgrade420to421(),
 new Upgrade421to430(), new Upgrade430to440(),
-new Upgrade440to441(), new Upgrade441to450(), new 
Upgrade450to460()});
+new Upgrade440to441(), new Upgrade441to442(),
+new Upgrade442to450(), new Upgrade450to460()});
 
 _upgradeMap.put("2.1.9", new DbUpgrade[] {new Upgrade218to22(), new 
Upgrade221to222(), new UpgradeSnapshot217to224(),
 new Upgrade222to224(), new Upgrade218to224DomainVlans(), new 
Upgrade224to225(), new Upgrade225to226(),
@@ -117,161 +119,183 @@ public class DatabaseUpgradeChecker i

[12/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-6465: vmware.reserve.mem is missing from cluster level settings

Signed-off-by: Rajani Karuturi 
(cherry picked from commit eae733817b3670b0151410c027325f78013392ad)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9585aa0b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9585aa0b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9585aa0b

Branch: refs/heads/useraccount-refactoring
Commit: 9585aa0b51a571d5ea3c33c98bec13f5230ecf4a
Parents: 93f8213
Author: Harikrishna Patnala 
Authored: Mon Nov 10 14:30:42 2014 +0530
Committer: Rajani Karuturi 
Committed: Tue Nov 25 15:55:54 2014 +0530

--
 .../src/com/cloud/hypervisor/guru/VMwareGuru.java |  8 
 .../vmware/manager/VmwareManagerImpl.java | 13 -
 .../vmware/resource/VmwareResource.java   | 18 --
 server/src/com/cloud/configuration/Config.java| 16 
 4 files changed, 8 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9585aa0b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
index 7c23699..c0711f2 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
@@ -149,11 +149,11 @@ public class VMwareGuru extends HypervisorGuruBase 
implements HypervisorGuru, Co
 super();
 }
 
-static final ConfigKey VmwareReserveCpu = new 
ConfigKey(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
+public static final ConfigKey VmwareReserveCpu = new 
ConfigKey(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
 "Specify whether or not to reserve CPU when not overprovisioning, In 
case of cpu overprovisioning we will always reserve cpu.", true, 
ConfigKey.Scope.Cluster,
 null);
 
-static final ConfigKey VmwareReserveMemory = new 
ConfigKey(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
+public static final ConfigKey VmwareReserveMemory = new 
ConfigKey(Boolean.class, "vmware.reserve.mem", "Advanced", "false",
 "Specify whether or not to reserve memory when not overprovisioning, 
In case of memory overprovisioning we will always reserve memory.", true,
 ConfigKey.Scope.Cluster, null);
 
@@ -221,8 +221,8 @@ public class VMwareGuru extends HypervisorGuruBase 
implements HypervisorGuru, Co
 }
 
 long clusterId = getClusterId(vm.getId());
-details.put(Config.VmwareReserveCpu.key(), 
VmwareReserveCpu.valueIn(clusterId).toString());
-details.put(Config.VmwareReserveMem.key(), 
VmwareReserveMemory.valueIn(clusterId).toString());
+details.put(VmwareReserveCpu.key(), 
VmwareReserveCpu.valueIn(clusterId).toString());
+details.put(VmwareReserveMemory.key(), 
VmwareReserveMemory.valueIn(clusterId).toString());
 to.setDetails(details);
 
 if (vmType.equals(VirtualMachine.Type.DomainRouter)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9585aa0b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index 4f24882..3b2c73f 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -183,10 +183,6 @@ public class VmwareManagerImpl extends ManagerBase 
implements VmwareManager, Vmw
 private int _routerExtraPublicNics = 2;
 private int _vCenterSessionTimeout = 120; // Timeout in milliseconds
 
-private String _reserveCpu = "false";
-
-private String _reserveMem = "false";
-
 private String _rootDiskController = DiskControllerType.ide.toString();
 
 private final Map _storageMounts = new HashMap();
@@ -284,15 +280,6 @@ public class VmwareManagerImpl extends ManagerBase 
implements VmwareManager, Vmw
 _vCenterSessionTimeout = 
NumbersUtil.parseInt(_configDao.getValue(Config.VmwareVcenterSessionTimeout.key()),
 1200) * 1000;
 s_logger.info("VmwareManagerImpl config - 
vmware.vcenter.session.timeout: " + _vCenterSessionTimeout);
 
-_reserveCpu = _configDao.getValue(Config.VmwareReserveCpu.key());
-if (_reserveCpu == null || _reserv

[14/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc

The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav 
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/19d73fe6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/19d73fe6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/19d73fe6

Branch: refs/heads/useraccount-refactoring
Commit: 19d73fe67d6c43ec4ef7c4a8e76c09e15e05a830
Parents: 4f82528
Author: Rohit Yadav 
Authored: Tue Nov 25 18:01:12 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 18:27:21 2014 +0530

--
 packaging/centos63/cloud-agent.rc | 2 +-
 packaging/debian/init/cloud-agent | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/centos63/cloud-agent.rc
--
diff --git a/packaging/centos63/cloud-agent.rc 
b/packaging/centos63/cloud-agent.rc
index cf9f661..6cc6abc 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -64,7 +64,7 @@ export 
CLASSPATH="/usr/share/java/commons-daemon.jar:$ACP:$PCP:/etc/cloudstack/a
 start() {
 echo -n $"Starting $PROGNAME: "
 if hostname --fqdn >/dev/null 2>&1 ; then
-$JSVC -Xms1024m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+$JSVC -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
 -errfile $LOGDIR/cloudstack-agent.err -outfile 
$LOGDIR/cloudstack-agent.out $CLASS
 RETVAL=$?
 echo

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19d73fe6/packaging/debian/init/cloud-agent
--
diff --git a/packaging/debian/init/cloud-agent 
b/packaging/debian/init/cloud-agent
index 7e4e7d0..a3f2ae9 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -96,7 +96,7 @@ start() {
 
 wait_for_network
 
-if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -Djna.nosys=true 
-pidfile "$PIDFILE" -errfile SYSLOG $CLASS
+if start_daemon -p $PIDFILE $DAEMON -Xms256m -Xmx2048m -cp "$CLASSPATH" 
-Djna.nosys=true -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
 RETVAL=$?
 then
 rc=0



[28/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7969: SC: Win8.1: Key translation fails for some  EN-US  keyboard 
keys.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a45ddb51
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a45ddb51
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a45ddb51

Branch: refs/heads/useraccount-refactoring
Commit: a45ddb514c13b0b72d47468fb2254e69520d37f6
Parents: ef2aa2c
Author: Sanjay Tripathi 
Authored: Wed Nov 26 13:28:25 2014 +0530
Committer: Sanjay Tripathi 
Committed: Wed Nov 26 13:35:24 2014 +0530

--
 ui/index.jsp | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a45ddb51/ui/index.jsp
--
diff --git a/ui/index.jsp b/ui/index.jsp
index 1000101..5ba6301 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -430,6 +430,7 @@
 Standard 
(US) keyboard
 UK 
keyboard
 Japanese 
keyboard
+Simplified 
Chinese keyboard
 
 
 



[48/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
Add support for Debian 7 on KVM/LXC


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9f4c267d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9f4c267d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9f4c267d

Branch: refs/heads/useraccount-refactoring
Commit: 9f4c267d5651fdd2b429a52f8792812f229c44d8
Parents: daa57f6
Author: Wei Zhou 
Authored: Thu Nov 27 20:40:38 2014 +0100
Committer: Wei Zhou 
Committed: Thu Nov 27 20:40:38 2014 +0100

--
 setup/db/db/schema-442to450.sql | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f4c267d/setup/db/db/schema-442to450.sql
--
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index 14dcc51..267e655 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -981,3 +981,10 @@ INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` 
(uuid,hypervisor_type, hypervis
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, 
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) 
VALUES (UUID(),'VMware', '5.1', 'rhel6_64Guest', 253, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, 
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) 
VALUES (UUID(),'VMware', '5.5', 'rhel6Guest', 252, utc_timestamp(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, 
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) 
VALUES (UUID(),'VMware', '5,5', 'rhel6_64Guest', 253, utc_timestamp(), 0);
+
+--Support for Debian 7 on KVM/LXC
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, 
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) 
VALUES (UUID(),'KVM', 'default', 'Debian GNU/Linux 7(32-bit)', 183, 
utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, 
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) 
VALUES (UUID(),'KVM', 'default', 'Debian GNU/Linux 7(64-bit)', 184, 
utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, 
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) 
VALUES (UUID(),'LXC', 'default', 'Debian GNU/Linux 7(32-bit)', 183, 
utc_timestamp(), 0);
+INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, 
hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) 
VALUES (UUID(),'LXC', 'default', 'Debian GNU/Linux 7(64-bit)', 184, 
utc_timestamp(), 0);
+



[50/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
packaging: add license to missing cloud.limits

I think Hugo/Daan forgot to add license header on one of the new centos7
packaging :)

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0128d629
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0128d629
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0128d629

Branch: refs/heads/useraccount-refactoring
Commit: 0128d62992028f1de6b42bc0679fa1cb0322c9b8
Parents: 21a6bef
Author: Rohit Yadav 
Authored: Fri Nov 28 16:10:37 2014 +0530
Committer: Rohit Yadav 
Committed: Fri Nov 28 16:10:37 2014 +0530

--
 packaging/centos7/cloud.limits | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0128d629/packaging/centos7/cloud.limits
--
diff --git a/packaging/centos7/cloud.limits b/packaging/centos7/cloud.limits
index fe85be4..7debeb2 100644
--- a/packaging/centos7/cloud.limits
+++ b/packaging/centos7/cloud.limits
@@ -1,2 +1,19 @@
+# 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.
+
 cloud hard nofile 4096
 cloud soft nofile 4096



[44/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-6075: Increase the ram size for router service offering

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/488c1785
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/488c1785
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/488c1785

Branch: refs/heads/useraccount-refactoring
Commit: 488c17858f17f548d907cd72df54e0abdfd439b2
Parents: 612b4ae
Author: Harikrishna Patnala 
Authored: Thu Nov 27 12:41:22 2014 +0530
Committer: Rohit Yadav 
Committed: Thu Nov 27 16:04:59 2014 +0530

--
 .../com/cloud/upgrade/dao/Upgrade442to450.java  | 85 
 .../lb/InternalLoadBalancerVMManager.java   |  2 +-
 server/src/com/cloud/configuration/Config.java  |  2 +-
 .../router/VirtualNetworkApplianceManager.java  |  2 +-
 setup/db/db/schema-442to450.sql |  2 +
 5 files changed, 90 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488c1785/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
--
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java 
b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
index dc1057f..aeb44a1 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java
@@ -68,8 +68,93 @@ public class Upgrade442to450 implements DbUpgrade {
 updateSystemVmTemplates(conn);
 dropInvalidKeyFromStoragePoolTable(conn);
 dropDuplicatedForeignKeyFromAsyncJobTable(conn);
+upgradeMemoryOfVirtualRoutervmOffering(conn);
+upgradeMemoryOfInternalLoadBalancervmOffering(conn);
 }
 
+private void upgradeMemoryOfVirtualRoutervmOffering(Connection conn) {
+PreparedStatement updatePstmt = null;
+PreparedStatement selectPstmt = null;
+ResultSet selectResultSet = null;
+int newRamSize = 256; //256MB
+long serviceOfferingId = 0;
+
+/**
+ * Pick first row in service_offering table which has system vm type 
as domainrouter. User added offerings would start from 2nd row onwards.
+ * We should not update/modify any user-defined offering.
+ */
+
+try {
+selectPstmt = conn.prepareStatement("SELECT id FROM 
`cloud`.`service_offering` WHERE vm_type='domainrouter'");
+updatePstmt = conn.prepareStatement("UPDATE 
`cloud`.`service_offering` SET ram_size=? WHERE id=?");
+selectResultSet = selectPstmt.executeQuery();
+if(selectResultSet.next()) {
+serviceOfferingId = selectResultSet.getLong("id");
+}
+
+updatePstmt.setInt(1, newRamSize);
+updatePstmt.setLong(2, serviceOfferingId);
+updatePstmt.executeUpdate();
+} catch (SQLException e) {
+throw new CloudRuntimeException("Unable to upgrade ram_size of 
service offering for domain router. ", e);
+} finally {
+try {
+if (selectPstmt != null) {
+selectPstmt.close();
+}
+if (selectResultSet != null) {
+selectResultSet.close();
+}
+if (updatePstmt != null) {
+updatePstmt.close();
+}
+} catch (SQLException e) {
+}
+}
+s_logger.debug("Done upgrading RAM for service offering of domain 
router to " + newRamSize);
+}
+
+private void upgradeMemoryOfInternalLoadBalancervmOffering(Connection 
conn) {
+PreparedStatement updatePstmt = null;
+PreparedStatement selectPstmt = null;
+ResultSet selectResultSet = null;
+int newRamSize = 256; //256MB
+long serviceOfferingId = 0;
+
+/**
+ * Pick first row in service_offering table which has system vm type 
as internalloadbalancervm. User added offerings would start from 2nd row 
onwards.
+ * We should not update/modify any user-defined offering.
+ */
+
+try {
+selectPstmt = conn.prepareStatement("SELECT id FROM 
`cloud`.`service_offering` WHERE vm_type='internalloadbalancervm'");
+updatePstmt = conn.prepareStatement("UPDATE 
`cloud`.`service_offering` SET ram_size=? WHERE id=?");
+selectResultSet = selectPstmt.executeQuery();
+if(selectResultSet.next()) {
+serviceOfferingId = selectResultSet.getLong("id");
+}
+
+updatePstmt.setInt(1, newRamSize);
+updatePstmt.setLong(2, serviceOfferingId);
+updatePstmt.executeUpdate();
+} catch (SQLException e) {
+throw new Clou

[38/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7977
Fix password generator, add guards for minimum length


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/960b7bbf
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/960b7bbf
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/960b7bbf

Branch: refs/heads/useraccount-refactoring
Commit: 960b7bbf742bbba62cd25bc62b700c6c829e35f2
Parents: 95ea203
Author: amoghvk 
Authored: Wed Nov 26 15:08:48 2014 -0800
Committer: amoghvk 
Committed: Wed Nov 26 15:08:48 2014 -0800

--
 server/src/com/cloud/configuration/Config.java  |  8 ++
 .../configuration/ConfigurationManagerImpl.java |  5 
 .../src/com/cloud/utils/PasswordGenerator.java  | 26 ++--
 .../com/cloud/utils/PasswordGeneratorTest.java  |  7 +++---
 4 files changed, 35 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/960b7bbf/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 a1dd882..cd0824e 100644
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -908,6 +908,14 @@ public enum Config {
 "0",
 "Default disk I/O read rate in requests per second allowed in User 
vm's disk.",
 null),
+VmPasswordLength(
+"Advanced",
+ManagementServer.class,
+Integer.class,
+"vm.password.length",
+"6",
+"Specifies the length of a randomly generated password",
+null),
 VmDiskThrottlingIopsWriteRate(
 "Advanced",
 ManagementServer.class,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/960b7bbf/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
--
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java 
b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 714e6fc..918dd93 100644
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -367,6 +367,7 @@ public class ConfigurationManagerImpl extends ManagerBase 
implements Configurati
 configValuesForValidation.add("xenserver.heartbeat.interval");
 configValuesForValidation.add("xenserver.heartbeat.timeout");
 configValuesForValidation.add("incorrect.login.attempts.allowed");
+configValuesForValidation.add("vm.password.length");
 }
 
 private void weightBasedParametersForValidation() {
@@ -780,6 +781,10 @@ public class ConfigurationManagerImpl extends ManagerBase 
implements Configurati
 if (val <= 0) {
 throw new InvalidParameterValueException("Please enter a 
positive value for the configuration parameter:" + name);
 }
+//TODO - better validation for all password pamameters
+if ("vm.password.length".equalsIgnoreCase(name) && val < 6) {
+throw new InvalidParameterValueException("Please enter a 
value greater than 6 for the configuration parameter:" + name);
+}
 } catch (NumberFormatException e) {
 s_logger.error("There was an error trying to parse the integer 
value for:" + name);
 throw new InvalidParameterValueException("There was an error 
trying to parse the integer value for:" + name);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/960b7bbf/utils/src/com/cloud/utils/PasswordGenerator.java
--
diff --git a/utils/src/com/cloud/utils/PasswordGenerator.java 
b/utils/src/com/cloud/utils/PasswordGenerator.java
index b6e4bed..6fa2843 100644
--- a/utils/src/com/cloud/utils/PasswordGenerator.java
+++ b/utils/src/com/cloud/utils/PasswordGenerator.java
@@ -35,18 +35,28 @@ public class PasswordGenerator {
 static private char[] alphaNumeric = new char[] {'A', 'B', 'C', 'D', 'E', 
'F', 'G', 'H', 'J', 'K', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 
'X', 'Y',
 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '2', '3', '4', '5', '6', '7', 
'8', '9'};
 
+static private int minLength = 3;
+
 public static String generateRandomPassword(int num) {
 Random r = new SecureRandom();
 StringBuilder password = new StringBuilder();
 
-// Generate random 3-character string with a lowercase character,
-// uppercase character, and a digit
-  

[34/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
Revert "VM detail view: Disable 'change service offering' action per 
CLOUDSTACK-4200"

This reverts commit 73087bc3ffed4200e4e0a298b9e5539e248449a1.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/837a17b3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/837a17b3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/837a17b3

Branch: refs/heads/useraccount-refactoring
Commit: 837a17b3da8e419143a9d6ee9ad67c69deebdb0b
Parents: db9c97e
Author: Brian Federle 
Authored: Wed Nov 26 14:18:01 2014 -0800
Committer: Brian Federle 
Committed: Wed Nov 26 14:18:01 2014 -0800

--
 ui/scripts/instances.js | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/837a17b3/ui/scripts/instances.js
--
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 7ee5db4..11aa725 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1459,9 +1459,6 @@
 
 scaleUp: {
 label: 'label.change.service.offering',
-preFilter: function() {
-return false;
-},
 createForm: {
 title: 'label.change.service.offering',
 desc: function(args) {



[19/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7963: Fixed test case in test_dedicate_guest_vlan_ranges.py

Signed-off-by: SrikanteswaraRao Talluri 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1db2d144
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1db2d144
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1db2d144

Branch: refs/heads/useraccount-refactoring
Commit: 1db2d144229f5e69331c49b7b8922750984b78be
Parents: 684268f
Author: Ashutosh K 
Authored: Mon Nov 24 11:29:40 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Tue Nov 25 18:35:13 2014 +0530

--
 test/integration/component/test_dedicate_guest_vlan_ranges.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1db2d144/test/integration/component/test_dedicate_guest_vlan_ranges.py
--
diff --git a/test/integration/component/test_dedicate_guest_vlan_ranges.py 
b/test/integration/component/test_dedicate_guest_vlan_ranges.py
index efba229..29bc280 100644
--- a/test/integration/component/test_dedicate_guest_vlan_ranges.py
+++ b/test/integration/component/test_dedicate_guest_vlan_ranges.py
@@ -1221,7 +1221,7 @@ class TestDeleteVlanRange(cloudstackTestCase):
self.testdata["isolated_network"],
self.account1.name,
self.account1.domainid,
-   
networkofferingid=self.isolated_network_offering.id)
+   
networkofferingid=self.isolated_persistent_network_offering.id)
 
 networks = Network.list(self.apiclient, id=isolated_network.id)
 self.assertEqual(validateList(networks)[0], PASS, "networks list 
validation failed")



[32/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
Fix python reference


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b249c91b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b249c91b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b249c91b

Branch: refs/heads/useraccount-refactoring
Commit: b249c91bf1946bfcafdf684c172e0d74ba7d04bc
Parents: f9cfd4d
Author: Hugo Trippaers 
Authored: Wed Nov 26 15:18:12 2014 +0100
Committer: Hugo Trippaers 
Committed: Wed Nov 26 15:18:12 2014 +0100

--
 packaging/centos7/replace.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b249c91b/packaging/centos7/replace.properties
--
diff --git a/packaging/centos7/replace.properties 
b/packaging/centos7/replace.properties
index 8345854..f99dab8 100644
--- a/packaging/centos7/replace.properties
+++ b/packaging/centos7/replace.properties
@@ -49,7 +49,7 @@ MSUSER=cloud
 PIDDIR=/var/run
 PLUGINJAVADIR=/usr/share/cloudstack-management/plugin
 PREMIUMJAVADIR=/usr/share/cloudstack-management/premium
-PYTHONDIR=/usr/lib/python2.6/site-packages/
+PYTHONDIR=/usr/lib/python2.7/site-packages/
 SERVERSYSCONFDIR=/etc/sysconfig
 SETUPDATADIR=/usr/share/cloudstack-management/setup
 SYSCONFDIR=/etc/sysconfig



[45/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7412: Can't create proper template from VM on S3 secondary storage 
environment

Signed-off-by: Rajani Karuturi 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9d31e59d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9d31e59d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9d31e59d

Branch: refs/heads/useraccount-refactoring
Commit: 9d31e59d5b54ef64475e6e8ea36c3e2fc2e7f379
Parents: 488c178
Author: Hiroki Ohashi 
Authored: Thu Nov 27 19:13:36 2014 +0900
Committer: Rajani Karuturi 
Committed: Thu Nov 27 17:07:27 2014 +0530

--
 .../storage/motion/AncientDataMotionStrategy.java | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d31e59d/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
--
diff --git 
a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
 
b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
index 5b01f95..203cfa4 100644
--- 
a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
+++ 
b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
@@ -174,15 +174,29 @@ public class AncientDataMotionStrategy implements 
DataMotionStrategy {
 }
 
 if (cacheData != null) {
-if (srcData.getType() == DataObjectType.VOLUME && 
destData.getType() == DataObjectType.VOLUME) {
-// volume transfer from primary to secondary or vice 
versa. Volume transfer between primary pools are already handled by 
copyVolumeBetweenPools
+final Long cacheId = cacheData.getId();
+final String cacheType = cacheData.getType().toString();
+final String cacheUuid = cacheData.getUuid().toString();
+
+if (srcData.getType() == DataObjectType.VOLUME &&
+(destData.getType() == DataObjectType.VOLUME ||
+ destData.getType() == DataObjectType.TEMPLATE)) {
+// volume transfer from primary to secondary. Volume 
transfer between primary pools are already handled by copyVolumeBetweenPools
+// Delete cache in order to certainly transfer a latest 
image.
+s_logger.debug("Delete " + cacheType + " cache(id: " + 
cacheId +
+   ", uuid: " + cacheUuid + ")");
 cacheMgr.deleteCacheObject(srcForCopy);
 } else {
 // for template, we want to leave it on cache for 
performance reason
 if ((answer == null || !answer.getResult()) && 
srcForCopy.getRefCount() < 2) {
 // cache object created by this copy, not already there
+s_logger.warn("Copy may not be handled correctly by 
agent(id: " + ep.getId() + ")." +
+  " Delete " + cacheType + " cache(id: " + 
cacheId +
+  ", uuid: " + cacheUuid + ")");
 cacheMgr.deleteCacheObject(srcForCopy);
 } else {
+s_logger.debug("Decrease reference count of " + 
cacheType +
+   " cache(id: " + cacheId + ", uuid: " + 
cacheUuid + ")");
 cacheMgr.releaseCacheObject(srcForCopy);
 }
 }



[40/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7978 : Fixed the script 'test_egress_rules.py' - Zone Network Type 
Information should to be passed to VirtualMachine create method


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b81cf5ea
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b81cf5ea
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b81cf5ea

Branch: refs/heads/useraccount-refactoring
Commit: b81cf5eab19a00b12c2c39c105442f8c12d5cd82
Parents: 960b7bb
Author: Chandan Purushothama 
Authored: Wed Nov 26 16:06:26 2014 -0800
Committer: Sangeetha Hariharan 
Committed: Wed Nov 26 19:32:46 2014 -0800

--
 test/integration/component/test_egress_rules.py | 21 +---
 1 file changed, 14 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b81cf5ea/test/integration/component/test_egress_rules.py
--
diff --git a/test/integration/component/test_egress_rules.py 
b/test/integration/component/test_egress_rules.py
index 0f05c07..138c765 100644
--- a/test/integration/component/test_egress_rules.py
+++ b/test/integration/component/test_egress_rules.py
@@ -412,7 +412,8 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
 accountid=self.account.name,
 domainid=self.account.domainid,
 serviceofferingid=self.service_offering.id,
-securitygroupids=[security_group.id]
+securitygroupids=[security_group.id],
+mode=self.services['mode']
 )
 self.debug("Deploying VM in account: %s" % self.account.name)
 # Should be able to SSH VM
@@ -586,7 +587,8 @@ class TestDefaultGroupEgress(cloudstackTestCase):
 accountid=self.account.name,
 domainid=self.account.domainid,
 serviceofferingid=self.service_offering.id,
-securitygroupids=[security_group.id]
+securitygroupids=[security_group.id],
+mode=self.services['mode']
 )
 self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -766,7 +768,8 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
 accountid=self.account.name,
 domainid=self.account.domainid,
 serviceofferingid=self.service_offering.id,
-securitygroupids=[security_group.id]
+securitygroupids=[security_group.id],
+mode=self.services['mode']
 )
 self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -982,7 +985,8 @@ class TestRevokeEgressRule(cloudstackTestCase):
 accountid=self.account.name,
 domainid=self.account.domainid,
 serviceofferingid=self.service_offering.id,
-securitygroupids=[security_group.id]
+securitygroupids=[security_group.id],
+mode=self.services['mode']
 )
 self.debug("Deploying VM in account: %s" % self.account.name)
 
@@ -1379,7 +1383,8 @@ class 
TestMultipleAccountsEgressRuleNeg(cloudstackTestCase):
 accountid=self.accountA.name,
 domainid=self.accountA.domainid,
 serviceofferingid=self.service_offering.id,
-securitygroupids=[security_group.id]
+securitygroupids=[security_group.id],
+mode=self.services['mode']
 )
 self.cleanup.append(self.virtual_machineA)
 self.debug("Deploying VM in account: %s" % self.accountA.name)
@@ -1650,7 +1655,8 @@ class TestMultipleAccountsEgressRule(cloudstackTestCase):
 accountid=self.accountA.name,
 domainid=self.accountA.domainid,
 serviceofferingid=self.service_offering.id,
-securitygroupids=[security_groupA.id]
+securitygroupids=[security_groupA.id],
+ 

[16/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_netscaler_lb_algo.py
--
diff --git a/test/integration/component/test_netscaler_lb_algo.py 
b/test/integration/component/test_netscaler_lb_algo.py
index 0d571b4..bafecd0 100644
--- a/test/integration/component/test_netscaler_lb_algo.py
+++ b/test/integration/component/test_netscaler_lb_algo.py
@@ -31,83 +31,8 @@ from marvin.lib.base import (Account,
 from marvin.lib.common import (get_zone,
get_domain,
get_template,
-   list_configurations,
-   GetNetscalerInfoFromConfig,
add_netscaler)
 from marvin.sshClient import SshClient
-import time
-
-
-class Services:
-
-"""Test netscaler services
-"""
-
-def __init__(self):
-self.services = {
-"account": {
-"email": "t...@test.com",
-"firstname": "Test",
-"lastname": "User",
-"username": "test",
-# Random characters are appended for unique
-# username
-"password": "password",
-},
-"service_offering": {
-"name": "Tiny Instance",
-"displaytext": "Tiny Instance",
-"cpunumber": 1,
-"cpuspeed": 100,  # in MHz
-"memory": 128,  # In MBs
-},
-"virtual_machine": {
-"displayname": "TestVM",
-"username": "root",
-"password": "password",
-"ssh_port": 22,
-"hypervisor": 'XenServer',
-"privateport": 22,
-"publicport": 22,
-"protocol": 'TCP',
-},
-"network_offering": {
-"name": 'Netscaler',
-"displaytext": 'Netscaler',
-"guestiptype": 'Isolated',
-"supportedservices": 
'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
-"traffictype": 'GUEST',
-"availability": 'Optional',
-"serviceProviderList": {
-"Dhcp": 'VirtualRouter',
-"Dns": 'VirtualRouter',
-"SourceNat": 'VirtualRouter',
-"PortForwarding": 'VirtualRouter',
-"Vpn": 'VirtualRouter',
-"Firewall": 'VirtualRouter',
-"Lb": 'Netscaler',
-"UserData": 'VirtualRouter',
-"StaticNat": 'VirtualRouter',
-},
-},
-"network": {
-"name": "Netscaler",
-"displaytext": "Netscaler"
-},
-"lbrule": {
-"name": "SSH",
-"alg": "leastconn",
-# Algorithm used for load balancing
-"privateport": 22,
-"publicport": 22,
-"openfirewall": False,
-},
-"ostype": 'CentOS 5.3 (64-bit)',
-# Cent OS 5.3 (64 bit)
-"sleep": 60,
-"timeout": 10,
-"mode": 'advanced'
-}
 
 
 class TestLbWithRoundRobin(cloudstackTestCase):
@@ -118,40 +43,37 @@ class TestLbWithRoundRobin(cloudstackTestCase):
 cls.testClient = super(TestLbWithRoundRobin, cls).getClsTestClient()
 cls.api_client = cls.testClient.getApiClient()
 
-cls.services = Services().services
+# Fill testdata from the external config file
+cls.testdata = cls.testClient.getParsedTestDataConfig()
 # Get Zone, Domain and templates
 cls.domain = get_domain(cls.api_client)
 cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
 cls.template = get_template(
 cls.api_client,
 cls.zone.id,
-cls.services["ostype"]
+cls.testdata["ostype"]
 )
 
-response = GetNetscalerInfoFromConfig(
-cls.config
-)
-assert response[0] is not None, response[1]
-cls.services["netscaler"] = response[0]
-cls.services["netscaler"]["lbdevicededicated"] = False
+cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = 
False
 
 cls._cleanup = []
 try:
-cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, 
cls.services["netscaler"])
+cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, 
cls.testdata["configurableData"]["netscaler"])
 cls._cleanup.append(cls.netscaler)
+
 cls.network_offering = NetworkOffering.create(
 cls.api_client,
-cls.services["network_offering"],
-conservemode=True
+cls.testdata["nw_o

[09/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
Merge remote-tracking branch 'origin/inetaddress'

- Tested locally against unit tests
- TravisCI build passed: https://travis-ci.org/apache/cloudstack/builds/41990351
- Manual QA passed for basic auth and saml auth using default IDP settings

Signed-off-by: Rohit Yadav 

Conflicts:
server/src/com/cloud/api/ApiServlet.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7ff31f1b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7ff31f1b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7ff31f1b

Branch: refs/heads/useraccount-refactoring
Commit: 7ff31f1b223fbc54d04a0610013dfdd76a618ed8
Parents: 4e5b3d0 72ba98b
Author: Rohit Yadav 
Authored: Tue Nov 25 14:31:23 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 14:32:09 2014 +0530

--
 .../apache/cloudstack/api/ApiServerService.java |  3 +-
 .../cloudstack/api/auth/APIAuthenticator.java   |  3 +-
 .../contrail/management/MockAccountManager.java |  3 +-
 .../command/GetServiceProviderMetaDataCmd.java  |  3 +-
 .../command/SAML2LoginAPIAuthenticatorCmd.java  |  3 +-
 .../command/SAML2LogoutAPIAuthenticatorCmd.java |  3 +-
 .../GetServiceProviderMetaDataCmdTest.java  |  6 ++--
 .../SAML2LoginAPIAuthenticatorCmdTest.java  |  5 +--
 .../SAML2LogoutAPIAuthenticatorCmdTest.java |  3 +-
 pom.xml |  6 
 server/src/com/cloud/api/ApiServer.java |  2 +-
 server/src/com/cloud/api/ApiServlet.java|  7 +++--
 .../auth/DefaultLoginAPIAuthenticatorCmd.java   |  3 +-
 .../auth/DefaultLogoutAPIAuthenticatorCmd.java  |  3 +-
 server/src/com/cloud/user/AccountManager.java   |  3 +-
 .../src/com/cloud/user/AccountManagerImpl.java  | 12 +++-
 server/test/com/cloud/api/ApiServletTest.java   | 14 +
 .../com/cloud/user/MockAccountManagerImpl.java  |  3 +-
 utils/pom.xml   |  4 +++
 utils/src/com/cloud/utils/net/NetUtils.java | 32 ++--
 20 files changed, 60 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/api/ApiServer.java
--
diff --cc server/src/com/cloud/api/ApiServer.java
index b335a66,435efa0..435efa0
mode 100644,100755..100644
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/api/ApiServlet.java
--
diff --cc server/src/com/cloud/api/ApiServlet.java
index e1f7927,a4266f7..3c73375
--- a/server/src/com/cloud/api/ApiServlet.java
+++ b/server/src/com/cloud/api/ApiServlet.java
@@@ -18,10 -18,8 +18,11 @@@ package com.cloud.api
  
  import java.io.UnsupportedEncodingException;
  import java.net.URLDecoder;
 +import java.util.Arrays;
 +import java.util.Collections;
+ import java.net.InetAddress;
  import java.util.HashMap;
 +import java.util.List;
  import java.util.Map;
  
  import javax.inject.Inject;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/user/AccountManager.java
--
diff --cc server/src/com/cloud/user/AccountManager.java
index 194c5d2,7b9e093..7b9e093
mode 100644,100755..100644
--- a/server/src/com/cloud/user/AccountManager.java
+++ b/server/src/com/cloud/user/AccountManager.java

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/src/com/cloud/user/AccountManagerImpl.java
--
diff --cc server/src/com/cloud/user/AccountManagerImpl.java
index 3c00f91,f816ee4..f816ee4
mode 100644,100755..100644
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ff31f1b/server/test/com/cloud/api/ApiServletTest.java
--
diff --cc server/test/com/cloud/api/ApiServletTest.java
index 2089477,1d20bdf..57caa44
--- a/server/test/com/cloud/api/ApiServletTest.java
+++ b/server/test/com/cloud/api/ApiServletTest.java
@@@ -84,10 -83,9 +86,10 @@@ public class ApiServletTest 
  
  ApiServlet servlet;
  
 +@SuppressWarnings("unchecked")
  @Before
  public void setup() throws SecurityException, NoSuchFieldException,
- IllegalArgumentException, IllegalAccessException, IOException {
+ IllegalArgumentException, IllegalAccessException, IOException, 
UnknownHostException {
  servlet = new ApiServlet();
  responseWriter = new StringWriter();
  Mockito.when(response.getWr

[25/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7679: Bump rabbitmq client library to latest 3.4.1

Signed-off-by: Rohit Yadav 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6ad2f384
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6ad2f384
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6ad2f384

Branch: refs/heads/useraccount-refactoring
Commit: 6ad2f384265de41751fd3f9c238b82bdbf933cfd
Parents: d0ca2d5
Author: Rohit Yadav 
Authored: Tue Nov 25 19:15:28 2014 +0530
Committer: Rohit Yadav 
Committed: Tue Nov 25 19:16:23 2014 +0530

--
 plugins/event-bus/rabbitmq/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ad2f384/plugins/event-bus/rabbitmq/pom.xml
--
diff --git a/plugins/event-bus/rabbitmq/pom.xml 
b/plugins/event-bus/rabbitmq/pom.xml
index a109578..5f002a0 100644
--- a/plugins/event-bus/rabbitmq/pom.xml
+++ b/plugins/event-bus/rabbitmq/pom.xml
@@ -31,7 +31,7 @@
 
 com.rabbitmq
   amqp-client
-3.3.5
+3.4.1
 
 
 org.apache.cloudstack



[20/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7953: Fixed time wait period for verifying snapshot policy

Signed-off-by: SrikanteswaraRao Talluri 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/50ab04dc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/50ab04dc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/50ab04dc

Branch: refs/heads/useraccount-refactoring
Commit: 50ab04dc0d73c0192c0693d62c047cfaffc73e99
Parents: 1db2d14
Author: Ashutosh K 
Authored: Thu Nov 20 16:43:09 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Tue Nov 25 18:39:43 2014 +0530

--
 .../component/test_snapshot_limits.py   | 22 +---
 1 file changed, 15 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/50ab04dc/test/integration/component/test_snapshot_limits.py
--
diff --git a/test/integration/component/test_snapshot_limits.py 
b/test/integration/component/test_snapshot_limits.py
index 18a1c65..40849ee 100644
--- a/test/integration/component/test_snapshot_limits.py
+++ b/test/integration/component/test_snapshot_limits.py
@@ -16,13 +16,21 @@
 # under the License.
 
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.lib.utils import *
-from marvin.lib.base import *
-from marvin.lib.common import *
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+#from marvin.cloudstackAPI import *
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Account,
+ VirtualMachine,
+ SnapshotPolicy,
+ ServiceOffering)
+from marvin.lib.common import (get_zone,
+   get_template,
+   get_domain,
+   list_volumes,
+   list_snapshots,
+   list_snapshot_policy)
 from marvin.lib.utils import is_snapshot_on_nfs
-import os
+import time
 
 
 class Services:
@@ -262,7 +270,7 @@ class TestSnapshotLimit(cloudstackTestCase):
 # Sleep for (maxsnaps+1) hours to verify
 # only maxsnaps snapshots are retained
 time.sleep(
-(self.services["recurring_snapshot"]["maxsnaps"]) * 3600
+(int(self.services["recurring_snapshot"]["maxsnaps"]) + 1) * 3600
 )
 
 # Verify the snapshot was created or not



[18/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7938: Marvin - Create a new section in test_data.py for configurable 
data and change test cases accordingly

Signed-off-by: SrikanteswaraRao Talluri 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/684268f4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/684268f4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/684268f4

Branch: refs/heads/useraccount-refactoring
Commit: 684268f4c3a6be1441f1f47df2979185c91bfcaf
Parents: 19d73fe
Author: Gaurav Aradhye 
Authored: Fri Nov 21 17:07:37 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Tue Nov 25 18:30:33 2014 +0530

--
 .../component/test_lb_secondary_ip.py   |  14 +-
 .../component/test_netscaler_configs.py | 122 ++--
 test/integration/component/test_netscaler_lb.py | 652 +++
 .../component/test_netscaler_lb_algo.py | 604 +++--
 .../component/test_netscaler_lb_sticky.py   | 270 +++-
 .../component/test_persistent_networks.py   |  30 +-
 test/integration/component/test_portable_ip.py  | 405 
 test/integration/smoke/test_primary_storage.py  |   2 +-
 tools/marvin/marvin/config/test_data.py |  61 +-
 tools/marvin/marvin/lib/common.py   |  18 -
 10 files changed, 785 insertions(+), 1393 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_lb_secondary_ip.py
--
diff --git a/test/integration/component/test_lb_secondary_ip.py 
b/test/integration/component/test_lb_secondary_ip.py
index 841257f..c76ab2c 100644
--- a/test/integration/component/test_lb_secondary_ip.py
+++ b/test/integration/component/test_lb_secondary_ip.py
@@ -49,8 +49,7 @@ from marvin.lib.common import (get_domain,
get_template,
verifyNetworkState,
wait_for_cleanup,
-   add_netscaler,
-   GetNetscalerInfoFromConfig
+   add_netscaler
)
 
 from marvin.lib.utils import (validateList,
@@ -1775,19 +1774,14 @@ class TestExternalLoadBalancer(cloudstackTestCase):
 cls.testdata["virtual_machine"]["zoneid"] = cls.zone.id
 cls.testdata["virtual_machine"]["template"] = template.id
 cls._cleanup = []
-
-response = GetNetscalerInfoFromConfig(
-cls.config
-)
-assert response[0] is not None, response[1]
-cls.testdata["netscaler"] = response[0]
-cls.testdata["netscaler"]["lbdevicededicated"] = False
+cls.testdata["configurableData"]\
+["netscaler"]["lbdevicededicated"] = False
 
 try:
 cls.netscaler = add_netscaler(
 cls.api_client,
 cls.zone.id,
-cls.testdata["netscaler"])
+cls.testdata["configurableData"]["netscaler"])
 cls._cleanup.append(cls.netscaler)
 except Exception as e:
 raise unittest.SkipTest("Failed to add netscaler device: %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/684268f4/test/integration/component/test_netscaler_configs.py
--
diff --git a/test/integration/component/test_netscaler_configs.py 
b/test/integration/component/test_netscaler_configs.py
index 91fb85b..3bbd68a 100644
--- a/test/integration/component/test_netscaler_configs.py
+++ b/test/integration/component/test_netscaler_configs.py
@@ -20,7 +20,6 @@
 #Import Local Modules
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import cloudstackTestCase
-#from marvin.cloudstackAPI import *
 from marvin.lib.utils import (cleanup_resources,
   random_gen)
 from marvin.lib.base import (VirtualMachine,
@@ -159,8 +158,8 @@ class TestAddNetScaler(_NetScalerAddBase):
 #Balancing feature.
 # 2. Netscaler should be configured successfully.
 self.debug("Adding netscaler device: %s" %
-
self.services["netscaler_VPX"]["ipaddress"])
-netscaler_config = dict(self.services["netscaler_VPX"])
+
self.services["configurableData"]["netscaler"]["ipaddress"])
+netscaler_config = dict(self.services["configurableData"]["netscaler"])
 netscaler_config.update({'lbdevicededicated': "False"})
 netscaler = NetScaler.add(
   self.apiclient,
@@ -236,7 +235,7 @@ class TestInvalidParametersNetscaler(_NetScalerAddBase):
 # 2. Netscaler API should throw error
 
 self.debug("Passin

[23/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7934: Fixed cleanup issues test_escalations_volumes.py

Signed-off-by: SrikanteswaraRao Talluri 


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2fbef677
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2fbef677
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2fbef677

Branch: refs/heads/useraccount-refactoring
Commit: 2fbef677b0edfcd705c0df6d244f7327e8ea938c
Parents: 30a2ade
Author: Ashutosh K 
Authored: Tue Nov 18 15:06:19 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Tue Nov 25 18:53:51 2014 +0530

--
 test/integration/component/test_escalations_volumes.py | 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2fbef677/test/integration/component/test_escalations_volumes.py
--
diff --git a/test/integration/component/test_escalations_volumes.py 
b/test/integration/component/test_escalations_volumes.py
index 7290325..1a17721 100644
--- a/test/integration/component/test_escalations_volumes.py
+++ b/test/integration/component/test_escalations_volumes.py
@@ -784,8 +784,6 @@ class TestVolumes(cloudstackTestCase):
 
 self.assertIsNotNone(snapshot_created, "Snapshot not created")
 
-self.cleanup.append(snapshot_created)
-
 # Creating expected and actual values dictionaries
 expected_dict = {
 "id": volume_created.id,
@@ -1560,7 +1558,6 @@ class TestVolumes(cloudstackTestCase):
 volume_created.id,
 )
 self.assertIsNotNone(snapshot_created, "Snapshot not created")
-self.cleanup.append(snapshot_created)
 
 self.assertEquals(
 volume_created.id,
@@ -1621,7 +1618,6 @@ class TestVolumes(cloudstackTestCase):
 # Deleting a single snapshot and verifying that snapshot does not
 # exists on page 2
 Snapshot.delete(snapshot_created, self.userapiclient)
-self.cleanup.remove(snapshot_created)
 
 list_snapshot_page2 = Snapshot.list(
 self.userapiclient,
@@ -1855,7 +1851,6 @@ class TestVolumes(cloudstackTestCase):
 validateList(vol1_res)[0],
 PASS,
 "Volume list returned invalid response")
-self.cleanup.append(vol1)
 vol1_size = vol1_res[0].size
 try:
 self.virtual_machine.attach_volume(self.userapiclient, vol1)
@@ -1875,7 +1870,6 @@ class TestVolumes(cloudstackTestCase):
 vol2,
 "Failed to create custom data disk with size %s" %
 self.services["custom_volume"]["customdisksize"])
-self.cleanup.append(vol2)
 vol2_res = Volume.list(
 self.userapiclient,
 id=vol2.id



[10/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886

2014-11-28 Thread bhaisaab
CLOUDSTACK-7917: Validating Load Balancer Rule when updating LB + unit test

Signed-off-by: Rajani Karuturi 
(cherry picked from commit c919ff83d81528b89017b5f5731b2e46350e3dfa)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/02ca6f2e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/02ca6f2e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/02ca6f2e

Branch: refs/heads/useraccount-refactoring
Commit: 02ca6f2e5b7d8ffdc917ed09d8600c38e668ea17
Parents: 7ff31f1
Author: Daniel Vega 
Authored: Wed Nov 19 19:01:35 2014 -0200
Committer: Rajani Karuturi 
Committed: Tue Nov 25 15:55:30 2014 +0530

--
 .../lb/LoadBalancingRulesManagerImpl.java   |   6 +
 .../network/lb/UpdateLoadBalancerTest.java  | 127 +++
 2 files changed, 133 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02ca6f2e/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
--
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java 
b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index a28d108..fbb862e 100644
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -2102,6 +2102,12 @@ public class LoadBalancingRulesManagerImpl extends 
ManagerBase implements
 lb.setDisplay(forDisplay);
 }
 
+// Validate rule in LB provider
+LoadBalancingRule rule = getLoadBalancerRuleToApply(lb);
+if (!validateLbRule(rule)) {
+throw new InvalidParameterValueException("Modifications in lb rule 
" + lbRuleId + " are not supported.");
+}
+
 boolean success = _lbDao.update(lbRuleId, lb);
 
 // If algorithm is changed, have to reapply the lb config

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02ca6f2e/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java
--
diff --git a/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java 
b/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java
new file mode 100644
index 000..f3a938c
--- /dev/null
+++ b/server/test/com/cloud/network/lb/UpdateLoadBalancerTest.java
@@ -0,0 +1,127 @@
+// 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.network.lb;
+
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.UUID;
+
+import 
org.apache.cloudstack.api.command.user.loadbalancer.UpdateLoadBalancerRuleCmd;
+import org.apache.cloudstack.context.CallContext;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InOrder;
+import org.mockito.Mockito;
+
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.Network;
+import com.cloud.network.NetworkModel;
+import com.cloud.network.PublicIpAddress;
+import com.cloud.network.as.dao.AutoScaleVmGroupDao;
+import com.cloud.network.dao.LBHealthCheckPolicyDao;
+import com.cloud.network.dao.LBStickinessPolicyDao;
+import com.cloud.network.dao.LoadBalancerCertMapDao;
+import com.cloud.network.dao.LoadBalancerDao;
+import com.cloud.network.dao.LoadBalancerVMMapDao;
+import com.cloud.network.dao.LoadBalancerVO;
+import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.element.LoadBalancingServiceProvider;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.MockAccountManagerImpl;
+import com.cloud.user.UserVO;
+
+public class UpdateLoadBalancerTest {
+
+LoadBalancingRulesManagerIm

<    1   2   3   4   5   6   7   8   9   10   >