Bug 1299251 - ipv6 distribution does not honor inet_dist_listen_{min,max}
ipv6 distribution does not honor inet_dist_listen_{min,max}
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: erlang (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
urgent Severity unspecified
: z4
: 7.0 (Kilo)
Assigned To: John Eckersberg
Asaf Hirshberg
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-17 15:51 EST by John Eckersberg
Modified: 2016-02-18 11:10 EST (History)
7 users (show)

See Also:
Fixed In Version: erlang-R16B-03.10min.5.el7ost
Doc Type: Bug Fix
Doc Text:
There are two modules available for TCP erlang distribution: inet_tcp_dist and inet6_tcp_dist. The inet6_tcp_dist module was created by copying the inet_tcp_dist module, and then updating the address family for IPv6 support. The inet_dist_listen_{min,max} options were added to the inet_tcp_dist module after the inet6_tcp_dist module was created from it, but the same change was never applied to the inet6_tcp_dist module. As a result, the inet6_tcp_dist module could not use the inet_dist_listen_{min,max} options, thereby preventing distribution port(s) from being configured to use a static, known range. With this release, distribution modules are abstracted. Both inet and inet6 now share common code to ensure that all available options apply to both IPv4 and IPv6 distributions. This, of course, includes inet_dist_listen_{min,max}. (BZ#1299251)
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 11:10:41 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Eckersberg 2016-01-17 15:51:54 EST
Description of problem:


Version-Release number of selected component (if applicable):
erlang-erts.x86_64 0:R16B-03.10min.4.el7ost

How reproducible:
Always

Steps to Reproduce:
[root@rhel7 ~]# erl -sname test -proto_dist inet6_tcp -inet_dist_listen_min 33333 -inet_dist_listen_max 33333
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
(test@rhel7)1> 
[1]+  Stopped                 erl -sname test -proto_dist inet6_tcp -inet_dist_listen_min 33333 -inet_dist_listen_max 33333
[root@rhel7 ~]# ss -antp | grep beam
ESTAB      0      0                 127.0.0.1:39354            127.0.0.1:4369   users:(("beam",2199,6))
LISTEN     0      5                        :::37794                   :::*      users:(("beam",2199,5))
[root@rhel7 ~]# 


Actual results:
ipv6 distribution port is randomly chosen

Expected results:
ipv6 distribution port should fall between values supplied by inet_dist_listen_{min,max}

Additional info:
https://github.com/erlang/otp/commit/8266a6056ff3b4292d98485665e5444addd689b6
Comment 2 Asaf Hirshberg 2016-02-01 02:55:23 EST
I installed the latest 7.3 puddle with ipv6 and I followed your bug:

1) rpm -qa|grep erlang
erlang-erts-R16B-03.10min.5.el7ost.x86_64
erlang-os_mon-R16B-03.10min.5.el7ost.x86_64
erlang-inets-R16B-03.10min.5.el7ost.x86_64
erlang-snmp-R16B-03.10min.5.el7ost.x86_64
erlang-asn1-R16B-03.10min.5.el7ost.x86_64
erlang-stdlib-R16B-03.10min.5.el7ost.x86_64
erlang-sasl-R16B-03.10min.5.el7ost.x86_64
erlang-syntax_tools-R16B-03.10min.5.el7ost.x86_64
erlang-public_key-R16B-03.10min.5.el7ost.x86_64
erlang-sd_notify-0.1-2.el7ost.x86_64
erlang-crypto-R16B-03.10min.5.el7ost.x86_64
erlang-mnesia-R16B-03.10min.5.el7ost.x86_64
erlang-otp_mibs-R16B-03.10min.5.el7ost.x86_64
erlang-compiler-R16B-03.10min.5.el7ost.x86_64
erlang-ssl-R16B-03.10min.5.el7ost.x86_64
erlang-runtime_tools-R16B-03.10min.5.el7ost.x86_64
erlang-hipe-R16B-03.10min.5.el7ost.x86_64
erlang-kernel-R16B-03.10min.5.el7ost.x86_64
erlang-xmerl-R16B-03.10min.5.el7ost.x86_64
erlang-tools-R16B-03.10min.5.el7ost.x86_64

[root@overcloud-controller-1 ~]# erl -sname test -proto_dist inet6_tcp -inet_dist_listen_min 33333 -inet_dist_listen_max 33333
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:12:12] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
(test@overcloud-controller-1)1>
[1]+  Stopped                 erl -sname test -proto_dist inet6_tcp -inet_dist_listen_min 33333 -inet_dist_listen_max 33333
[root@overcloud-controller-1 ~]# ss -antp | grep beam
ESTAB      0      0      127.0.0.1:42337              127.0.0.1:4369                users"beam.smp",pid=19116,fd=9))
ESTAB      0      0      127.0.0.1:50839              127.0.0.1:4369                users"beam.smp",pid=31903,fd=8))
LISTEN     0      128     2620:52:0:23ae::16:5672                    :::*                   users"beam.smp",pid=19116,fd=18))
LISTEN     0      128         :::39149                   :::*                   users"beam.smp",pid=31903,fd=7))
LISTEN     0      128         :::35672                   :::*                   users"beam.smp",pid=19116,fd=8))
ESTAB      0      0       2620:52:0:23ae::16:5672                2620:52:0:23ae::10:38529               users"beam.smp",pid=19116,fd=123))
...  
....
ESTAB      0      0       2620:52:0:23ae::16:5672                2620:52:0:23ae::10:36105               users"beam.smp",pid=19116,fd=47))
ESTAB      0      0       2620:52:0:23ae::16:5672                2620:52:0:23ae::16:56981               users"beam.smp",pid=19116,fd=98))
*(full output http://pastebin.test.redhat.com/343663 )
[root@overcloud-controller-1 ~]# ss -antp | grep beam|grep 33333
(returned nothing..)

From what I understand The port suppose to be between the range 33333-33333(so only 33333?). And if I understood right the bug reproduced..
Comment 3 John Eckersberg 2016-02-01 10:44:46 EST
Yeah, something isn't right.  I'll look into it.
Comment 4 John Eckersberg 2016-02-01 15:23:29 EST
OK, sorry, I pasted the wrong command into the bug.  It should be:

erl -sname test -proto_dist inet6_tcp -kernel inet_dist_listen_min 33333 -kernel inet_dist_listen_max 33333

Which works for me:

[1]+  Stopped                 erl -sname test -proto_dist inet6_tcp -kernel inet_dist_listen_min 33333 -kernel inet_dist_listen_max 33333
[root@rhel7 yum.repos.d]# ss -antp | grep beam
ESTAB      0      0                 127.0.0.1:41271            127.0.0.1:4369   users:(("beam",1338,6))
LISTEN     0      128                      :::33333                   :::*      users:(("beam",1338,5))
Comment 5 Udi Shkalim 2016-02-04 07:44:00 EST
Verified

[root@overcloud-controller-0 ~]# ss -antp | grep beam | grep 3333

[root@overcloud-controller-0 ~]# erl -sname test -proto_dist inet6_tcp -kernel inet_dist_listen_min 33333 -kernel inet_dist_listen_max 33333
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]


Eshell V5.10.4  (abort with ^G)
(test@overcloud-controller-0)1> 
[1]+  Stopped                 erl -sname test -proto_dist inet6_tcp -kernel inet_dist_listen_min 33333 -kernel inet_dist_listen_max 33333


[root@overcloud-controller-0 ~]# ss -antp | grep beam | grep 3333
LISTEN     0      128         :::33333                   :::*                   users:(("beam",pid=309,fd=5))


Version
[root@overcloud-controller-0 ~]# rpm -qa|grep erlang
erlang-crypto-R16B-03.10min.5.el7ost.x86_64
erlang-otp_mibs-R16B-03.10min.5.el7ost.x86_64
erlang-ssl-R16B-03.10min.5.el7ost.x86_64
erlang-runtime_tools-R16B-03.10min.5.el7ost.x86_64
erlang-hipe-R16B-03.10min.5.el7ost.x86_64
erlang-kernel-R16B-03.10min.5.el7ost.x86_64
erlang-snmp-R16B-03.10min.5.el7ost.x86_64
erlang-xmerl-R16B-03.10min.5.el7ost.x86_64
erlang-asn1-R16B-03.10min.5.el7ost.x86_64
erlang-tools-R16B-03.10min.5.el7ost.x86_64
erlang-stdlib-R16B-03.10min.5.el7ost.x86_64
erlang-sasl-R16B-03.10min.5.el7ost.x86_64
erlang-syntax_tools-R16B-03.10min.5.el7ost.x86_64
erlang-public_key-R16B-03.10min.5.el7ost.x86_64
erlang-sd_notify-0.1-2.el7ost.x86_64
erlang-mnesia-R16B-03.10min.5.el7ost.x86_64
erlang-compiler-R16B-03.10min.5.el7ost.x86_64
erlang-erts-R16B-03.10min.5.el7ost.x86_64
erlang-os_mon-R16B-03.10min.5.el7ost.x86_64
erlang-inets-R16B-03.10min.5.el7ost.x86_64
Comment 8 errata-xmlrpc 2016-02-18 11:10:41 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0259.html

Note You need to log in before you can comment on or make changes to this bug.