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 2014/09/04 20:12:09 UTC

[1/2] git commit: updated refs/heads/master to 0fa0320

Repository: cloudstack
Updated Branches:
  refs/heads/master cacbc80ab -> 0fa032086


CLOUDSTACK-7418 and CLOUDSTACK-7488 - Fixed LB removal if cert is applied


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

Branch: refs/heads/master
Commit: 18653f6cd6a899c61a51057a717d0027717fd0a5
Parents: 6f7c486
Author: Will Stevens <ws...@cloudops.com>
Authored: Thu Sep 4 13:02:12 2014 -0400
Committer: Will Stevens <ws...@cloudops.com>
Committed: Thu Sep 4 13:02:12 2014 -0400

----------------------------------------------------------------------
 .../com/cloud/network/lb/LoadBalancingRulesManagerImpl.java | 9 +++++++++
 .../org/apache/cloudstack/network/lb/CertServiceImpl.java   | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/18653f6c/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 52233de..a28d108 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -1478,6 +1478,15 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         final LoadBalancerVO lb = _lbDao.findById(loadBalancerId);
         FirewallRule.State backupState = lb.getState();
 
+        // remove any ssl certs associated with this LB rule before trying to delete it.
+        LoadBalancerCertMapVO lbCertMap = _lbCertMapDao.findByLbRuleId(loadBalancerId);
+        if (lbCertMap != null) {
+            boolean removeResult = removeCertFromLoadBalancer(loadBalancerId);
+            if (!removeResult) {
+                throw new CloudRuntimeException("Unable to remove certificate from load balancer rule " + loadBalancerId);
+            }
+        }
+
         List<LoadBalancerVMMapVO> backupMaps = Transaction.execute(new TransactionCallback<List<LoadBalancerVMMapVO>>() {
             @Override
             public List<LoadBalancerVMMapVO> doInTransaction(TransactionStatus status) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/18653f6c/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java b/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
index c2c155d..69fe293 100644
--- a/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
+++ b/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
@@ -279,7 +279,9 @@ public class CertServiceImpl implements CertService {
             List<String> lbIds = new ArrayList<String>();
             for (LoadBalancerCertMapVO mapVO : lbCertMap) {
                 LoadBalancer lb = _entityMgr.findById(LoadBalancerVO.class, mapVO.getLbId());
-                lbIds.add(lb.getUuid());
+                if (lb != null) {
+                    lbIds.add(lb.getUuid());
+                }
             }
             response.setLbIds(lbIds);
         }


[2/2] git commit: updated refs/heads/master to 0fa0320

Posted by sw...@apache.org.
CLOUDSTACK-7418 and CLOUDSTACK-7488 - Fixed LB removal if cert is associated


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

Branch: refs/heads/master
Commit: 0fa032086064fea4255669ce7acb40370cebbf38
Parents: cacbc80 18653f6
Author: Will Stevens <ws...@cloudops.com>
Authored: Thu Sep 4 14:11:21 2014 -0400
Committer: Will Stevens <ws...@cloudops.com>
Committed: Thu Sep 4 14:11:21 2014 -0400

----------------------------------------------------------------------
 .../com/cloud/network/lb/LoadBalancingRulesManagerImpl.java | 9 +++++++++
 .../org/apache/cloudstack/network/lb/CertServiceImpl.java   | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0fa03208/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
----------------------------------------------------------------------