git commit: updated refs/heads/master to 4f3de02

2014-09-11 Thread kishan
Repository: cloudstack
Updated Branches:
  refs/heads/master f3b5a6ebc -> 4f3de024d


Add script to ensure cgroups are not co-mounted in rhel7/lxc. If required, 
script will unmount co-mounted cgroups and remount them seperately


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

Branch: refs/heads/master
Commit: 4f3de024dea973e912f1f28595126db58f39309e
Parents: f3b5a6e
Author: Kishan Kavala 
Authored: Thu Sep 11 14:34:04 2014 +0530
Committer: Kishan Kavala 
Committed: Thu Sep 11 14:34:40 2014 +0530

--
 .../kvm/resource/LibvirtComputingResource.java  | 23 
 scripts/vm/hypervisor/kvm/setup-cgroups.sh  | 56 
 2 files changed, 79 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f3de024/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 b6c1364..d608707 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
@@ -309,6 +309,7 @@ public class LibvirtComputingResource extends 
ServerResourceBase implements Serv
 private String _ovsPvlanVmPath;
 private String _routerProxyPath;
 private String _ovsTunnelPath;
+private String _setupCgroupPath;
 private String _host;
 private String _dcId;
 private String _pod;
@@ -706,6 +707,17 @@ public class LibvirtComputingResource extends 
ServerResourceBase implements Serv
 _hypervisorType = HypervisorType.KVM;
 }
 
+//Verify that cpu,cpuacct cgroups are not co-mounted
+if(HypervisorType.LXC.equals(getHypervisorType())){
+_setupCgroupPath = Script.findScript(kvmScriptsDir, 
"setup-cgroups.sh");
+if (_setupCgroupPath == null) {
+throw new ConfigurationException("Unable to find the 
setup-cgroups.sh");
+}
+if(!checkCgroups()){
+throw new ConfigurationException("cpu,cpuacct cgroups are 
co-mounted");
+}
+}
+
 _hypervisorURI = (String)params.get("hypervisor.uri");
 if (_hypervisorURI == null) {
 _hypervisorURI = 
LibvirtConnection.getHypervisorURI(_hypervisorType.toString());
@@ -5218,4 +5230,15 @@ public class LibvirtComputingResource extends 
ServerResourceBase implements Serv
 return _hypervisorType;
 }
 
+private boolean checkCgroups(){
+final Script command = new Script(_setupCgroupPath, 5 * 1000, 
s_logger);
+String result;
+result = command.execute();
+if (result != null) {
+s_logger.debug("cgroup check failed:" + result);
+return false;
+}
+return true;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f3de024/scripts/vm/hypervisor/kvm/setup-cgroups.sh
--
diff --git a/scripts/vm/hypervisor/kvm/setup-cgroups.sh 
b/scripts/vm/hypervisor/kvm/setup-cgroups.sh
new file mode 100755
index 000..4d6e755
--- /dev/null
+++ b/scripts/vm/hypervisor/kvm/setup-cgroups.sh
@@ -0,0 +1,56 @@
+#!/bin/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.
+
+
+
+# Script to fix cgroups co-mounted issue
+# Applies to RHEL7 versions only
+# Detect if cpu,cpuacct cgroups are co-mounted
+# If co-mounted, unmount and mount them seperately 
+
+#set -x
+
+#Check distribution version for RHEL 
+if [ -f '/etc/redhat-release' ];
+then
+#Check RHEL version for 7 
+   if grep 'Red Hat Enterprise Linux Server release 7' /etc

git commit: updated refs/heads/master to 281c866

2014-09-11 Thread weizhou
Repository: cloudstack
Updated Branches:
  refs/heads/master 4f3de024d -> 281c86620


Add "Edit Tags" functionality to SecurityGroup rules in UI

Signed-off-by: Ilia Shakitko 


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

Branch: refs/heads/master
Commit: 281c866206036235790773fbcb86edede0ac739d
Parents: 4f3de02
Author: Ilia Shakitko 
Authored: Thu Sep 11 12:25:09 2014 +0200
Committer: Wei Zhou 
Committed: Thu Sep 11 15:47:21 2014 +0200

--
 ui/scripts/network.js | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/281c8662/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 8a758c8..02dd269 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -22,7 +22,8 @@
 protocol: elem.protocol,
 startport: elem.startport,
 endport: elem.endport,
-cidr: elem.cidr ? elem.cidr : ''.concat(elem.account, ' - ', 
elem.securitygroupname)
+cidr: elem.cidr ? elem.cidr : ''.concat(elem.account, ' - ', 
elem.securitygroupname),
+tags: elem.tags
 };
 
 if (elemData.startport == 0 && elemData.endport) {
@@ -4842,6 +4843,10 @@
 }
 },
 ignoreEmptyFields: true,
+tags: cloudStack.api.tags({
+resourceType: 'SecurityGroupRule',
+contextId: 'multiRule'
+}),
 dataProvider: function(args) {
 $.ajax({
 url: 
createURL('listSecurityGroups'),
@@ -5037,6 +5042,10 @@
 }
 },
 ignoreEmptyFields: true,
+tags: cloudStack.api.tags({
+resourceType: 'SecurityGroupRule',
+contextId: 'multiRule'
+}),
 dataProvider: function(args) {
 $.ajax({
 url: 
createURL('listSecurityGroups'),



git commit: updated refs/heads/4.4 to f7d9ea2

2014-09-11 Thread weizhou
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 015276350 -> f7d9ea291


Add "Edit Tags" functionality to SecurityGroup rules in UI

Signed-off-by: Ilia Shakitko 
(cherry picked from commit 281c866206036235790773fbcb86edede0ac739d)


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

Branch: refs/heads/4.4
Commit: f7d9ea291be808a33829172234164e188673d9ed
Parents: 0152763
Author: Ilia Shakitko 
Authored: Thu Sep 11 12:25:09 2014 +0200
Committer: Wei Zhou 
Committed: Thu Sep 11 15:48:59 2014 +0200

--
 ui/scripts/network.js | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7d9ea29/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index c0a9205..f6a8f3d 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -22,7 +22,8 @@
 protocol: elem.protocol,
 startport: elem.startport,
 endport: elem.endport,
-cidr: elem.cidr ? elem.cidr : ''.concat(elem.account, ' - ', 
elem.securitygroupname)
+cidr: elem.cidr ? elem.cidr : ''.concat(elem.account, ' - ', 
elem.securitygroupname),
+tags: elem.tags
 };
 
 if (elemData.startport == 0 && elemData.endport) {
@@ -4837,6 +4838,10 @@
 }
 },
 ignoreEmptyFields: true,
+tags: cloudStack.api.tags({
+resourceType: 'SecurityGroupRule',
+contextId: 'multiRule'
+}),
 dataProvider: function(args) {
 $.ajax({
 url: 
createURL('listSecurityGroups'),
@@ -5032,6 +5037,10 @@
 }
 },
 ignoreEmptyFields: true,
+tags: cloudStack.api.tags({
+resourceType: 'SecurityGroupRule',
+contextId: 'multiRule'
+}),
 dataProvider: function(args) {
 $.ajax({
 url: 
createURL('listSecurityGroups'),



git commit: updated refs/heads/master to a698c3e

2014-09-11 Thread jessicawang
Repository: cloudstack
Updated Branches:
  refs/heads/master 281c86620 -> a698c3e27


LOUDSTACK-6840: OVS refers to SDN provider. However, we are not supporting SDN 
in this release. Therefore, remove OVS from UI for this release.


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

Branch: refs/heads/master
Commit: a698c3e276bf916d23f7253ed456d076e176fa94
Parents: 281c866
Author: Jessica Wang 
Authored: Thu Sep 11 10:56:11 2014 -0700
Committer: Jessica Wang 
Committed: Thu Sep 11 10:57:03 2014 -0700

--
 ui/scripts/system.js | 23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a698c3e2/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index ed53fd2..54aafe2 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -20751,12 +20751,7 @@
 id: 'BaremetalPxeProvider',
 name: 'Baremetal PXE',
 state: nspMap.BaremetalPxeProvider ? 
nspMap.BaremetalPxeProvider.state: 'Disabled'
-},
-{
-id: 'Ovs',
-name: 'Ovs',
-state: nspMap.Ovs ? nspMap.Ovs.state: 'Disabled'
-},
+},   
 {
 id: 'Opendaylight',
 name: 'OpenDaylight (Experimental)',
@@ -20819,16 +20814,16 @@
 name: 'GloboDNS',
 state: nspMap.GloboDns ? nspMap.GloboDns.state : 'Disabled'
 });
-}
-
-if ($.grep(nspHardcodingArray, function(e) { return e.id == 'Ovs'; 
}).length == 0 ) {
-nspHardcodingArray.push({
+
+//CLOUDSTACK-6840: OVS refers to SDN provider. However, we are not 
supporting SDN in this release.
+/*
+nspHardcodingArray.push({
 id: 'Ovs',
 name: 'Ovs',
-state: nspMap.Ovs ? nspMap.Ovs.state : 'Disabled'
-});
-}
-
+state: nspMap.Ovs ? nspMap.Ovs.state: 'Disabled'   

+   }); 
+   */ 
+}   
 };
 
 cloudStack.actionFilter.physicalNetwork = function (args) {



git commit: updated refs/heads/master to 3077510

2014-09-11 Thread bfederle
Repository: cloudstack
Updated Branches:
  refs/heads/master a698c3e27 -> 307751083


CLOUDSTACK-6722: [OVS][UI] Network created with StretchedL2Subnet is not 
available for vm deployement in other zones


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

Branch: refs/heads/master
Commit: 30775108386e5f9d6fa9749508252fccb43437f7
Parents: a698c3e
Author: Gabor Apati-Nagy 
Authored: Mon Jun 2 17:59:59 2014 +0100
Committer: Brian Federle 
Committed: Thu Sep 11 11:56:46 2014 -0700

--
 ui/scripts/instanceWizard.js | 41 +++
 1 file changed, 41 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/30775108/ui/scripts/instanceWizard.js
--
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 5664cce..6708330 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -509,6 +509,47 @@
 }
 });
 
+//In addition to the networks in the current zone, find 
networks in other zones that have stretchedL2subnet==true
+//capability and show them on the UI
+var allOtherAdvancedZones = [];
+$.ajax({
+url: createURL('listZones'),
+dataType: "json",
+async: false,
+success: function(json) {
+var result = $.grep(json.listzonesresponse.zone, 
function(zone) {
+   return (zone.networktype == 'Advanced');
+});
+$(result).each(function() {
+if (selectedZoneObj.id != this.id)
+allOtherAdvancedZones.push(this);
+});
+}
+});
+if (allOtherAdvancedZones.length > 0) {
+for (var i = 0; i < allOtherAdvancedZones.length; i++) 
{
+var networkDataForZone = {
+zoneId: allOtherAdvancedZones[i].id,
+canusefordeploy: true
+};
+$.ajax({
+url: createURL('listNetworks'),
+data: networkDataForZone,
+async: false,
+success: function(json) {
+var networksInThisZone = 
json.listnetworksresponse.network ? json.listnetworksresponse.network : [];
+if (networksInThisZone.length > 0) {
+for (var i = 0; i < 
networksInThisZone.length; i++) {
+if 
(networksInThisZone[i].strechedl2subnet) {
+
networkObjsToPopulate.push(networksInThisZone[i]);
+}
+}
+}
+}
+});
+}
+}
+
 $.ajax({
 url: createURL("listNetworkOfferings"),
 dataType: "json",



git commit: updated refs/heads/master to 9f38fd6

2014-09-11 Thread bfederle
Repository: cloudstack
Updated Branches:
  refs/heads/master 307751083 -> 9f38fd6c9


CLOUDSTACK-6725: [OVS][UI] vm deployment wizard does not show all available 
zones in a region while deploying vm in a Regionlevel vpc


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

Branch: refs/heads/master
Commit: 9f38fd6c9f61c5ef7a576a19cfbaaa5ddc689988
Parents: 3077510
Author: Gabor Apati-Nagy 
Authored: Mon Jun 2 16:25:51 2014 +0100
Committer: Brian Federle 
Committed: Thu Sep 11 12:00:42 2014 -0700

--
 ui/scripts/instanceWizard.js | 30 +-
 1 file changed, 17 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f38fd6c/ui/scripts/instanceWizard.js
--
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 6708330..97a039b 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -77,19 +77,23 @@
 steps: [
 // Step 1: Setup
 function(args) {
-if (args.initArgs.pluginForm != null && 
args.initArgs.pluginForm.name == "vpcTierInstanceWizard") { //from VPC Tier 
chart
-//populate only one zone to the dropdown, the zone which 
the VPC is under.
-zoneObjs = [{
-id: args.context.vpc[0].zoneid,
-name: args.context.vpc[0].zonename,
-networktype: 'Advanced'
-}];
-args.response.success({
-data: {
-zones: zoneObjs
-}
-});
-} else { //from Instance page
+//from VPC Tier chart -- when the tier (network) has 
strechedl2subnet==false:
+//only own zone is populated to the dropdown
+if (args.initArgs.pluginForm != null && 
args.initArgs.pluginForm.name == "vpcTierInstanceWizard"
+&& args.context.networks[0].strechedl2subnet) {
+zoneObjs = [{
+id: args.context.vpc[0].zoneid,
+name: args.context.vpc[0].zonename,
+networktype: 'Advanced'
+}];
+args.response.success({
+data: {
+zones: zoneObjs
+}
+});
+}
+//in all other cases (as well as from instance page) all zones 
are populated to dropdown
+else {
 $.ajax({
 url: createURL("listZones&available=true"),
 dataType: "json",



git commit: updated refs/heads/4.4 to aa81823

2014-09-11 Thread jessicawang
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 f7d9ea291 -> aa81823ce


CLOUDSTACK-7462: UI > Network > VPC > Router > Network ACL Lists > click an 
entry from list > Details tab > ACL List Rules tab > click Edit icon on any 
existing rule > fix the JavaScript error "args.jsonObj is undefined".


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

Branch: refs/heads/4.4
Commit: aa81823ce81540d83f3d14f3eceffa2783bfaaf5
Parents: f7d9ea2
Author: Jessica Wang 
Authored: Thu Sep 11 13:35:28 2014 -0700
Committer: Jessica Wang 
Committed: Thu Sep 11 13:35:28 2014 -0700

--
 ui/scripts/sharedFunctions.js | 66 +++---
 1 file changed, 33 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa81823c/ui/scripts/sharedFunctions.js
--
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index f58fdd2..1ed90c2 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -2089,42 +2089,42 @@ cloudStack.api = {
 }
 },
 dataProvider: function(args) {
-   args.response.success({
-data: args.jsonObj.tags
-});
-   
-   /*
-var resourceId = args.context[contextId][0].id;
-var data = {
-resourceId: resourceId,
-resourceType: resourceType
-};
-
-if (isAdmin() || isDomainAdmin()) {
-data.listAll = true;
-}
-
-if (args.context.projects) {
-data.projectid = args.context.projects[0].id;
-}
+   if (args.jsonObj != undefined) {
+   args.response.success({
+   data: args.jsonObj.tags
+   });
+   } else {
+   var resourceId = args.context[contextId][0].id;
+var data = {
+resourceId: resourceId,
+resourceType: resourceType
+};
+
+if (isAdmin() || isDomainAdmin()) {
+data.listAll = true;
+}
 
-if (args.jsonObj != null && args.jsonObj.projectid != null && 
data.projectid == null) {
-data.projectid = args.jsonObj.projectid;
-}
+if (args.context.projects) {
+data.projectid = args.context.projects[0].id;
+}
 
-$.ajax({
-url: createURL('listTags'),
-data: data,
-success: function(json) {
-args.response.success({
-data: json.listtagsresponse ? 
json.listtagsresponse.tag : []
-});
-},
-error: function(json) {
-args.response.error(parseXMLHttpResponse(json));
+if (args.jsonObj != null && args.jsonObj.projectid != null 
&& data.projectid == null) {
+data.projectid = args.jsonObj.projectid;
 }
-});
-*/
+
+$.ajax({
+url: createURL('listTags'),
+data: data,
+success: function(json) {
+args.response.success({
+data: json.listtagsresponse ? 
json.listtagsresponse.tag : []
+});
+},
+error: function(json) {
+args.response.error(parseXMLHttpResponse(json));
+}
+});
+   }   
 }
 };
 }