mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5552 fixed private gateway DB clean up on failure
This commit is contained in:
parent
17b696e053
commit
77878299fb
|
|
@ -353,6 +353,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;
|
||||
}
|
||||
|
|
@ -413,10 +416,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;
|
||||
|
|
|
|||
|
|
@ -377,8 +377,12 @@ 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(Exception ex) {
|
||||
s_logger.debug("Failed to apply acl to private gateway " + gateway);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue