actions/runner-images

IPv6 on GitHub-hosted runners

BrightRan opened this issue ยท 29 comments

This issue is transferred from here.

In this ticket, the user is trying to reach the IPv6 address of Google by running the command "curl -6 https://www.google.com" on the GitHub-hosted Ubuntu runner, but it always failed to connect and returned the message "Couldn't connect to server".
The command "curl https://www.google.com" or "curl -4 https://www.google.com" can work fine to reach the IPv4 address.

I also tested directly ping the IPv6 address of Google via the command "ping6 ipv6.google.com", it also failed to connect and returned the message "connect: Network is unreachable".

To check whether the current Linux kernel supports IPv6 via the command,

[ -f /proc/net/if_inet6 ] && echo 'IPv6 ready system!' || echo 'No IPv6 support found! Compile the kernel!!'

It returns "IPv6 ready system!", looks like IPv6 is supported.
Then to check whether the IPv6 module has loaded,

lsmod | grep -qw ipv6 && echo "IPv6 kernel driver loaded and configured." || echo "IPv6 not configured and/or driver loaded on the system."

It returns "IPv6 not configured and/or driver loaded on the system.", looks like the IPv6 module is not loaded.
Load the IPv6 module and check again.

modprobe ipv6
lsmod | grep -qw ipv6 && echo "IPv6 kernel driver loaded and configured." || echo "IPv6 not configured and/or driver loaded on the system."

The returned result still shows that the IPv6 module is not loaded. Looks like this should be the reason for failed to reach the IPv6 address.

Why it can't load the IPv6 module on the GitHub-hosted runner? Whether this is an expected behavior for some limitations set on the hosted runners?

@BrightRan looks like the images itself are ok.
@alepauly do we have ipv6 configured on the environment side?

According to the Docker documentation the images would still need to enable IPv6 for Docker containers, even if the VMs start to support it.

Unfortunately we can't support this at this time due to infrastructure constraints.

Unfortunately we can't support this at this time due to infrastructure constraints.

Is it in the roadmap? I found no opening issues on IPv6 support. Thanks.

GitHub IP address list now has IPv6 address for GitHub Actions.
https://api.github.com/meta

As of a week ago, I could not get IPv6 working in GitHub Actions but let's hope them listing those address's means they are about to release support for it.

Tested today.
Under both ubuntu-latest and ubuntu-20.04:

curl -vv --ipv6 "[2607:f8b0:4002:c03::93]:80"

* Rebuilt URL to: [2607:f8b0:4002:c03::93]:80/
*   Trying 2607:f8b0:4002:c03::93...
* TCP_NODELAY set
* Immediate connect fail for 2607:f8b0:4002:c03::93: Network is unreachable
* Closing connection 0
curl: (7) Couldn't connect to server

ip route sh

default via 10.1.0.1 dev eth0 proto dhcp src 10.1.0.4 metric 100 
10.1.0.0/16 dev eth0 proto kernel scope link src 10.1.0.4 
168.63.129.16 via 10.1.0.1 dev eth0 proto dhcp src 10.1.0.4 metric 100 
169.254.169.254 via 10.1.0.1 dev eth0 proto dhcp src 10.1.0.4 metric 100 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 

ip addr sh

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0d:3a:c6:7b:12 brd ff:ff:ff:ff:ff:ff
    inet 10.1.0.4/16 brd 10.1.255.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20d:3aff:fec6:7b12/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:79:06:ee:ce brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

No IPv6 routes so far.

Is there any way to get only the IPv4 address of the domain name at the VM level?

cross commented

Unfortunately we can't support this at this time due to infrastructure constraints.

@alepauly This wontfix is well over a year old. Is there any update on this, and can there be a plan to allow for testing IPv6 functionality in projects? This just burned a couple days trying to figure out why chia-blockchain tests were failing, and not supporting IPv6 or half-supporting IPv6 seems unusual in this day and age.

@alepauly Time to reopen this! it is 2022 IPv6 is a requirement.
Legacy-v4 might live for a long time (to long) but you can't ignore v6!

Almost the end of January 2022 ... still no IPv6?

XenGi commented

I just found out about the non-support for the current Internet Protocol that is now nearly 25 years old.
Github, this is really embarrassing. There really is no excuse to not support that for years. Please get your shit together. Pardon my french..

Summer 2022 and still no IPv6 support. Unacceptable.

XenGi commented

@alepauly I don't know why you closed this ticket in the first place but the demand for IPv6 is just getting higher. Do you see any chance of this ever getting fixed or should we all just switch to Gitlab CI or go back to Travis CI.

Any updates on this?

Unfortunately we can't support this at this time due to infrastructure constraints.

So Github is not able to adapt it's infrastructure in over 2 years. Wow..

Its just IPv6, its not even like they need to change their BGP peers or something.
Same with Azure, they still don't provide IPv6 by default with their services.

So AWS is nearly done migration all their services to IPv6. It is even cheaper to use them because you don't have to pay for the NAT Gateway anymore. Yet Microsoft/Github is still refusing to adapt to 27 year old technology.

Why would anyone trust these guys with anything IT related? They clearly live in the past..

Maybe, just maybe there is a little bit of hope on this moving forward. https://github.com/orgs/community/discussions/10539#discussioncomment-3917345

2023 ping - any chance to get runners able to do ipv6? I need it for testing v6 code

For others who might know a workaround: is there a v6 test env easily accessible/compatible with github action syntax?

XenGi commented

For others who might know a workaround: is there a v6 test env easily accessible/compatible with github action syntax?

There is always Gitlab. It's better anyway imho. They sadly also don't have IPv6 in their hosted runners but at least you can set it up in your own runners.

For others who might know a workaround: is there a v6 test env easily accessible/compatible with github action syntax?

There is always Gitlab. It's better anyway imho. They sadly also don't have IPv6 in their hosted runners but at least you can set it up in your own runners.

I ended up moving some projects to GitLab and now we are able to perform the required testing with IPv6.

XenGi commented

Just a friendly reminder that 3 years have passed now since this issue was opened and Github still doesn't support the current protocol of the internet which is now nearly 28 years old. I guess this doesn't require any further comment...

Sad!

w8fyz commented

Please GitHub ๐Ÿ™

~~I'm getting "Error: Connection refused" in our tests ONLY if localhost resolves to ::1 instead of 127.0.0.1. At least, out of the 10+ times I saw logs related to this, I've only ever seen it fail on ::.

Using ubuntu-20.04 for environment image~~

Okay, never mind, issue also appears when forcing ipv4 via specifying 127.0.0.1

Hi guys, I was trying to add integration test on Hurl a CLI HTTP client based on libcurl.

What does surprise me is that I've been able to make a GET request using curl and ipv6 from a GitHub-hosted macOS runner:

curl on macOS is available under:

  • /usr/bin/curl 8.1.2
  • /usr/local/opt/curl/bin/curl 8.3.0

Both binary have IPv6 feature enabled but only curl 8.3.0 is able to GET https://google.com with --ipv6 on GitHub macOS runners.

$ /usr/local/opt/curl/bin/curl --version
curl 8.3.0 (x86_64-apple-darwin21.6.0) libcurl/8.3.0 (SecureTransport) OpenSSL/3.1.2 zlib/1.2.11 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libssh2/1.11.0 nghttp2/1.56.0 librtmp/2.3 OpenLDAP/2.6.6
Release-Date: 2023-09-13
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
$ /usr/bin/curl --version
curl 8.1.2 (x86_64-apple-darwin21.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.45.1
Release-Date: 2023-05-30
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets

And test with --ipv6 against google.com:

$/usr/local/opt/curl/bin/curl --ipv6 --verbose https://google.com/
...
Connected to google.com (::ffff:142.250.115.101) port 443
...
$/usr/bin/curl --ipv6 --verbose https://google.com/
curl: (7) Couldn't connect to server

So, it seems there is kind of IPv6 support inside GitHub infra. I'm surprised to see that between curl 8.1.2 and curl 8.3.0 there is a difference of usage with --ipv6 option but I can't explain it.

You'll note however, that's not really IPv6. It's an IPv4-mapped address. If it were really IPv6, it would look like this, from my desktop Macbook:

$ curl -V
curl 8.1.2 (x86_64-apple-darwin23.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.55.1
[...]
$ curl --ipv6 --verbose https://google.com/
*   Trying [2607:f8b0:4002:c2c::65]:443...
* Connected to google.com (2607:f8b0:4002:c2c::65) port 443 (#0)
[...]
image use this
  jobs:
    ipv6:
      runs-on: ubuntu-latest
      steps:
        - name: Setup WARP
          uses: fscarmen/warp-on-actions@v2
        - name: ipv6
          run: |
            curl -m 9 --ipv6 --verbose https://google.com
            curl -m 9 -6 https://ifconfig.co