cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject git commit: updated refs/heads/4.3 to b763e49
Date Thu, 02 Jan 2014 09:39:36 GMT
Updated Branches:
  refs/heads/4.3 8f15fc1fc -> b763e4987


CLOUDSTACK-5656: Rules will remain in Revoked state when router upgrade is required. Filtered
revoked rules while listing. Show genreric error since router is not visible to enduser.


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

Branch: refs/heads/4.3
Commit: b763e49873474f5768b674825f48368048778995
Parents: 8f15fc1
Author: Kishan Kavala <kishan@cloud.com>
Authored: Thu Jan 2 14:43:03 2014 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Thu Jan 2 15:09:18 2014 +0530

----------------------------------------------------------------------
 .../com/cloud/network/firewall/FirewallManagerImpl.java   |  2 ++
 .../router/VirtualNetworkApplianceManagerImpl.java        | 10 ++--------
 2 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b763e498/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
index 0a98062..af606bc 100644
--- a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
+++ b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
@@ -284,6 +284,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         sb.and("networkId", sb.entity().getNetworkId(), Op.EQ);
         sb.and("ip", sb.entity().getSourceIpAddressId(), Op.EQ);
         sb.and("purpose", sb.entity().getPurpose(), Op.EQ);
+        sb.and("state", sb.entity().getState(), Op.NEQ);
 
         if (tags != null && !tags.isEmpty()) {
             SearchBuilder<ResourceTagVO> tagSearch = _resourceTagDao.createSearchBuilder();
@@ -324,6 +325,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
 
         sc.setParameters("purpose", Purpose.Firewall);
         sc.setParameters("trafficType", trafficType);
+        sc.setParameters("state", State.Revoke);
 
         Pair<List<FirewallRuleVO>, Integer> result = _firewallDao.searchAndCount(sc,
filter);
         return new Pair<List<? extends FirewallRule>, Integer>(result.first(),
result.second());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b763e498/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index f7ef5d7..47020af 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -3447,7 +3447,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
 
     protected boolean sendCommandsToRouter(final VirtualRouter router, Commands cmds) throws
AgentUnavailableException {
         if(!checkRouterVersion(router)){
-            throw new CloudRuntimeException("Router requires upgrade. Unable to send command
to router:" + router.getId());
+            s_logger.debug("Router requires upgrade. Unable to send command to router:" +
router.getId());
+            throw new CloudRuntimeException("Unable to send command. Upgrade in progress.
Please contact administrator.");
         }
         Answer[] answers = null;
         try {
@@ -3733,13 +3734,6 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
                     continue;
                 }
 
-                if (!checkRouterVersion(router)){
-                    //Rules will be applied after VR is upgraded
-                    s_logger.debug("Router " + router.getInstanceName() + " requires upgrade,
so not sending apply " +
-                            typeString + " commands to the backend");
-                    continue;
-                }
-
                 try {
                     result = applier.execute(network, router);
                     connectedRouters.add(router);


Mime
View raw message