mirror of
https://github.com/apache/cloudstack
synced 2026-08-30 17:01:56 +00:00
CLOUDSTACK-5552 fixed private gateway clean up in DB when create failed
This commit is contained in:
parent
914bd1230c
commit
3fe9426824
@ -363,6 +363,9 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements Vpc
|
||||
s_logger.debug ("Failed to apply network acl id "+ gateway.getNetworkACLId() + " on gateway ");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
s_logger.debug ("Failed to setup private gateway "+ gateway);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -425,10 +428,15 @@ public class VpcVirtualRouterElement extends VirtualRouterElement implements Vpc
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!_vpcRouterMgr.applyNetworkACLs(config, rules, routers, false)) {
|
||||
throw new CloudRuntimeException("Failed to apply network acl rules in network " + config.getId());
|
||||
} else {
|
||||
return true;
|
||||
try {
|
||||
if (!_vpcRouterMgr.applyNetworkACLs(config, rules, routers, false)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.debug("Failed to apply network acl in network " + config.getId());
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
|
||||
@ -381,9 +381,13 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
|
||||
throw new CloudRuntimeException("Failed to initialize vpc elements");
|
||||
}
|
||||
|
||||
for (VpcProvider provider: vpcElements){
|
||||
return provider.applyACLItemsToPrivateGw(gateway, rules);
|
||||
try {
|
||||
for (VpcProvider provider: vpcElements){
|
||||
return provider.applyACLItemsToPrivateGw(gateway, rules);
|
||||
}
|
||||
} catch(ResourceUnavailableException e) {
|
||||
s_logger.debug("Failed to apply acl to private gateway " + gateway);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user