Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Install fails when Allowed bastion external access CIDR parameter is set to RFC 1918 CIDR #195

Open
pdiwakarp opened this issue Mar 7, 2023 · 1 comment
Assignees

Comments

@pdiwakarp
Copy link

pdiwakarp commented Mar 7, 2023

We don't have IGW in our environment. When I set Allowed bastion external access CIDR parameter to RFC 1918 CIDR to allow access to bastion host from inside the VPC, GitLab installation is failing with following error message:

2023-03-07 01:41:46,614 P2630 [INFO] ++ aws ec2 describe-addresses --public-ips x.x.x.x --output text --region us-east-1
2023-03-07 01:41:46,614 P2630 [INFO] + resource_id_length=0dc666caff44b9217
2023-03-07 01:41:46,614 P2630 [INFO] + [[ 17 -eq 17 ]]
2023-03-07 01:41:46,614 P2630 [INFO] ++ egrep 'eipalloc-([a-z0-9]{17})' -o
2023-03-07 01:41:46,614 P2630 [INFO] ++ aws ec2 describe-addresses --public-ips x.x.x.x --output text --region us-east-1
2023-03-07 01:41:46,615 P2630 [INFO] + eip_allocation=eipalloc-yyyy
2023-03-07 01:41:46,615 P2630 [INFO] + set +e
2023-03-07 01:41:46,615 P2630 [INFO] + aws ec2 associate-address --instance-id i-yyyy --allocation-id eipalloc-yyyy --region us-east-1
2023-03-07 01:41:46,615 P2630 [INFO]
2023-03-07 01:41:46,615 P2630 [INFO] An error occurred (Gateway.NotAttached) when calling the AssociateAddress operation: Network vpc-0ca5ad6dfffd3849b is not attached to any internet gateway
2023-03-07 01:41:46,615 P2630 [INFO] + rc=254
2023-03-07 01:41:46,615 P2630 [INFO] + set -e
2023-03-07 01:41:46,615 P2630 [INFO] + [[ 254 -ne 0 ]]
2023-03-07 01:41:46,615 P2630 [INFO] + echo 'Unable to associate EIP x.x.x.x. Failure. Exiting'
2023-03-07 01:41:46,615 P2630 [INFO] Unable to associate EIP x.x.x.x. Failure. Exiting
2023-03-07 01:41:46,615 P2630 [INFO] + exit 1
2023-03-07 01:41:46,615 P2630 [INFO] ------------------------------------------------------------
2023-03-07 01:41:46,616 P2630 [ERROR] Exited with error code 1

Install is trying to associate EIP to the bastion host. Is it possible to check if CIDR is RFC 1918, set assign EIP to the bastion node?

FYI, masked instance id, allocation id, and EIP information

@tlindsay42 tlindsay42 self-assigned this Mar 7, 2023
@tlindsay42
Copy link
Member

Thanks @pdiwakarp!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants