You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sw...@apache.org on 2016/07/18 18:12:37 UTC

[01/13] git commit: updated refs/heads/master to 54039f9

Repository: cloudstack
Updated Branches:
  refs/heads/master 49df7f283 -> 54039f949


[CLOUDSTACK-9328]: Fix vlan issues from test  suite test_privategw_acl.py
in BVT
Bug-Id:## CLOUDSTACK-9328

[CLOUDSTACK-9328]: Made changes as per the review comment from Shwetaag

[CLOUDSTACK-9328]: Made changes based on the CI results


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

Branch: refs/heads/master
Commit: 1be9e42b93704e34342908d788d8d6a702612088
Parents: 22c6b47
Author: sanjeev <sa...@apache.org>
Authored: Mon Mar 28 16:06:57 2016 +0530
Committer: sanjeev <sa...@accelerite.com>
Committed: Tue Jun 14 15:27:47 2016 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_privategw_acl.py | 28 ++++++++++++++++++-----
 1 file changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1be9e42b/test/integration/smoke/test_privategw_acl.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py
index d2e08f5..a1c5e85 100644
--- a/test/integration/smoke/test_privategw_acl.py
+++ b/test/integration/smoke/test_privategw_acl.py
@@ -24,6 +24,7 @@ from marvin.lib.utils import *
 from marvin.lib.base import *
 from marvin.lib.common import *
 from nose.plugins.attrib import attr
+from marvin.codes import PASS
 
 import time
 import logging
@@ -195,8 +196,7 @@ class TestPrivateGwACL(cloudstackTestCase):
 
     def setUp(self):
         self.apiclient = self.testClient.getApiClient()
-        self.hypervisor = self.testClient.getHypervisorInfo()
-        
+        self.dbclient = self.testClient.getDbConnection()
         self.logger.debug("Creating Admin Account for Domain ID ==> %s" % self.domain.id)
         self.account = Account.create(
             self.apiclient,
@@ -240,8 +240,16 @@ class TestPrivateGwACL(cloudstackTestCase):
         if not physical_networks:
             self.fail("No Physical Networks found!")
 
-        vlans = physical_networks[0].vlan.split('-')
-        vlan_1 = int(vlans[0])
+        qresultset = self.dbclient.execute(
+            "select vnet from op_dc_vnet_alloc where physical_network_id=\
+            (select id from physical_network where uuid='%s' ) and taken is NULL;" % physical_networks[0].id
+        )
+        self.assertEqual(validateList(qresultset)[0],
+                         PASS,
+                         "Invalid sql query response"
+                         )
+        vlans = qresultset
+        vlan_1 = int(vlans[0][0])
 
         acl = self.createACL(vpc)
         self.createACLItem(acl.id)
@@ -308,8 +316,16 @@ class TestPrivateGwACL(cloudstackTestCase):
         if not physical_networks:
             self.fail("No Physical Networks found!")
 
-        vlans = physical_networks[0].vlan.split('-')
-        vlan_1 = int(vlans[0])
+        qresultset = self.dbclient.execute(
+            "select vnet from op_dc_vnet_alloc where physical_network_id=\
+            (select id from physical_network where uuid='%s' ) and taken is NULL;" % physical_networks[0].id
+        )
+        self.assertEqual(validateList(qresultset)[0],
+                         PASS,
+                         "Invalid sql query response"
+        )
+        vlans = qresultset
+        vlan_1 = int(vlans[0][0])
 
         network_1 = self.createNetwork(vpc_1, gateway = '10.0.1.1')
         network_2 = self.createNetwork(vpc_2, gateway = '10.0.2.1')


[11/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Merge pull request #1608 from myENA/upstream/context-cleanup

Cleanup RBD contexts after exceptions to prevent potential agent crashWe noticed that when an exception occurs within the cleanup loop inside
the deletePhysicalDisk routine that the previously allocated contexts
are not cleaned up.  This seemed to cause an eventual crash of the host
agent after multiple exceptions within the loop.

In addition to ensuring the contexts are always freed we also improved
the logging when exceptions do occur to include the actual return code
from the underlying library in deletePhysicalDisk and deleteSnapshot.

* pr/1608:
  improve logging readability
  Cleanup rbd contexts and improve exception logging

Signed-off-by: Will Stevens <wi...@gmail.com>


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

Branch: refs/heads/master
Commit: bb9d94bc64336f1fc34804716aeb150cc1b04dea
Parents: ea48e95 c8fce3f
Author: Will Stevens <wi...@gmail.com>
Authored: Mon Jul 18 14:10:36 2016 -0400
Committer: Will Stevens <wi...@gmail.com>
Committed: Mon Jul 18 14:10:37 2016 -0400

----------------------------------------------------------------------
 .../kvm/storage/KVMStorageProcessor.java        | 16 +++++++-
 .../kvm/storage/LibvirtStorageAdaptor.java      | 43 ++++++++++++--------
 2 files changed, 42 insertions(+), 17 deletions(-)
----------------------------------------------------------------------



[05/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
improve logging readability


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

Branch: refs/heads/master
Commit: c8fce3ff31c1437681f1c2b32864eb2d34b66be5
Parents: 4449144
Author: Aaron Hurt <ah...@ena.com>
Authored: Mon Jul 11 10:49:43 2016 -0500
Committer: Aaron Hurt <ah...@ena.com>
Committed: Mon Jul 11 12:05:06 2016 -0500

----------------------------------------------------------------------
 .../hypervisor/kvm/storage/KVMStorageProcessor.java      | 11 +++++++----
 .../hypervisor/kvm/storage/LibvirtStorageAdaptor.java    |  6 ++++++
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8fce3ff/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
index 77cbdd3..29655d1 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
@@ -1329,7 +1329,8 @@ public class KVMStorageProcessor implements StorageProcessor {
                     s_logger.info("Snapshot " + snap_full_name + " successfully removed from " +
                             primaryPool.getType().toString() + "  pool.");
                 } catch (RbdException e) {
-                    s_logger.error(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
+                    s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString() +
+                        ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
                 } finally {
                     rbd.close(image);
                     r.ioCtxDestroy(io);
@@ -1340,13 +1341,15 @@ public class KVMStorageProcessor implements StorageProcessor {
             }
             return new Answer(cmd, true, "Snapshot " + snap_full_name + " removed successfully.");
         } catch (RadosException e) {
-            s_logger.error(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
+            s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString() +
+                ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
             return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
         } catch (RbdException e) {
-            s_logger.error(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
+            s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString() +
+                ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
             return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
         } catch (Exception e) {
-            s_logger.error(e.toString());
+            s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString());
             return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8fce3ff/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 5a35973..6e8ba30 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
@@ -878,6 +878,8 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
                     s_logger.info("Succesfully unprotected and removed any remaining snapshots (" + snaps.size() + ") of "
                         + pool.getSourceDir() + "/" + uuid + " Continuing to remove the RBD image");
                 } catch (RbdException e) {
+                    s_logger.error("Failed to remove snapshot with exception: " + e.toString() +
+                        ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
                     throw new CloudRuntimeException(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
                 } finally {
                     s_logger.debug("Closing image and destroying context");
@@ -885,8 +887,12 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
                     r.ioCtxDestroy(io);
                 }
             } catch (RadosException e) {
+                s_logger.error("Failed to remove snapshot with exception: " + e.toString() +
+                    ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
                 throw new CloudRuntimeException(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
             } catch (RbdException e) {
+                s_logger.error("Failed to remove snapshot with exception: " + e.toString() +
+                    ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
                 throw new CloudRuntimeException(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
             }
         }


[06/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Added fix for adding/editing Network ACL rule ordering


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

Branch: refs/heads/master
Commit: 6dd6ef0c9a30f128657de22fa8b6ea8ab5daa133
Parents: 1f9bf93
Author: Patrick Dube <pd...@cloudops.com>
Authored: Mon Jul 11 15:12:41 2016 -0400
Committer: Patrick Dube <pd...@cloudops.com>
Committed: Mon Jul 11 15:12:41 2016 -0400

----------------------------------------------------------------------
 .../debian/config/opt/cloud/bin/cs/CsNetfilter.py        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dd6ef0c/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
index 4b5b492..39f184b 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py
@@ -151,6 +151,8 @@ class CsNetfilters(object):
             if isinstance(fw[1], int):
                 new_rule.set_count(fw[1])
 
+            rule_chain = new_rule.get_chain()
+
             logging.debug("Checking if the rule already exists: rule=%s table=%s chain=%s", new_rule.get_rule(), new_rule.get_table(), new_rule.get_chain())
             if self.has_rule(new_rule):
                 logging.debug("Exists: rule=%s table=%s", fw[2], new_rule.get_table())
@@ -162,9 +164,14 @@ class CsNetfilters(object):
                 if fw[1] == "front":
                     cpy = cpy.replace('-A', '-I')
                 if isinstance(fw[1], int):
-                    cpy = cpy.replace("-A %s" % new_rule.get_chain(), '-I %s %s' % (new_rule.get_chain(), fw[1]))
-
+                    # if the rule is for ACLs, we want to insert them in order, right before the DROP all
+                    if rule_chain.startswith("ACL_INBOUND") or rule_chain.startswith("ACL_OUTBOUND"):
+                        rule_count = self.chain.get_count(rule_chain)
+                        cpy = cpy.replace("-A %s" % new_rule.get_chain(), '-I %s %s' % (new_rule.get_chain(), rule_count))
+                    else:
+                        cpy = cpy.replace("-A %s" % new_rule.get_chain(), '-I %s %s' % (new_rule.get_chain(), fw[1]))
                 CsHelper.execute("iptables -t %s %s" % (new_rule.get_table(), cpy))
+                self.chain.add_rule(rule_chain)
         self.del_standard()
         self.get_unseen()
 


[04/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Cleanup rbd contexts and improve exception logging

We noticed that when an exception occurs within the cleanup loop inside
the deletePhysicalDisk routine that the previously allocated contexts
are not cleaned up.  This seemed to cause an eventual crash of the host
agent after multiple exceptions within the loop.

In addition to ensuring the contexts are always freed we also improved
the logging when exceptions do occur to include the actual return code
from the underlying library in deletePhysicalDisk and deleteSnapshot.


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

Branch: refs/heads/master
Commit: 44491448e3811cfcebe5c3aeee72ba7a01948cda
Parents: 1f9bf93
Author: Aaron Hurt <ah...@anbcs.com>
Authored: Fri Jul 8 22:57:06 2016 -0500
Committer: Aaron Hurt <ah...@anbcs.com>
Committed: Fri Jul 8 23:13:33 2016 -0500

----------------------------------------------------------------------
 .../kvm/storage/KVMStorageProcessor.java        | 13 ++++++-
 .../kvm/storage/LibvirtStorageAdaptor.java      | 37 +++++++++++---------
 2 files changed, 33 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/44491448/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
index ed2fa49..77cbdd3 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
@@ -69,7 +69,10 @@ import org.libvirt.LibvirtException;
 
 import com.ceph.rados.IoCTX;
 import com.ceph.rados.Rados;
+import com.ceph.rados.exceptions.ErrorCode;
+import com.ceph.rados.exceptions.RadosException;
 import com.ceph.rbd.Rbd;
+import com.ceph.rbd.RbdException;
 import com.ceph.rbd.RbdImage;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer;
@@ -1325,6 +1328,8 @@ public class KVMStorageProcessor implements StorageProcessor {
                     image.snapRemove(snapshotName);
                     s_logger.info("Snapshot " + snap_full_name + " successfully removed from " +
                             primaryPool.getType().toString() + "  pool.");
+                } catch (RbdException e) {
+                    s_logger.error(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
                 } finally {
                     rbd.close(image);
                     r.ioCtxDestroy(io);
@@ -1334,8 +1339,14 @@ public class KVMStorageProcessor implements StorageProcessor {
                 throw new InternalErrorException("Operation not implemented for storage pool type of " + primaryPool.getType().toString());
             }
             return new Answer(cmd, true, "Snapshot " + snap_full_name + " removed successfully.");
+        } catch (RadosException e) {
+            s_logger.error(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
+            return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
+        } catch (RbdException e) {
+            s_logger.error(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
+            return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
         } catch (Exception e) {
-            s_logger.error(e.getMessage());
+            s_logger.error(e.toString());
             return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/44491448/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 d7bdab2..5a35973 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
@@ -35,6 +35,7 @@ import org.libvirt.StorageVol;
 
 import com.ceph.rados.IoCTX;
 import com.ceph.rados.Rados;
+import com.ceph.rados.exceptions.ErrorCode;
 import com.ceph.rados.exceptions.RadosException;
 import com.ceph.rbd.Rbd;
 import com.ceph.rbd.RbdException;
@@ -863,26 +864,30 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
                 RbdImage image = rbd.open(uuid);
                 s_logger.debug("Fetching list of snapshots of RBD image " + pool.getSourceDir() + "/" + uuid);
                 List<RbdSnapInfo> snaps = image.snapList();
-                for (RbdSnapInfo snap : snaps) {
-                    if (image.snapIsProtected(snap.name)) {
-                        s_logger.debug("Unprotecting snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name);
-                        image.snapUnprotect(snap.name);
-                    } else {
-                        s_logger.debug("Snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name + " is not protected.");
+                try {
+                    for (RbdSnapInfo snap : snaps) {
+                        if (image.snapIsProtected(snap.name)) {
+                            s_logger.debug("Unprotecting snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name);
+                            image.snapUnprotect(snap.name);
+                        } else {
+                            s_logger.debug("Snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name + " is not protected.");
+                        }
+                        s_logger.debug("Removing snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name);
+                        image.snapRemove(snap.name);
                     }
-                    s_logger.debug("Removing snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name);
-                    image.snapRemove(snap.name);
+                    s_logger.info("Succesfully unprotected and removed any remaining snapshots (" + snaps.size() + ") of "
+                        + pool.getSourceDir() + "/" + uuid + " Continuing to remove the RBD image");
+                } catch (RbdException e) {
+                    throw new CloudRuntimeException(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
+                } finally {
+                    s_logger.debug("Closing image and destroying context");
+                    rbd.close(image);
+                    r.ioCtxDestroy(io);
                 }
-
-                rbd.close(image);
-                r.ioCtxDestroy(io);
-
-                s_logger.info("Succesfully unprotected and removed any remaining snapshots (" + snaps.size() + ") of "
-                              + pool.getSourceDir() + "/" + uuid + " Continuing to remove the RBD image");
             } catch (RadosException e) {
-                throw new CloudRuntimeException(e.toString());
+                throw new CloudRuntimeException(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
             } catch (RbdException e) {
-                throw new CloudRuntimeException(e.toString());
+                throw new CloudRuntimeException(e.toString() + " - " + ErrorCode.getErrorMessage(e.getReturnValue()));
             }
         }
 


[12/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Merge pull request #1609 from pdube/network-acl-add-order

[CLOUDSTACK-9430] Added fix for adding/editing Network ACL rule orderingBUG: https://issues.apache.org/jira/browse/CLOUDSTACK-9430

The issue occurred because all of the ACL rules get inserted before the old ones. Then, the cleanup deletes the duplicate rows, and leaves any new rule in front of the old ones.

Here is an example with a simplified iptables view for ACL
Ex: adding a rule 4
before add:
1,2,3

during add:
1',2',3',4',1,2,3

after add:
4',1,2,3

After fix:
before add:
1,2,3

during add:
1,2,3,1',2',3',4'

after add:
1',2',3',4'

* pr/1609:
  Added fix for adding/editing Network ACL rule ordering

Signed-off-by: Will Stevens <wi...@gmail.com>


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

Branch: refs/heads/master
Commit: a566cde145391e370632449b5ee5069664c05bcc
Parents: bb9d94b 6dd6ef0
Author: Will Stevens <wi...@gmail.com>
Authored: Mon Jul 18 14:11:13 2016 -0400
Committer: Will Stevens <wi...@gmail.com>
Committed: Mon Jul 18 14:11:13 2016 -0400

----------------------------------------------------------------------
 .../debian/config/opt/cloud/bin/cs/CsNetfilter.py        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[03/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
CLOUDSTACK-9348: Reduce Nio selector wait time

This reduced the Nio loop selector wait time, this way the selector will
check frequently (as much as 100ms per iteration) and handle any pending
connection/tasks. This would make reconnections very quick at the expense of
some CPU usage.

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


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

Branch: refs/heads/master
Commit: 0381b7ea185ef753873594216a67b8d376e3d658
Parents: e4ba640
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Jul 1 14:32:58 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Jul 1 14:34:48 2016 +0530

----------------------------------------------------------------------
 utils/src/main/java/com/cloud/utils/nio/NioConnection.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0381b7ea/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/com/cloud/utils/nio/NioConnection.java b/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
index 9d755d6..630b2dd 100644
--- a/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
+++ b/utils/src/main/java/com/cloud/utils/nio/NioConnection.java
@@ -125,7 +125,7 @@ public abstract class NioConnection implements Callable<Boolean> {
     public Boolean call() throws NioConnectionException {
         while (_isRunning) {
             try {
-                _selector.select(1000);
+                _selector.select(100);
 
                 // Someone is ready for I/O, get the ready keys
                 final Set<SelectionKey> readyKeys = _selector.selectedKeys();


[10/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Merge pull request #1601 from shapeblue/nio-aggressive-selector

CLOUDSTACK-9348: Reduce Nio selector wait timeThis reduced the Nio loop selector wait time, this way the selector will
check frequently (as much as 100ms per iteration) and handle any pending
connection/tasks. This would make reconnections very quick at the expense of
some CPU usage.

/cc @swill @kiwiflyer guys can you please apply this fix in your env and test if you're still able to produce any Nio related error b/w mgmt server(s) and kvm agent(s) not being able to connect quickly. Please also watch out for any increased CPU usage (there should not be any significant change), in which case we may increase the timeout from 100ms to 200-400ms.

* pr/1601:
  CLOUDSTACK-9348: Reduce Nio selector wait time

Signed-off-by: Will Stevens <wi...@gmail.com>


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

Branch: refs/heads/master
Commit: ea48e95bdd1641c752eb573fe448aac6478cecd1
Parents: a38279d 0381b7e
Author: Will Stevens <wi...@gmail.com>
Authored: Mon Jul 18 14:10:06 2016 -0400
Committer: Will Stevens <wi...@gmail.com>
Committed: Mon Jul 18 14:10:06 2016 -0400

----------------------------------------------------------------------
 utils/src/main/java/com/cloud/utils/nio/NioConnection.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[02/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
ui: show resize volume button to all users

The resize volume is support on all major hypervisors (Xen, VMware, KVM).
The hypervisor key is returned by the list volumes response only for admins
but not for users or domain admin users. This removes the check, as the operation
is supported on all major hypervisors that CloudStack supports.

With this changes all users would see resize volume button in the UI.

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


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

Branch: refs/heads/master
Commit: b68ae1949e9fa5ae376a0ae7b67c3349b9e83418
Parents: 22c6b47
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Thu Jun 23 12:27:51 2016 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Jun 23 12:27:51 2016 +0530

----------------------------------------------------------------------
 ui/scripts/storage.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b68ae194/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 29cd4c1..b26e60b 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -2365,10 +2365,8 @@
             }
         }
 
-        if (jsonObj.hypervisor == "KVM" || jsonObj.hypervisor == "XenServer" || jsonObj.hypervisor == "VMware") {
-            if (jsonObj.state == "Ready" || jsonObj.state == "Allocated") {
-                allowedActions.push("resize");
-            }
+        if (jsonObj.state == "Ready" || jsonObj.state == "Allocated") {
+            allowedActions.push("resize");
         }
 
         if (jsonObj.state != "Allocated") {


[09/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Merge pull request #1595 from shapeblue/ui-resize-show-allusers

ui: show resize volume button to all users![screenshot from 2016-06-23 12-29-56](https://cloud.githubusercontent.com/assets/95203/16294438/436f6dbc-393e-11e6-91b5-cb2e49a01cc6.png)

The resize volume is support on all major hypervisors (Xen, VMware, KVM).
The hypervisor key is returned by the list volumes response only for admins
but not for users or domain admin users. This removes the check, as the operation
is supported on all major hypervisors that CloudStack supports.

With this bug fix all users would see resize volume button in the UI.

/cc @swill

* pr/1595:
  ui: show resize volume button to all users

Signed-off-by: Will Stevens <wi...@gmail.com>


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

Branch: refs/heads/master
Commit: a38279de6a220eec726174130ae113c0c467b26d
Parents: c806f3d b68ae19
Author: Will Stevens <wi...@gmail.com>
Authored: Mon Jul 18 14:09:17 2016 -0400
Committer: Will Stevens <wi...@gmail.com>
Committed: Mon Jul 18 14:09:18 2016 -0400

----------------------------------------------------------------------
 ui/scripts/storage.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[08/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Merge pull request #1455 from sanju1010/vlan

[CLOUDSTACK-9328]: Fix vlan issues from test suite test_privategw_acl.py in BVTPlease refer to CLOUDSTACK-9328 for the details.

Test Results:
==========
test_01_vpc_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_01_vpc_privategw_acl | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 108.273s

OK

* pr/1455:
  [CLOUDSTACK-9328]: Fix vlan issues from test  suite test_privategw_acl.py in BVT Bug-Id:## CLOUDSTACK-9328

Signed-off-by: Will Stevens <wi...@gmail.com>


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

Branch: refs/heads/master
Commit: c806f3d8b2c54449f2b54109412f14b6e40fbdb1
Parents: 49df7f2 1be9e42
Author: Will Stevens <wi...@gmail.com>
Authored: Mon Jul 18 14:08:38 2016 -0400
Committer: Will Stevens <wi...@gmail.com>
Committed: Mon Jul 18 14:08:39 2016 -0400

----------------------------------------------------------------------
 test/integration/smoke/test_privategw_acl.py | 28 ++++++++++++++++++-----
 1 file changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[07/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
packaging: Add db.X.driver=jdbc:mysql to db.properties on upgrade

This is required afther the upgrade to 4.9.0 and for convience we
add this to the configuration so our users do not have to.


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

Branch: refs/heads/master
Commit: 343ea6098e1884df410484149ed71ad8f51f4ec3
Parents: 1f9bf93
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Tue Jul 12 08:46:11 2016 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Tue Jul 12 10:13:23 2016 +0200

----------------------------------------------------------------------
 debian/cloudstack-management.postinst | 5 +++++
 packaging/centos63/cloud.spec         | 4 ++++
 packaging/centos7/cloud.spec          | 4 ++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/343ea609/debian/cloudstack-management.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst
index 145d1ea..e37813f 100644
--- a/debian/cloudstack-management.postinst
+++ b/debian/cloudstack-management.postinst
@@ -58,6 +58,11 @@ if [ "$1" = configure ]; then
     chmod 0640 /etc/cloudstack/management/db.properties
     chgrp cloud /etc/cloudstack/management/db.properties
     invoke-rc.d tomcat6 stop || true
+
+    # Add jdbc MySQL driver settings to db.properties if not present
+    grep "db.cloud.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.cloud.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+    grep "db.usage.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.usage.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+    grep "db.simulator.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.simulator.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
 fi
 
 #DEBHELPER#

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/343ea609/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index c267e8f..2858395 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -408,6 +408,10 @@ if [ "$1" == "1" ] ; then
     /sbin/chkconfig --level 345 cloudstack-management on > /dev/null 2>&1 || true
 fi
 
+grep "db.cloud.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.cloud.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+grep "db.usage.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.usage.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+grep "db.simulator.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.simulator.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+
 if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util ] ; then
     echo Please download vhd-util from http://download.cloud.com.s3.amazonaws.com/tools/vhd-util and put it in 
     echo %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/343ea609/packaging/centos7/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
index b99d950d8..8d2ddc4 100644
--- a/packaging/centos7/cloud.spec
+++ b/packaging/centos7/cloud.spec
@@ -363,6 +363,10 @@ if [ "$1" == "1" ] ; then
     /usr/bin/systemctl on cloudstack-management > /dev/null 2>&1 || true
 fi
 
+grep "db.cloud.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.cloud.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+grep "db.usage.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.usage.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+grep "db.simulator.driver=jdbc:mysql" /etc/cloudstack/management/db.properties > /dev/null|| echo "db.simulator.driver=jdbc:mysql" >> /etc/cloudstack/management/db.properties
+
 if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util ] ; then
     echo Please download vhd-util from http://download.cloud.com.s3.amazonaws.com/tools/vhd-util and put it in
     echo %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/


[13/13] git commit: updated refs/heads/master to 54039f9

Posted by sw...@apache.org.
Merge pull request #1610 from wido/db-properties-mysql-driver

packaging: Add db.X.driver=jdbc:mysql to db.properties on upgradeThis is required afther the upgrade to 4.9.0 and for convience we
add this to the configuration so our users do not have to.

* pr/1610:
  packaging: Add db.X.driver=jdbc:mysql to db.properties on upgrade

Signed-off-by: Will Stevens <wi...@gmail.com>


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

Branch: refs/heads/master
Commit: 54039f94971de56e745518276de930d578eaba26
Parents: a566cde 343ea60
Author: Will Stevens <wi...@gmail.com>
Authored: Mon Jul 18 14:12:02 2016 -0400
Committer: Will Stevens <wi...@gmail.com>
Committed: Mon Jul 18 14:12:03 2016 -0400

----------------------------------------------------------------------
 debian/cloudstack-management.postinst | 5 +++++
 packaging/centos63/cloud.spec         | 4 ++++
 packaging/centos7/cloud.spec          | 4 ++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------