Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions server/src/com/cloud/network/router/NicProfileHelperImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import javax.inject.Inject;

import com.cloud.utils.exception.CloudRuntimeException;
import org.cloud.network.router.deployment.RouterDeploymentDefinition;

import com.cloud.network.IpAddressManager;
Expand All @@ -30,7 +31,6 @@
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.vpc.PrivateIpAddress;
import com.cloud.network.vpc.PrivateIpVO;
import com.cloud.network.vpc.Vpc;
import com.cloud.network.vpc.VpcGateway;
import com.cloud.network.vpc.VpcManager;
import com.cloud.network.vpc.dao.PrivateIpDao;
Expand Down Expand Up @@ -65,9 +65,11 @@ public NicProfile createPrivateNicProfileForGateway(final VpcGateway privateGate
PrivateIpVO ipVO = _privateIpDao.allocateIpAddress(privateNetwork.getDataCenterId(), privateNetwork.getId(), privateGateway.getIp4Address());

final Long vpcId = privateGateway.getVpcId();
final Vpc activeVpc = _vpcMgr.getActiveVpc(vpcId);
if (activeVpc.isRedundant() && ipVO == null) {
if (ipVO == null) {
ipVO = _privateIpDao.findByIpAndVpcId(vpcId, privateGateway.getIp4Address());
if (ipVO == null) {
throw new CloudRuntimeException("cannot find IP address " + privateGateway.getIp4Address() + " to reuse for private gateway on vpc (id==" + vpcId + ")");
}
}

Nic privateNic = null;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/smoke/test_privategw_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def check_pvt_gw_connectivity(self, virtual_machine, public_ip, vms_ips):
succeeded_pings = 0
minimum_vms_to_pass = 2
for vm_ip in vms_ips:
ssh_command = "ping -c 5 %s" % vm_ip
ssh_command = "ping -c 10 %s" % vm_ip

# Should be able to SSH VM
packet_loss = 100
Expand Down
2 changes: 1 addition & 1 deletion test/integration/smoke/test_vpc_redundant.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def do_vpc_test(self, expectFail):
def do_default_routes_test(self):
for o in self.networks:
for vmObj in o.get_vms():
ssh_command = "ping -c 3 8.8.8.8"
ssh_command = "ping -c 10 8.8.8.8"

# Should be able to SSH VM
packet_loss = 100
Expand Down
2 changes: 1 addition & 1 deletion test/integration/smoke/test_vpc_router_nics.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def check_ssh_into_vm(self):
def do_default_routes_test(self):
for o in self.networks:
for vmObj in o.get_vms():
ssh_command = "ping -c 5 8.8.8.8"
ssh_command = "ping -c 10 8.8.8.8"

# Should be able to SSH VM
packet_loss = 100
Expand Down