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/16 20:25:56 UTC

[1/6] git commit: updated refs/heads/master to 24818af

Repository: cloudstack
Updated Branches:
  refs/heads/master 75b68c682 -> 24818af23


Nullpointer Exception in NicProfileHelperImpl


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

Branch: refs/heads/master
Commit: 78fbaf7d4da995c0cdb0ae84606e66f72c6cf289
Parents: 3ee53d3
Author: Boris Schrijver <bs...@schubergphilis.com>
Authored: Mon Jan 11 09:57:35 2016 +0100
Committer: Boris Schrijver <bs...@schubergphilis.com>
Committed: Mon Jan 11 09:57:35 2016 +0100

----------------------------------------------------------------------
 server/src/com/cloud/network/router/NicProfileHelperImpl.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/78fbaf7d/server/src/com/cloud/network/router/NicProfileHelperImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/NicProfileHelperImpl.java b/server/src/com/cloud/network/router/NicProfileHelperImpl.java
index 7d8c19a..4a0faa9 100644
--- a/server/src/com/cloud/network/router/NicProfileHelperImpl.java
+++ b/server/src/com/cloud/network/router/NicProfileHelperImpl.java
@@ -63,6 +63,7 @@ public class NicProfileHelperImpl implements NicProfileHelper {
     @DB
     public NicProfile createPrivateNicProfileForGateway(final VpcGateway privateGateway, final VirtualRouter router) {
         final Network privateNetwork = _networkModel.getNetwork(privateGateway.getNetworkId());
+
         PrivateIpVO ipVO = _privateIpDao.allocateIpAddress(privateNetwork.getDataCenterId(), privateNetwork.getId(), privateGateway.getIp4Address());
 
         final Long vpcId = privateGateway.getVpcId();
@@ -71,7 +72,11 @@ public class NicProfileHelperImpl implements NicProfileHelper {
             ipVO = _privateIpDao.findByIpAndVpcId(vpcId, privateGateway.getIp4Address());
         }
 
-        final Nic privateNic = _nicDao.findByIp4AddressAndNetworkId(ipVO.getIpAddress(), privateNetwork.getId());
+        Nic privateNic = null;
+
+        if (ipVO != null) {
+            privateNic = _nicDao.findByIp4AddressAndNetworkId(ipVO.getIpAddress(), privateNetwork.getId());
+        }
 
         NicProfile privateNicProfile = new NicProfile();
 


[2/6] git commit: updated refs/heads/master to 24818af

Posted by re...@apache.org.
Add integration test for restartVPC with cleanup, and Private Gateway enabled.


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

Branch: refs/heads/master
Commit: de11b7307c2058959918ebc0eb22a55705d177b9
Parents: 78fbaf7
Author: Boris Schrijver <bs...@schubergphilis.com>
Authored: Mon Jan 11 14:34:08 2016 +0100
Committer: Boris Schrijver <bs...@schubergphilis.com>
Committed: Mon Jan 11 16:02:32 2016 +0100

----------------------------------------------------------------------
 test/integration/smoke/test_privategw_acl.py | 34 +++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/de11b730/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 7231a4b..754738b 100644
--- a/test/integration/smoke/test_privategw_acl.py
+++ b/test/integration/smoke/test_privategw_acl.py
@@ -253,7 +253,19 @@ class TestPrivateGwACL(cloudstackTestCase):
         self.performVPCTests(vpc_off)
 
     @attr(tags=["advanced"], required_hardware="true")
-    def test_03_rvpc_privategw_static_routes(self):
+    def test_03_vpc_privategw_restart_vpc_cleanup(self):
+        self.logger.debug("Creating a VPC offering..")
+        vpc_off = VpcOffering.create(
+            self.apiclient,
+            self.services["vpc_offering"])
+
+        self.logger.debug("Enabling the VPC offering created")
+        vpc_off.update(self.apiclient, state='Enabled')
+
+        self.performVPCTests(vpc_off, True)
+
+    @attr(tags=["advanced"], required_hardware="true")
+    def test_04_rvpc_privategw_static_routes(self):
         self.logger.debug("Creating a Redundant VPC offering..")
         vpc_off = VpcOffering.create(
             self.apiclient,
@@ -264,7 +276,7 @@ class TestPrivateGwACL(cloudstackTestCase):
 
         self.performVPCTests(vpc_off)
 
-    def performVPCTests(self, vpc_off):
+    def performVPCTests(self, vpc_off, restart_with_cleanup = False):
         self.logger.debug("Creating VPCs with  offering ID %s" % vpc_off.id)
         vpc_1 = self.createVPC(vpc_off, cidr = '10.0.1.0/24')
         vpc_2 = self.createVPC(vpc_off, cidr = '10.0.2.0/24')
@@ -312,6 +324,13 @@ class TestPrivateGwACL(cloudstackTestCase):
         self.check_pvt_gw_connectivity(vm1, public_ip_1, vm2.nic[0].ipaddress)
         self.check_pvt_gw_connectivity(vm2, public_ip_2, vm1.nic[0].ipaddress)
 
+        if restart_with_cleanup:
+            self.reboot_vpc_with_cleanup(vpc_1, True)
+            self.reboot_vpc_with_cleanup(vpc_2, True)
+
+            self.check_pvt_gw_connectivity(vm1, public_ip_1, vm2.nic[0].ipaddress)
+            self.check_pvt_gw_connectivity(vm2, public_ip_2, vm1.nic[0].ipaddress)
+
     def createVPC(self, vpc_offering, cidr = '10.1.1.1/16'):
         try:
             self.logger.debug("Creating a VPC network in the account: %s" % self.account.name)
@@ -539,3 +558,14 @@ class TestPrivateGwACL(cloudstackTestCase):
                          1,
                          "Ping to outside world from VM should be successful"
                          )
+
+    def reboot_vpc_with_cleanup(self, vpc, cleanup = True):
+        self.logger.debug("Restarting VPC %s with cleanup" % vpc.id)
+
+        # Reboot the router
+        cmd = restartVPC.restartVPCCmd()
+        cmd.id = vpc.id
+        cmd.cleanup = cleanup
+        cmd.makeredundant = False
+        self.api_client.restartVPC(cmd)
+


[3/6] git commit: updated refs/heads/master to 24818af

Posted by re...@apache.org.
CLOUDSTACK-9222 Prevent cloud.log.1 filling up the disk

Delay Compress results in more space usage than needed. Since we have copy truncate we don't need it.


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

Branch: refs/heads/master
Commit: 867be4145db382d67945a3b1ff05c2a4816b0e64
Parents: 456d854
Author: Remi Bergsma <gi...@remi.nl>
Authored: Mon Jan 11 21:09:08 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Mon Jan 11 21:09:08 2016 +0100

----------------------------------------------------------------------
 systemvm/patches/debian/config/etc/logrotate.d/cloud | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/867be414/systemvm/patches/debian/config/etc/logrotate.d/cloud
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/logrotate.d/cloud b/systemvm/patches/debian/config/etc/logrotate.d/cloud
index b3a6a6d..420fce2 100644
--- a/systemvm/patches/debian/config/etc/logrotate.d/cloud
+++ b/systemvm/patches/debian/config/etc/logrotate.d/cloud
@@ -21,7 +21,6 @@
         missingok
         notifempty
         compress
-        delaycompress
         # CLOUDSTACK-9155: We cannot tell the processes that are writing to this
         # file to use the new inode, so instead we copy the original file, truncate
         # it and keep the same inode.


[6/6] git commit: updated refs/heads/master to 24818af

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

* 4.7:
  CLOUDSTACK-9222 Prevent cloud.log.1 filling up the disk
  Add integration test for restartVPC with cleanup, and Private Gateway enabled.
  Nullpointer Exception in NicProfileHelperImpl


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

Branch: refs/heads/master
Commit: 24818af23ac2e6244ac946a668ea8aa00d0d394d
Parents: 75b68c6 4dabd13
Author: Remi Bergsma <gi...@remi.nl>
Authored: Sat Jan 16 20:25:29 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Sat Jan 16 20:25:29 2016 +0100

----------------------------------------------------------------------
 .../network/router/NicProfileHelperImpl.java    |  7 +++-
 .../patches/debian/config/etc/logrotate.d/cloud |  1 -
 test/integration/smoke/test_privategw_acl.py    | 34 ++++++++++++++++++--
 3 files changed, 38 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[4/6] git commit: updated refs/heads/master to 24818af

Posted by re...@apache.org.
Merge pull request #1329 from remibergsma/delay_compress_fix

CLOUDSTACK-9222 Prevent cloud.log.1 filling up the diskDelay Compress results in more space usage than needed. Since we have copy truncate we don't need it.

* pr/1329:
  CLOUDSTACK-9222 Prevent cloud.log.1 filling up the disk

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/c13c5540
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c13c5540
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c13c5540

Branch: refs/heads/master
Commit: c13c5540b0c63ea82e8451402ab71d45c81ddbd8
Parents: 5fdc77e 867be41
Author: Remi Bergsma <gi...@remi.nl>
Authored: Sat Jan 16 20:13:48 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Sat Jan 16 20:13:49 2016 +0100

----------------------------------------------------------------------
 systemvm/patches/debian/config/etc/logrotate.d/cloud | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------



[5/6] git commit: updated refs/heads/master to 24818af

Posted by re...@apache.org.
Merge pull request #1328 from borisroman/nullpointer_nicprofilehelperimpl

NicProfileHelperImpl NullpointerException when ipVO is nullWhen a VPC has a private gateway, and one would like to restart the VPC with **cleanup** it would fail.

This PR adds a NullPointer check and verifies it with an integration test.

```
test_01_vpc_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_01_vpc_privategw_acl | Status : SUCCESS ===
ok
test_02_vpc_privategw_static_routes (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_02_vpc_privategw_static_routes | Status : SUCCESS ===
ok
test_03_vpc_privategw_restart_vpc_cleanup (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_03_vpc_privategw_restart_vpc_cleanup | Status : SUCCESS ===
ok
test_04_rvpc_privategw_static_routes (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_04_rvpc_privategw_static_routes | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 4 tests in 2945.055s

OK
```

* pr/1328:
  Add integration test for restartVPC with cleanup, and Private Gateway enabled.
  Nullpointer Exception in NicProfileHelperImpl

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/4dabd131
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4dabd131
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4dabd131

Branch: refs/heads/master
Commit: 4dabd1311c580507fee154d5e791f4908976e4f6
Parents: c13c554 de11b73
Author: Remi Bergsma <gi...@remi.nl>
Authored: Sat Jan 16 20:15:51 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Sat Jan 16 20:15:52 2016 +0100

----------------------------------------------------------------------
 .../network/router/NicProfileHelperImpl.java    |  7 +++-
 test/integration/smoke/test_privategw_acl.py    | 34 ++++++++++++++++++--
 2 files changed, 38 insertions(+), 3 deletions(-)
----------------------------------------------------------------------