You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2016/01/20 22:40:00 UTC

[1/7] git commit: updated refs/heads/master to ce4ea45

Repository: cloudstack
Updated Branches:
  refs/heads/master 0403a3522 -> ce4ea45ce


CLOUDSTACK-9229: Autoscale policy creation failing in VPC due to zoneid missing in createAutoScaleVmProfile

Added a conditon to check whether the zoneid in networks is undefined,
If that is undefined, it gets the zoneid from ipaddresses argument.
Fixed a localization issue.


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

Branch: refs/heads/master
Commit: 8e778151e1cc6064ea46b457be266a8ec3afc7d7
Parents: 80703ca
Author: Nitin Kumar Maharana <ni...@gmail.com>
Authored: Thu Jan 7 16:57:54 2016 +0530
Committer: Nitin Kumar Maharana <ni...@gmail.com>
Committed: Wed Jan 13 15:47:06 2016 +0530

----------------------------------------------------------------------
 ui/scripts/autoscaler.js           | 2 +-
 ui/scripts/ui-custom/autoscaler.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8e778151/ui/scripts/autoscaler.js
----------------------------------------------------------------------
diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js
index bbd6d9a..e8ac044 100644
--- a/ui/scripts/autoscaler.js
+++ b/ui/scripts/autoscaler.js
@@ -1116,7 +1116,7 @@
                     var apiCmd, apiCmdRes;
                     if (!('multiRules' in args.context)) { //from a new LB
                         var data = {
-                            zoneid: args.context.networks[0].zoneid, //get zoneid from args.context.networks[0] instead of args.context.ipAddresses[0] because args.context.ipAddresses is null when adding AutoScale rule from Add Load Balancer tab in Network page
+                            zoneid: args.context.networks[0].zoneid ? args.context.networks[0].zoneid : args.context.ipAddresses[0].zoneid, //get zoneid from args.context.networks[0]. If it is not null then get it from args.context.ipAddresses[0] because args.context.ipAddresses is null when adding AutoScale rule from Add Load Balancer tab in Network page
                             serviceofferingid: args.data.serviceOfferingId,
                             templateid: args.data.templateNames,
                             destroyvmgraceperiod: args.data.destroyVMgracePeriod,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8e778151/ui/scripts/ui-custom/autoscaler.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/autoscaler.js b/ui/scripts/ui-custom/autoscaler.js
index ca37bea..52eb5ea 100644
--- a/ui/scripts/ui-custom/autoscaler.js
+++ b/ui/scripts/ui-custom/autoscaler.js
@@ -333,7 +333,7 @@
 
             var $loading = $('<div>').addClass('loading-overlay').appendTo($autoscalerDialog);
             $autoscalerDialog.dialog({
-                title: 'label.autoscale.configuration.wizard',
+                title: _l('label.autoscale.configuration.wizard'),
                 width: 825,
                 height: 600,
                 draggable: true,


[3/7] git commit: updated refs/heads/master to ce4ea45

Posted by re...@apache.org.
CLOUDSTACK-9237: Create LB Healthcheck issues - button alignment and error message goes outside the window

Increased the size of width of dialog box.
Json response parsing was missing. Added it.


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

Branch: refs/heads/master
Commit: 49f78d18a88f8156dde1051df76496b8e5180745
Parents: 80703ca
Author: Nitin Kumar Maharana <ni...@gmail.com>
Authored: Thu Jan 14 15:23:01 2016 +0530
Committer: Nitin Kumar Maharana <ni...@gmail.com>
Committed: Thu Jan 14 15:23:01 2016 +0530

----------------------------------------------------------------------
 .../cloud/network/lb/LoadBalancingRulesManagerImpl.java |  2 +-
 ui/scripts/ui-custom/healthCheck.js                     | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49f78d18/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 4029843..8730a7a 100644
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -596,7 +596,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
          */
         if (!validateHealthCheck(cmd)) {
             throw new InvalidParameterValueException(
-                "Failed to create HealthCheck policy: Validation Failed (HealthCheck Policy is not supported by LB Provider for the LB rule id :)" + cmd.getLbRuleId());
+                "Failed to create HealthCheck policy: Validation Failed (HealthCheck Policy is not supported by LB Provider for the LB rule id :" + cmd.getLbRuleId() + ")");
         }
 
         /* Validation : check for the multiple hc policies to the rule id */

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49f78d18/ui/scripts/ui-custom/healthCheck.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/healthCheck.js b/ui/scripts/ui-custom/healthCheck.js
index 3280dd9..43070c3 100644
--- a/ui/scripts/ui-custom/healthCheck.js
+++ b/ui/scripts/ui-custom/healthCheck.js
@@ -35,9 +35,9 @@
             var topFieldForm, bottomFieldForm, $topFieldForm, $bottomFieldForm;
             var topfields = forms.topFields;
 
-            var $healthCheckDesc = $('<div>' + 'label.health.check.message.desc' + '</div>').addClass('health-check-description');
-            var $healthCheckConfigTitle = $('<div><br><br>' + 'label.health.check.configurations.options' + '</div>').addClass('health-check-config-title');
-            var $healthCheckAdvancedTitle = $('<div><br><br>' + 'label.health.check.advanced.options' + '</div>').addClass('health-check-advanced-title');
+            var $healthCheckDesc = $('<div>' + _l('label.health.check.message.desc') + '</div>').addClass('health-check-description');
+            var $healthCheckConfigTitle = $('<div><br><br>' + _l('label.health.check.configurations.options') + '</div>').addClass('health-check-config-title');
+            var $healthCheckAdvancedTitle = $('<div><br><br>' + _l('label.health.check.advanced.options') + '</div>').addClass('health-check-advanced-title');
 
             var $healthCheckDialog = $('<div>').addClass('health-check');
             $healthCheckDialog.append($healthCheckDesc);
@@ -200,7 +200,7 @@
                             error: function(json) {
 
                                 cloudStack.dialog.notice({
-                                    message: _s(json.responseText)
+                                    message: parseXMLHttpResponse(json)
                                 }); //Error message in the API needs to be improved
                                 $healthCheckDialog.dialog('close');
                                 $('.overlay').remove();
@@ -361,8 +361,8 @@
             }
 
             $healthCheckDialog.dialog({
-                title: 'label.health.check.wizard',
-                width: 600,
+                title: _l('label.health.check.wizard'),
+                width: 630,
                 height: 600,
                 draggable: true,
                 closeonEscape: false,


[4/7] git commit: updated refs/heads/master to ce4ea45

Posted by re...@apache.org.
Merge pull request #1340 from nitin-maharana/CloudStack-Nitin23_4.7

CLOUDSTACK-9237: Create LB Healthcheck issues - button alignment and error message goes outside the windowBrowser - Chrome Version 47.0.2526.106 m

Steps to Repro:
============
Open up - Network-Guest Networks -> IP Addresses-> IP<Static NAT> -> Load Balancing
- click on the "Configure" button below the healthcheck,
- opens a "label.heath.check.wizard"

Issues:
======
(1) Please see the snapshot attached
- leave the default values as is and click on the "Create"
- opens a "Status" dialog with an error message

(2) Message on the dialog goes outside the window

Fix:
===
Increased the size of width of dialog box.
Json response parsing was missing. Added it.

Snapshot for Error Message Issue:
===========================
![error_message_details](https://cloud.githubusercontent.com/assets/12583725/12320920/52dbd3d0-bad1-11e5-9ce1-0fbdd2203b60.png)

Snapshot of the fix:
===============
<img width="627" alt="fixed_ss1_nitin" src="https://cloud.githubusercontent.com/assets/12583725/12320935/76613368-bad1-11e5-8540-cbd565edff9f.png">

Snapshot for out of window issue:
==========================
![label_health_check_window](https://cloud.githubusercontent.com/assets/12583725/12320952/8f3d3062-bad1-11e5-9b85-4743d286921e.png)

Snapshot of the fix:
===============
<img width="695" alt="fixed_ss2_nitin" src="https://cloud.githubusercontent.com/assets/12583725/12320970/a3f7e2ae-bad1-11e5-8a9c-d2811aa6effc.png">

* pr/1340:
  CLOUDSTACK-9237: Create LB Healthcheck issues - button alignment and error message goes outside the window

Signed-off-by: Remi Bergsma <gi...@remi.nl>


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

Branch: refs/heads/master
Commit: c99f57fc936897a1eb897066fbf284407965cddb
Parents: ed23ac6 49f78d1
Author: Remi Bergsma <gi...@remi.nl>
Authored: Wed Jan 20 22:03:53 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Wed Jan 20 22:03:53 2016 +0100

----------------------------------------------------------------------
 .../cloud/network/lb/LoadBalancingRulesManagerImpl.java |  2 +-
 ui/scripts/ui-custom/healthCheck.js                     | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------



[6/7] git commit: updated refs/heads/master to ce4ea45

Posted by re...@apache.org.
Merge pull request #1334 from nitin-maharana/CloudStack-Nitin17_4.7

CLOUDSTACK-9229: Autoscale policy creation failing in VPC due to zone id missing in createAutoScaleVmProfileAutoscale policy creation is failing on VPC while creating autoscalevmprofile since zoneid parameter is missing.

Steps to Reproduce:
================
1. Create VPC Network offering with NS as service provider for LB
2. Create VPC using offering which has NetScaler as LB provider
3. Add a tier using the network offering created in Step1
4. Launch a VM
5. Acquire a public IP
6. Create an auto scale policy with all required parameters on an LB rule

Result:
======
Fails during autoscalevmprofile creation with the following error:

GET  command=createAutoScaleVmProfile&response=json&serviceofferingid=05ac866f-604c-43e2-a48b-47e83ef7c4f1&templateid=3cdd83c4-ad27-11e5-9eaf-42407779c24b&destroyvmgraceperiod=30&counterparam%5B0%5D.name=snmpcommunity&counterparam%5B0%5D.value=public&counterparam%5B1%5D.name=snmpport&counterparam%5B1%5D.value=161&_=1451458073663
DEBUG [o.a.c.a.BaseCmd] (catalina-exec-10:ctx-58bcf6cf ctx-f5123e30) (logid:ae6742c8) Ignoring paremeter fordisplay as the caller is not authorized to pass it in
INFO  [c.c.a.ApiServer] (catalina-exec-10:ctx-58bcf6cf ctx-f5123e30) (logid:ae6742c8) Unable to execute API command autoscalevmprofile due to missing parameter zoneid

Expected Result:
=============
Autoscale policy creation should be successful and the "min" number of VMs specified in the policy should be deployed.

Following should be the params for autoscalevmprofile creation:
command=createAutoScaleVmProfile&response=json&zoneid=0b43fff3-c069-417b-ac0c-e4dc46b407ea&serviceofferingid=0
5ac866f-604c-43e2-a48b-47e83ef7c4f1&templateid=3cdd83c4-ad27-11e5-9eaf-42407779c24b&destroyvmgraceperiod=30&counterparam%5B0%5D
.name=snmpcommunity&counterparam%5B0%5D.value=public&counterparam%5B1%5D.name=snmpport&counterparam%5B1%5D.value=161

Fix:
===
Added a conditon to check whether the zoneid in networks is undefined,
If that is undefined, it gets the zoneid from ipaddresses argument.
Fixed a localization issue.

* pr/1334:
  CLOUDSTACK-9229: Autoscale policy creation failing in VPC due to zoneid missing in createAutoScaleVmProfile

Signed-off-by: Remi Bergsma <gi...@remi.nl>


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

Branch: refs/heads/master
Commit: 8361595946dc26662b8181c92de4faaae4cc3c40
Parents: c14183b 8e77815
Author: Remi Bergsma <gi...@remi.nl>
Authored: Wed Jan 20 22:31:51 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Wed Jan 20 22:31:51 2016 +0100

----------------------------------------------------------------------
 ui/scripts/autoscaler.js           | 2 +-
 ui/scripts/ui-custom/autoscaler.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[7/7] git commit: updated refs/heads/master to ce4ea45

Posted by re...@apache.org.
Merge release branch 4.7 to master

* 4.7:
  CLOUDSTACK-9237: Create LB Healthcheck issues - button alignment and error message goes outside the window
  CLOUDSTACK-9235: Autoscale button is missing in VPC
  CLOUDSTACK-9229: Autoscale policy creation failing in VPC due to zoneid missing in createAutoScaleVmProfile


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

Branch: refs/heads/master
Commit: ce4ea45ce04b3d4b82dd1351d12457c836d452dd
Parents: 0403a35 8361595
Author: Remi Bergsma <gi...@remi.nl>
Authored: Wed Jan 20 22:39:37 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Wed Jan 20 22:39:37 2016 +0100

----------------------------------------------------------------------
 .../lb/LoadBalancingRulesManagerImpl.java       |  2 +-
 ui/scripts/autoscaler.js                        |  2 +-
 ui/scripts/network.js                           | 29 ++++++++------------
 ui/scripts/ui-custom/autoscaler.js              |  2 +-
 ui/scripts/ui-custom/healthCheck.js             | 12 ++++----
 5 files changed, 20 insertions(+), 27 deletions(-)
----------------------------------------------------------------------



[5/7] git commit: updated refs/heads/master to ce4ea45

Posted by re...@apache.org.
Merge pull request #1337 from nitin-maharana/CloudStack-Nitin20_4.7

CLOUDSTACK-9235: Autoscale button is missing in VPCAutoscale button is missing. This should not be the case since we are able to add NS as the external LB provider in VPC.

Steps:
=====
1. Create a VPC offering with NS as the external LB provider
2. Create a VPC and configure the public tier with the above offering
3. Acquire an IP address and try to configure Load Balancing rule

Result:
======
Autoscale option is not visible at all for the LB.

Expected Result:
=============
Autoscale option should be available and should work exactly like the way it works for a normal isolated network with NS. If we choose NS as service provider for LB, autoscale should also be visible. If VR is chosen, only then we should not display autoscale.

Fix:
===
In case of VPC, it checks the services available.
If LB is there, It checks the provider is Netscaler then it shows the button or hides it.

* pr/1337:
  CLOUDSTACK-9235: Autoscale button is missing in VPC

Signed-off-by: Remi Bergsma <gi...@remi.nl>


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

Branch: refs/heads/master
Commit: c14183bd25f6edfbda215533d8fb82f0337626d7
Parents: c99f57f b02e9f0
Author: Remi Bergsma <gi...@remi.nl>
Authored: Wed Jan 20 22:17:54 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Wed Jan 20 22:17:54 2016 +0100

----------------------------------------------------------------------
 ui/scripts/network.js | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c14183bd/ui/scripts/network.js
----------------------------------------------------------------------


[2/7] git commit: updated refs/heads/master to ce4ea45

Posted by re...@apache.org.
CLOUDSTACK-9235: Autoscale button is missing in VPC

In case of VPC, it checks the services available.
If LB is there, It checks the provider is Netscaler then it shows the button or hides it.


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

Branch: refs/heads/master
Commit: b02e9f00106a705e862cd859e021d21c9780da68
Parents: 80703ca
Author: Nitin Kumar Maharana <ni...@gmail.com>
Authored: Thu Jan 14 12:04:13 2016 +0530
Committer: Nitin Kumar Maharana <ni...@gmail.com>
Committed: Thu Jan 14 12:04:13 2016 +0530

----------------------------------------------------------------------
 ui/scripts/network.js | 49 +++++++++++++++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b02e9f00/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index cdfbcaa..e4a54e1 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -3643,22 +3643,7 @@
                                                             success: function(json) {
                                                                 var networkOffering = json.listnetworkofferingsresponse.networkoffering[0];
                                                                 var services = networkOffering.service;
-                                                                if (services != null) {
-                                                                    for (var i = 0; i < services.length; i++) {
-                                                                        if (services[i].name == 'Lb') {
-                                                                            var providers = services[i].provider;
-                                                                            if (providers != null) {
-                                                                                for (var k = 0; k < providers.length; k++) {
-                                                                                    if (providers[k].name == 'Netscaler') {
-                                                                                        lbProviderIsNetscaler = true;
-                                                                                        break;
-                                                                                    }
-                                                                                }
-                                                                            }
-                                                                            break;
-                                                                        }
-                                                                    }
-                                                                }
+                                                                lbProviderIsNetscaler = checkIfNetScalerProviderIsEnabled(services);
                                                             }
                                                         });
                                                         if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter)
@@ -3667,8 +3652,16 @@
                                                             return 2; //hide Autoscale button (both header and form)
                                                         }
                                                     } else { //from VPC section
-                                                        //VPC doesn't support autoscale
-                                                        return 2;
+                                                        var lbProviderIsNetscaler;
+                                                        var services = args.context.vpc[0].service;
+
+                                                        lbProviderIsNetscaler = checkIfNetScalerProviderIsEnabled(services);
+
+                                                        if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter)
+                                                            return false; //show AutoScale button
+                                                        } else {
+                                                            return 2; //hide Autoscale button (both header and form)
+                                                        }
                                                     }
                                                 }
                                             },
@@ -6525,6 +6518,26 @@
         }
     };
 
+    function checkIfNetScalerProviderIsEnabled(services) {
+        if (services != null) {
+            for (var i = 0; i < services.length; i++) {
+                if (services[i].name == 'Lb') {
+                    var providers = services[i].provider;
+                    if (providers != null) {
+                        for (var k = 0; k < providers.length; k++) {
+                            if (providers[k].name == 'Netscaler') {
+                                return true;
+                            }
+                        }
+                    }
+                    return false;
+                }
+            }
+        }
+
+        return false;
+    }
+
     function getExtaPropertiesForIpObj(ipObj, args) {
         if (!('vpc' in args.context)) { //***** Guest Network section > Guest Network page > IP Address page *****
             var services = args.context.networks[0].service;