CLOUDSTACK-2681: Suppress failed to apply port forwarding rule error when rollback

This commit is contained in:
Sheng Yang 2013-05-24 17:08:31 -07:00
parent a1437ae82e
commit e3a3286758

View File

@ -198,7 +198,11 @@ public class CreatePortForwardingRuleCmd extends BaseAsyncCreateCmd implements P
_firewallService.revokeRelatedFirewallRule(getEntityId(), true); _firewallService.revokeRelatedFirewallRule(getEntityId(), true);
} }
try {
_rulesService.revokePortForwardingRule(getEntityId(), true); _rulesService.revokePortForwardingRule(getEntityId(), true);
} catch (Exception ex){
//Ignore e.g. failed to apply rules to device error
}
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to apply port forwarding rule"); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to apply port forwarding rule");
} }