You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ki...@apache.org on 2014/01/02 10:39:06 UTC
git commit: updated refs/heads/master to 619674e
Updated Branches:
refs/heads/master 48c47101a -> 619674e21
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.
Conflicts:
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/619674e2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/619674e2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/619674e2
Branch: refs/heads/master
Commit: 619674e21e9767ed61d9cdbab439dfedf3f292a5
Parents: 48c4710
Author: Kishan Kavala <ki...@cloud.com>
Authored: Thu Jan 2 14:43:03 2014 +0530
Committer: Kishan Kavala <ki...@cloud.com>
Committed: Thu Jan 2 15:08:49 2014 +0530
----------------------------------------------------------------------
.../com/cloud/network/firewall/FirewallManagerImpl.java | 2 ++
.../router/VirtualNetworkApplianceManagerImpl.java | 12 +++---------
2 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/619674e2/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 448abe3..af055fb 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/619674e2/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 8904185..000ed48 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -3525,8 +3525,9 @@ 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());
+ if(!checkRouterVersion(router)){
+ 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 {
@@ -3809,13 +3810,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);