-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
I was having an issue where the action appeared to complete successfully,
but nothing was reachable.
On close inspection I saw RTNETLINK answers: File exists / Linux route add command failed in the logs:
Tue Dec 28 01:36:27 2021 ROUTE_GATEWAY 10.1.0.1/255.255.0.0 IFACE=eth0 HWADDR=00:0d:3a:c3:be:d8
[...]
Tue Dec 28 01:36:27 2021 /sbin/ip route add 10.1.0.0/16 via 10.2.128.1
RTNETLINK answers: File exists
Tue Dec 28 01:36:27 2021 ERROR: Linux route add command failed: external program exited with error status: 2
[...]
VPN connected successfully. Daemon PID: 2665
I figured (via netstat -rn) that I was just unlucky that the hosted runners have a conflicting route:
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.1.0.1 0.0.0.0 UG 0 0 0 eth0
10.1.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
168.63.129.16 10.1.0.1 255.255.255.255 UGH 0 0 0 eth0
169.254.169.254 10.1.0.1 255.255.255.255 UGH 0 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
I'm not sure what that route is for, but with this workaround β¬οΈ I was able to get it working π«
- name: Delete conflicting route
run: sudo route del -net 10.1.0.0 gw 0.0.0.0 netmask 255.255.0.0 dev eth0
- name: Connect to VPN
uses: "kota65535/github-openvpn-connect-action@v1"
I think there are a few solutions here:
- Easier: Detect the
ERROR: Linux route add command failedand fail the action. - Harder: Detect conflict and automatically
sudo route del.
It would also be nice to know why the runners have that route π€
luisiturrios1kota65535
Metadata
Metadata
Assignees
Labels
No labels