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 support #1537

Closed
imiric opened this issue Jul 8, 2020 · 6 comments
Closed

IPv6 support #1537

imiric opened this issue Jul 8, 2020 · 6 comments
Assignees
Labels
Milestone

Comments

@imiric
Copy link
Contributor

imiric commented Jul 8, 2020

Sparked by this forum question, my tests in a VM lab show that k6 can't connect to an IPv6 address, even though this is natively supported in Go.

Also see related issue #1109.

Environment

  • k6 version: k6 v0.26.2 (2020-03-18T11:45:39+0000/v0.26.2-0-g459da79e, go1.13.8, linux/amd64)
  • OS and version: Linux
  • Docker version and image, if applicable: N/A

Expected Behavior

k6 can connect to and test against an IPv6 address/host.

Actual Behavior

Several errors are shown instead:

  • no such host when trying an IPv6 address in bracket notation because of the port:
    2020-07-08-110340_801x81_scrot
  • connect: invalid argument when trying with a hostname that resolves to an IPv6 address:
    2020-07-08-110945_799x71_scrot

Note that I can nc/curl the remote service OK, so it is accessible from the test VM:
2020-07-08-114049_782x150_scrot

Steps to Reproduce the Problem

  1. Setup 2 VMs connected on the same internal network and assign the NICs IPv6 addresses.
  2. Run an HTTP service (e.g. python -m http.server --bind ::) on one VM and create a simple k6 script on the other:
import http from 'k6/http';

export default function () {
  http.get('http://[fe80::6f02:cf05:1bc:8883]:8000');
}
  1. Run k6 run script.js.

I also tried specifying the NIC as in the nc/curl example ([fe80::6f02:cf05:1bc:8883%enp0s3]), but that fails parsing the URL with invalid URL escape "%!e(MISSING)n", with or without escaping %.

@SebastianStehle
Copy link

This is not exactly the same as my problem.

My case is the problem that when you have a hostname like "localhost" with two addresses (ipv4 and ipv6), k6 tries ipv6 and when it fails it gives up. The default implementation seems to be to try all addresses and to use the first working. Not 100% sure.

@na--
Copy link
Member

na-- commented Jul 8, 2020

hmm yeah, we should also support that, it's called Happy Eyeballs and can be configured via the Dialer.DualStack option.

@na-- na-- modified the milestones: v0.28.0, v0.27.1 Jul 9, 2020
@TobiasEngelbert
Copy link

Great, that this issue is placed in v0.27.1. Do you know when v0.27.1 is planned to be released?

@na--
Copy link
Member

na-- commented Jul 10, 2020

We plan to release v0.27.0 early next week. v0.27.1 means "soon after that", but I can't give you an exact time... I tagged it as v0.27.1 and not as v0.28.0 because we consider this a bug, and a high priority one at that, so we don't need to wait for a full new version to release it.

@imiric imiric self-assigned this Jul 17, 2020
@imiric imiric modified the milestones: v0.27.1, v0.28.0 Jul 21, 2020
@imiric
Copy link
Contributor Author

imiric commented Jul 21, 2020

We decided to push this back to v0.28.0, as part of #1489. Since that PR also introduces a feature, it's not suitable for a patch release. We're planning more frequent releases now, so v0.28.0 will be a smaller release soon after v0.27.1.

If you want just this fix now, it can be compiled from the fix/1537-ipv6 branch.

@na--
Copy link
Member

na-- commented Sep 8, 2020

This was inadvertently resolved by #1489

@na-- na-- closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants