mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-19 19:01:42 +00:00
fix(e2e): add explicit IGW default route in run-lb-e2e
After PR #270 the VPC-LR-wide 0.0.0.0/0 -> IGW static route is no longer installed implicitly at attach-internet-gateway. Subnets whose effective route table lacks an internet-bound route get an OVN drop policy at SubnetEgressPriorityDrop (1100), which kills LB target reply traffic before un-DNAT can fire and stalls the LB internal-client probe until job timeout. Add the standard AWS pattern: describe-route-tables -> create-route 0.0.0.0/0 -> IGW. This fires vpc.add-igw-route + vpc.ungate-subnet-egress, removing the drop policy and installing a reroute policy at SubnetEgressPriorityIGW (1000).
This commit is contained in:
@@ -296,6 +296,15 @@ IGW_ID=$(echo "$IGW_OUTPUT" | jq -r '.InternetGateway.InternetGatewayId')
|
||||
$AWS_EC2 attach-internet-gateway --internet-gateway-id "$IGW_ID" --vpc-id "$VPC_ID" || { fail "attach-internet-gateway"; exit 1; }
|
||||
pass "internet gateway: $IGW_ID (attached)"
|
||||
|
||||
echo "Adding default route to IGW..."
|
||||
MAIN_RTB=$($AWS_EC2 describe-route-tables \
|
||||
--filters "Name=vpc-id,Values=$VPC_ID" \
|
||||
--query 'RouteTables[0].RouteTableId' --output text)
|
||||
$AWS_EC2 create-route --route-table-id "$MAIN_RTB" \
|
||||
--destination-cidr-block 0.0.0.0/0 --gateway-id "$IGW_ID" > /dev/null \
|
||||
|| { fail "create-route default -> IGW"; exit 1; }
|
||||
pass "default route: 0.0.0.0/0 -> $IGW_ID"
|
||||
|
||||
echo "Creating subnet..."
|
||||
SUBNET_OUTPUT=$($AWS_EC2 create-subnet --vpc-id "$VPC_ID" --cidr-block 10.200.1.0/24 --output json) || { fail "create-subnet"; exit 1; }
|
||||
SUBNET_ID=$(echo "$SUBNET_OUTPUT" | jq -r '.Subnet.SubnetId')
|
||||
|
||||
Reference in New Issue
Block a user