Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6-Only Hosts Fail to Build #10711

Closed
Tracked by #84
TheBlueMatt opened this issue May 28, 2022 · 10 comments
Closed
Tracked by #84

IPv6-Only Hosts Fail to Build #10711

TheBlueMatt opened this issue May 28, 2022 · 10 comments
Labels
A-networking Area: networking issues, curl, etc. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

Comments

@TheBlueMatt
Copy link

Problem

IPv6-only hosts are becoming more and more common with IPv4 cost skyrocketing. In some cases (eg Vultr's IPv6-only offerings) there's not any CG-NAT either, so cargo fails to run at all because the first thing it does is try to clone from github.com.

Proposed Solution

Look at providing a CF-wrapped git-clone domain or look at alternative hosting providers like gitlab.

Notes

No response

@TheBlueMatt TheBlueMatt added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label May 28, 2022
@est31
Copy link
Member

est31 commented May 30, 2022

Earlier thread: https://internals.rust-lang.org/t/unable-to-build-over-ipv6-only-requires-ipv4/9673

Even earlier: https://internals.rust-lang.org/t/ipv6-reachability-of-rust-websites/4379

@ehuss ehuss added A-networking Area: networking issues, curl, etc. S-blocked labels May 31, 2022
@jonhoo
Copy link
Contributor

jonhoo commented Nov 9, 2022

I wonder if #9069 might help avoid this problem 🤔

@arlosi
Copy link
Contributor

arlosi commented Nov 28, 2022

I wonder if #9069 might help avoid this problem 🤔

Yes, index.crates.io is available on IPv6, so it should work.

@weihanglo weihanglo added S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix and removed S-blocked labels Apr 18, 2023
@weihanglo
Copy link
Member

crates.io is still on Heroku. It is the biggest blocker so far I guess.

@maflcko
Copy link

maflcko commented Aug 27, 2023

@weihanglo
Copy link
Member

Hi @MarcoFalke. If I recall correctly, crates.io web API and download link redirections are served on Heroku, and Heroku doesn't support IPv6. To move on, we should consult crates.io team. Perhaps file an issue against rust-lang/crates.io repository or ask t-crates-io on Zulip.

BTW, I found a Zulip topic about this. Maybe someone could ask there to verify if this issue is still relevant.

@maflcko
Copy link

maflcko commented Aug 27, 2023

@weihanglo Are you sure? Locally I do get a reply on an ipv6-only box:

dig AAAA index.crates.io | grep AAAA
; <<>> DiG 9.18.17 <<>> AAAA index.crates.io
;index.crates.io.		IN	AAAA
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:5a00:1f:a9f5:69c0:93a1
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:f800:1f:a9f5:69c0:93a1
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:e00:1f:a9f5:69c0:93a1
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:4200:1f:a9f5:69c0:93a1
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:2200:1f:a9f5:69c0:93a1
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:d400:1f:a9f5:69c0:93a1
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:7800:1f:a9f5:69c0:93a1
d16zogpfyuwazr.cloudfront.net. 60 IN	AAAA	2600:9000:21f3:7e00:1f:a9f5:69c0:93a1

Also, cargo seems to be working locally.

@weihanglo
Copy link
Member

weihanglo commented Aug 27, 2023

If I recall correctly…
To move on, we should consult crates.io team…

No. I am not sure. That's why I suggest asking crates-io team. I am not too familiar with the infra there.

Also, cargo seems to be working locally.

That sounds great!! If you could help us verify and check with the crates-io team, it would be even better :)

@paolobarbolini
Copy link

paolobarbolini commented Aug 27, 2023

I've tried calling endpoints from a dualstack host, forcing curl to use IPv6 via -6, and they all seem to work. GitHub on the other hand still doesn't support it, so if for any reason you need to clone crates.io-index it won't work on an IPv6-only host.

# cargo related operations
curl -I https://crates.io/api/v1/crates/chrono/0.4.26/download -6
curl -I https://static.crates.io/crates/chrono/chrono-0.4.26.crate -6
curl -I https://index.crates.io/ch/ro/chrono -6

# rustup related operations
curl -I https://static.rust-lang.org -6

@arlosi
Copy link
Contributor

arlosi commented Aug 27, 2023

I disabled IPv4 and successfully use rustup to install stable and build cargo. That tests:

  • static.rust-lang.org - uses CloudFront / Fastly with v6 enabled
  • static.crates.io - uses CloudFront / Fastly with v6 enabled
  • crates.io - uses CloudFront CDN with v6 enabled
  • index.crates.io - uses CloudFront with v6 enabled

Even though Heroku doesn't support IPv6, the CloudFront CDN in front of it does. GitHub still does not support v6, so it's necessary to use cargo 1.70+ to get sparse index by default.

@arlosi arlosi closed this as completed Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Area: networking issues, curl, etc. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
Projects
None yet
Development

No branches or pull requests

8 participants