Flent-users discussion archives
 help / color / mirror / Atom feed
* [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241)
@ 2021-09-30 14:09 j-breyer
  2021-09-30 14:27 ` [Flent-users] " Toke Høiland-Jørgensen
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: j-breyer @ 2021-09-30 14:09 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed

[-- Attachment #1: Type: text/plain, Size: 2199 bytes --]

In my current setup, I have two hosts defined in `/etc/hosts`, both capable of communicating via IPv4 and IPv6. Configuration:
`mn.h1` uses `10.0.6.1` and `a::601`
`mn.h2` uses `10.0.14.2` and `a::e02`

On `mn.h2`, netserver is listening on both addresses, and `irtt server` is started listening on all addresses.

Running `sudo flent rrul -6 -p all_scaled --local-bind mn.h1 -l 60 -H mn.h2 -o rrul6.pdf -v`
yields different results as follows:

Both hosts have their IPv4 enabled:
verbose output of flent is Error- and warning-free, however, the irtt server on mn.h2 shows:
```
[10.0.6.1:56747] [OpenClose] open-close connection
[10.0.6.1:34502] [NewConn] new connection, token=e6582ec0dc3b7161
[10.0.6.1:34942] [NewConn] new connection, token=5898db5f137d0b66
[10.0.6.1:42243] [NewConn] new connection, token=c412d2bb05eefd1d
```
Indicating that irtt is using the IPv4 despite the `-6` argument.

Removing the IPv4 resolution for `mn.h1`:
(partial) verbose output of flent:
```
which: Found irtt executable at /usr/bin/irtt
UDP RTT test: Cannot use irtt runner (Irtt connection check failed: Error: dial udp4 [a::601]:0->10.0.14.2:2112: address a::601: non-IPv4 address
). Using netperf UDP_RR
```

Removing the IPv4 from `mn.h2`, but keeping it on `mn.h1`:
(partial) verbose output of flent:
```
which: Found irtt executable at /usr/bin/irtt
UDP RTT test: Cannot use irtt runner (Irtt connection check failed: Error: dial udp6 10.0.6.1:0->[a::e02]:2112: bind: invalid argument
). Using netperf UDP_RR
```

Removing both IPv4 entries for `mn.h1` and `mn.h2`:
Flent verbose without errors, irtt server shows:
```
[[a::601]:55765] [OpenClose] open-close connection
[[a::601]:37744] [NewConn] new connection, token=df67b3a6d5892659
[[a::601]:38572] [NewConn] new connection, token=8326d482ae57f712
[[a::601]:55775] [NewConn] new connection, token=366ddbe19c620d6f
```

which is what I would expect every time, since the `-6` argument was passed.

I did not try this on too many tests, but it appears at least for `rrul` and `rrul_cs8`


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/241

[-- Attachment #2: Type: text/html, Size: 3764 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Flent-users] Re: [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241)
  2021-09-30 14:09 [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241) j-breyer
@ 2021-09-30 14:27 ` Toke Høiland-Jørgensen
  2021-09-30 15:15 ` Pete Heist
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2021-09-30 14:27 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]


Hmm, could you please post a full debug log (from --log-file), and the
output of this command (with both address families defined in your /etc/hosts):

`python -c 'import socket; print(socket.getaddrinfo("mn.h1", None, socket.AF_UNSPEC, socket.SOCK_STREAM))'`


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/241#issuecomment-931373985

[-- Attachment #2: Type: text/html, Size: 1737 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Flent-users] Re: [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241)
  2021-09-30 14:09 [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241) j-breyer
  2021-09-30 14:27 ` [Flent-users] " Toke Høiland-Jørgensen
@ 2021-09-30 15:15 ` Pete Heist
  2021-10-01  9:07 ` j-breyer
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Pete Heist @ 2021-09-30 15:15 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed

[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]

Fwiw I tried irtt with a similar setup, using hosts defined in /etc/hosts with both IPv4 and IPv6 addresses:

10.72.0.230	apu2a_6
a::601		apu2a_6
10.72.0.233	apu2c_6
a::603		apu2c_6

All of the following worked as expected:
```
sysadmin@apu2a:~$ irtt client -n apu2c_6
[Connecting] connecting to apu2c_6
[10.72.0.233:2112] [Connected] connection established
[10.72.0.233:2112] [NoTest] skipping test at user request
sysadmin@apu2a:~$ irtt client -6 -n apu2c_6
[Connecting] connecting to apu2c_6
[[a::603]:2112] [Connected] connection established
[[a::603]:2112] [NoTest] skipping test at user request
sysadmin@apu2a:~$ irtt client --local=apu2a_6 -n apu2c_6
[Connecting] connecting to apu2c_6
[10.72.0.233:2112] [Connected] connection established
[10.72.0.233:2112] [NoTest] skipping test at user request
sysadmin@apu2a:~$ irtt client --local=apu2a_6 -6 -n apu2c_6
[Connecting] connecting to apu2c_6
[[a::603]:2112] [Connected] connection established
[[a::603]:2112] [NoTest] skipping test at user request
```

Do those commands work for you outside of flent from your mn.h1 to mn.h2? I also wonder what happens if you don't use `--local-bind`.

Lastly, I realized we'll have to bracket the local bind address as well if it's an IPv6 literal, but that's not affecting you here because you're using a hostname.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/241#issuecomment-931415810

[-- Attachment #2: Type: text/html, Size: 2818 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Flent-users] Re: [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241)
  2021-09-30 14:09 [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241) j-breyer
  2021-09-30 14:27 ` [Flent-users] " Toke Høiland-Jørgensen
  2021-09-30 15:15 ` Pete Heist
@ 2021-10-01  9:07 ` j-breyer
  2021-10-01 12:06 ` Toke Høiland-Jørgensen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: j-breyer @ 2021-10-01  9:07 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed

[-- Attachment #1: Type: text/plain, Size: 2724 bytes --]

>Hmm, could you please post a full debug log (from --log-file),

Running the exact same command as posted with `--log-file` appended and scrolling a bit through the file, I found the following lines interesting:
```
2021-10-01 08:51:02,954 [flent.runners] DEBUG: Forked /usr/bin/netperf as pid 415309
2021-10-01 08:51:02,956 [flent.runners] DEBUG: TCP download EF: Starting watchdog with timeout 75
2021-10-01 08:51:02,957 [flent.runners] DEBUG: Started TimerRunner idx 9 ('Watchdog [TCP download EF]')
2021-10-01 08:51:02,958 [flent.runners] DEBUG: Started NetperfDemoRunner idx 9 ('TCP download EF')
2021-10-01 08:51:02,959 [flent.runners] DEBUG: Forking to run command /usr/bin/irtt client -o - --fill=rand -Q -d 70s -i 0.2s  --dscp=0xb8 --local=mn.h1  mn.h2
2021-10-01 08:51:02,963 [flent.runners] DEBUG: Forked /usr/bin/irtt as pid 415312
2021-10-01 08:51:02,967 [flent.runners] DEBUG: Started IrttRunner idx 13 ('Ping (ms) UDP EF :: child 0')
2021-10-01 08:51:02,968 [flent.runners] DEBUG: Forking to run command /usr/bin/irtt client -o - --fill=rand -Q -d 70s -i 0.2s  --dscp=0x20 --local=mn.h1  mn.h2
2021-10-01 08:51:02,972 [flent.runners] DEBUG: Forked /usr/bin/irtt as pid 415314
2021-10-01 08:51:02,975 [flent.runners] DEBUG: Started IrttRunner idx 14 ('Ping (ms) UDP BK :: child 0')
2021-10-01 08:51:02,976 [flent.runners] DEBUG: Forking to run command /usr/bin/irtt client -o - --fill=rand -Q -d 70s -i 0.2s   --local=mn.h1  mn.h2
2021-10-01 08:51:02,980 [flent.runners] DEBUG: Forked /usr/bin/irtt as pid 415323
2021-10-01 08:51:02,983 [flent.runners] DEBUG: Started IrttRunner idx 15 ('Ping (ms) UDP BE :: child 0')
2021-10-01 08:51:02,983 [flent.runners] DEBUG: Forking to run command /usr/bin/fping6  -D -p 200 -c 350 -t 140000  -I mn.h1 mn.h2
```
It seems like the `-6` argument is not passed to the irtt command. See the full log file attached:
[rrul-2021-10-01T085102.606290.log](https://github.com/tohojo/flent/files/7265683/rrul-2021-10-01T085102.606290.log)

>output of this command (with both address families defined in your /etc/hosts):

`[(10, 1, 6, '', ('a::601', 0, 0, 0)), (2, 1, 6, '', ('10.0.6.1', 0))]`

>Do those commands work for you outside of flent from your mn.h1 to mn.h2?

Yes, with no problems at all, getting the respective same output as posted by you.

>I also wonder what happens if you don't use --local-bind.

irtt connection no longer fails, as there's no mismatch in address families. However, as long as `mn.h2` has an IPv4 defined, it uses IPv4 to connect, disregarding the `-6` param

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/241#issuecomment-932056338

[-- Attachment #2: Type: text/html, Size: 4221 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Flent-users] Re: [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241)
  2021-09-30 14:09 [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241) j-breyer
                   ` (2 preceding siblings ...)
  2021-10-01  9:07 ` j-breyer
@ 2021-10-01 12:06 ` Toke Høiland-Jørgensen
  2021-10-01 12:19 ` Toke Høiland-Jørgensen
  2021-10-01 13:01 ` Pete Heist
  5 siblings, 0 replies; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2021-10-01 12:06 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

j-breyer ***@***.***> writes:

>>I also wonder what happens if you don't use --local-bind.
>
> irtt connection no longer fails, as there's no mismatch in address
> families. However, as long as `mn.h2` has an IPv4 defined, it uses
> IPv4 to connect, disregarding the `-6` param

Hmm, I guess maybe the Go runtime has its own idea as to what
constitutes the right way to lookup a hostname, then? I'll add the -6
arg for irtt, then...


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/241#issuecomment-932171051

[-- Attachment #2: Type: text/html, Size: 1948 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Flent-users] Re: [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241)
  2021-09-30 14:09 [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241) j-breyer
                   ` (3 preceding siblings ...)
  2021-10-01 12:06 ` Toke Høiland-Jørgensen
@ 2021-10-01 12:19 ` Toke Høiland-Jørgensen
  2021-10-01 13:01 ` Pete Heist
  5 siblings, 0 replies; 7+ messages in thread
From: Toke Høiland-Jørgensen @ 2021-10-01 12:19 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

Closed #241 via 76c96e66f1dfb75bfa2c90f8aea414b91a911b68.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/241#event-5394030111

[-- Attachment #2: Type: text/html, Size: 2064 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Flent-users] Re: [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241)
  2021-09-30 14:09 [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241) j-breyer
                   ` (4 preceding siblings ...)
  2021-10-01 12:19 ` Toke Høiland-Jørgensen
@ 2021-10-01 13:01 ` Pete Heist
  5 siblings, 0 replies; 7+ messages in thread
From: Pete Heist @ 2021-10-01 13:01 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

I never noticed this, actually. The standard net.Dial(), for "historical reasons", just prefers IPv4 instead of relying on the local resolver. This prompted a "Wow, okay" from B. Fitzpatrick. (https://github.com/golang/go/issues/20911).

It looks like one can get around that by using the Lookup* methods first, but that is a hassle that will require some experimentation to make sure the behavior is right, e.g. with and without cgo and for unspecified listener addresses etc, for something that should ideally "just work".

Anyway, thanks for working around that. :/

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/241#issuecomment-932205848

[-- Attachment #2: Type: text/html, Size: 2323 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-01 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 14:09 [Flent-users] [tohojo/flent] -6 Option ignored for hosts with IPv4 and IPv6 address (#241) j-breyer
2021-09-30 14:27 ` [Flent-users] " Toke Høiland-Jørgensen
2021-09-30 15:15 ` Pete Heist
2021-10-01  9:07 ` j-breyer
2021-10-01 12:06 ` Toke Høiland-Jørgensen
2021-10-01 12:19 ` Toke Høiland-Jørgensen
2021-10-01 13:01 ` Pete Heist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox