mirror of https://github.com/apache/cloudstack.git
Fixed vpc private gateway backend issues
This commit is contained in:
parent
25b1c037d6
commit
d4f167032b
|
|
@ -559,6 +559,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
public ExecutionResult executeInVR(String routerIP, String script, String args, int timeout) {
|
||||
Pair<Boolean, String> result;
|
||||
try {
|
||||
s_logger.debug("Executing command in VR: /opt/cloud/bin/router_proxy.sh " + script + " " + routerIP + " " + args);
|
||||
result = SshHelper.sshExecute(_host.ip, 22, _username, null, _password.peek(), "/opt/cloud/bin/router_proxy.sh " + script + " " + routerIP + " " + args,
|
||||
60000, 60000, timeout * 1000);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -1652,10 +1652,14 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
|
|||
|
||||
boolean success = true;
|
||||
try {
|
||||
List<Provider> providersToImplement = getVpcProviders(vo.getVpcId());
|
||||
|
||||
PrivateGateway gateway = getVpcPrivateGateway(gatewayId);
|
||||
for (VpcProvider provider : getVpcElements()) {
|
||||
if (!provider.createPrivateGateway(gateway)) {
|
||||
success = false;
|
||||
if (providersToImplement.contains(provider.getProvider())) {
|
||||
if (!provider.createPrivateGateway(gateway)) {
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (success) {
|
||||
|
|
@ -1714,17 +1718,20 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
|
|||
});
|
||||
|
||||
//1) delete the gateway on the backend
|
||||
List<Provider> providersToImplement = getVpcProviders(gatewayVO.getVpcId());
|
||||
PrivateGateway gateway = getVpcPrivateGateway(gatewayId);
|
||||
for (VpcProvider provider : getVpcElements()) {
|
||||
if (provider.deletePrivateGateway(gateway)) {
|
||||
s_logger.debug("Private gateway " + gateway + " was applied succesfully on the backend");
|
||||
} else {
|
||||
s_logger.warn("Private gateway " + gateway + " failed to apply on the backend");
|
||||
gatewayVO.setState(VpcGateway.State.Ready);
|
||||
_vpcGatewayDao.update(gatewayVO.getId(), gatewayVO);
|
||||
s_logger.debug("Marked gateway " + gatewayVO + " with state " + VpcGateway.State.Ready);
|
||||
if (providersToImplement.contains(provider.getProvider())) {
|
||||
if (provider.deletePrivateGateway(gateway)) {
|
||||
s_logger.debug("Private gateway " + gateway + " was applied succesfully on the backend");
|
||||
} else {
|
||||
s_logger.warn("Private gateway " + gateway + " failed to apply on the backend");
|
||||
gatewayVO.setState(VpcGateway.State.Ready);
|
||||
_vpcGatewayDao.update(gatewayVO.getId(), gatewayVO);
|
||||
s_logger.debug("Marked gateway " + gatewayVO + " with state " + VpcGateway.State.Ready);
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -155,10 +155,12 @@ acl_entry_for_guest_network() {
|
|||
dflag=0
|
||||
gflag=0
|
||||
aflag=0
|
||||
mflag=0
|
||||
rules=""
|
||||
rules_list=""
|
||||
dev=""
|
||||
while getopts 'd:a:' OPTION
|
||||
mac=""
|
||||
while getopts 'd:a:M:' OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
d) dflag=1
|
||||
|
|
@ -167,6 +169,9 @@ do
|
|||
a) aflag=1
|
||||
rules="$OPTARG"
|
||||
;;
|
||||
M) mflag=1
|
||||
mac="$OPTARG"
|
||||
;;
|
||||
?) usage
|
||||
unlock_exit 2 $lock $locked
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in New Issue