Bug 874735

Summary: [RFE] Network interface collection/facts do not support multiple address per interface
Product: Red Hat Enterprise Linux 7 Reporter: Adrian Likins <alikins>
Component: subscription-managerAssignee: Chris Snyder <csnyder>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact: Aneta Šteflová Petrová <apetrova>
Priority: medium    
Version: 7.0CC: bcourt, bkearney, csnyder, jsefler, ktordeur, salmy, vrjain
Target Milestone: rcKeywords: FutureFeature
Target Release: 7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
*subscription-manager* displays all addresses associated with a network interface Previously, the *subscription-manager* utility displayed only one address per network interface even if the network interface had more than one associated address. With this update, a new system fact with the suffix `_list` corresponding to each network interface is reported to the entitlement server that contains a comma-separated string of values. As a result, *subscription-manager* is now able to display all addresses associated with the network interface.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 20:26:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1298337, 1313485    

Description Adrian Likins 2012-11-08 18:25:27 UTC
Description of problem:

in hwprobe.py, the code that gathers network interface information ignores multiple addresses on an interface. 

At least on rhel6.4, we can gather that information (either get_ipv6_addresses()
or the new get_ipv4_addresses()), but we can not express that relation in
the schema for facts. 

ie. on a system with multiple address on eth0, we will show something like:

net.interface.eth0.ipv4_address: 10.13.129.193
net.interface.eth0.ipv4_broadcast: 10.13.129.255 

Only one address is shown per interface, and that address happens to be
the last one collected (and there doesn't seem to be any stable order
to that).

Comment 2 Adrian Likins 2012-12-11 16:56:53 UTC
need to know who is using these facts, and if changing it, or adding new facts with related info (for example, something like net.interface.eth0.ipv4_net_addrinfo = {'127.0.0.1', '255.255.255.0'})

Is anyone parsing or using the infomation currently in these facts. Would
changing this break stuff?

Comment 4 RHEL Program Management 2012-12-15 06:49:08 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Bryan Kearney 2014-07-30 19:20:41 UTC
Acking 7.1

Comment 7 John Sefler 2014-10-28 17:56:35 UTC
This feature request was not implemented and delivered to QE by the rhel-7.1.0 Dev Freeze date of 10/27/2014.  Deferring for consideration in next release.

Comment 9 Barnaby Court 2016-02-04 14:39:35 UTC
A new fact should be created (such as net.interface.eth0.ipv4_net_addrinfo_list) that has the new format and the existing fact should remain the same. In that way, if someone is using the existing fact the format will not change on them.

Comment 13 John Sefler 2016-07-08 21:06:38 UTC
Verifying Version...
[root@jsefler-rhel7 ~]# rpm -q subscription-manager
subscription-manager-1.17.8-1.el7.x86_64
[root@jsefler-rhel7 ~]# rpm -q subscription-manager --changelog | grep 874735
- 874735: Support fact collection of multiple ips per interface

[root@jsefler-rhel7 ~]# subscription-manager facts --list | egrep net.*.list -B1
net.interface.eth0.ipv4_address: 10.16.7.221
net.interface.eth0.ipv4_address_list: 10.16.7.221
net.interface.eth0.ipv4_broadcast: 10.16.7.255
net.interface.eth0.ipv4_broadcast_list: 10.16.7.255
net.interface.eth0.ipv4_netmask: 22
net.interface.eth0.ipv4_netmask_list: 22
net.interface.eth0.ipv6_address.global: 2620:52:0:1007:5054:ff:fecc:250e
net.interface.eth0.ipv6_address.global_list: 2620:52:0:1007:5054:ff:fecc:250e
net.interface.eth0.ipv6_address.link: fe80::5054:ff:fecc:250e
net.interface.eth0.ipv6_address.link_list: fe80::5054:ff:fecc:250e
net.interface.eth0.ipv6_netmask.global: 64
net.interface.eth0.ipv6_netmask.global_list: 64
net.interface.eth0.ipv6_netmask.link: 64
net.interface.eth0.ipv6_netmask.link_list: 64
--
net.interface.lo.ipv4_address: 127.0.0.1
net.interface.lo.ipv4_address_list: 127.0.0.1
net.interface.lo.ipv4_broadcast: Unknown
net.interface.lo.ipv4_broadcast_list: Unknown
net.interface.lo.ipv4_netmask: 8
net.interface.lo.ipv4_netmask_list: 8
net.interface.lo.ipv6_address.host: ::1
net.interface.lo.ipv6_address.host_list: ::1
net.interface.lo.ipv6_netmask.host: 128
net.interface.lo.ipv6_netmask.host_list: 128
--
net.interface.virbr0.ipv4_address: 192.168.122.1
net.interface.virbr0.ipv4_address_list: 192.168.122.1
net.interface.virbr0.ipv4_broadcast: Unknown
net.interface.virbr0.ipv4_broadcast_list: Unknown
net.interface.virbr0.ipv4_netmask: 24
net.interface.virbr0.ipv4_netmask_list: 24

VERIFIED: All of the facts above whose names end in "_list" are the new facts introduced by this RFE.  Notice that all of them are currently a list of 1 value which is equivalent to the prior fact and occur for each of the ipv4 and ipv6 network devices I currently have defined (eth0,lo,virbr0).  A list of 1 is expected when there is only one net interface address configured.

Admittedly I am not an expert at networking.  But I'll do my best to configure a second address for one of my devices and list the facts again to demonstrate a list....

1. call "route -n" and look for the line with Flag UG and take note of the gateway for setting below (10.16.7.254)

2. start application "gnome-control-center network&"
On my "Wired" network I clicked the gear icon button
chose "Identity" in the left list to find the Name of the interface (eth0)
chose "IPv4" in the left list
changed Addresses from "Automatic (DHCP)" to "Manual"
set Address 192.168.1.1
set Netmask 255.255.255.0
set Gateway 10.16.7.254
click the + button to add another ip address
set Address 192.168.1.2
set Netmask 255.255.255.0
set Gateway 10.16.7.254
click Apply

3. systemctl restart network.service

4. subscription-manager facts --list


[root@jsefler-rhel7 ~]# subscription-manager facts --list | egrep net.*.list -B1
net.interface.eth0.ipv4_address: 192.168.1.2
net.interface.eth0.ipv4_address_list: 192.168.1.1, 192.168.1.2
net.interface.eth0.ipv4_broadcast: 192.168.1.255
net.interface.eth0.ipv4_broadcast_list: 192.168.1.255, 192.168.1.255
net.interface.eth0.ipv4_netmask: 24
net.interface.eth0.ipv4_netmask_list: 24, 24
net.interface.eth0.ipv6_address.global: 2620:52:0:1007:dacd:b06d:84f4:7415
net.interface.eth0.ipv6_address.global_list: 2620:52:0:1007:dacd:b06d:84f4:7415
net.interface.eth0.ipv6_address.link: fe80::f336:9661:f817:da4d
net.interface.eth0.ipv6_address.link_list: fe80::f336:9661:f817:da4d
net.interface.eth0.ipv6_netmask.global: 64
net.interface.eth0.ipv6_netmask.global_list: 64
net.interface.eth0.ipv6_netmask.link: 64
net.interface.eth0.ipv6_netmask.link_list: 64
--
net.interface.lo.ipv4_address: 127.0.0.1
net.interface.lo.ipv4_address_list: 127.0.0.1
net.interface.lo.ipv4_broadcast: Unknown
net.interface.lo.ipv4_broadcast_list: Unknown
net.interface.lo.ipv4_netmask: 8
net.interface.lo.ipv4_netmask_list: 8
net.interface.lo.ipv6_address.host: ::1
net.interface.lo.ipv6_address.host_list: ::1
net.interface.lo.ipv6_netmask.host: 128
net.interface.lo.ipv6_netmask.host_list: 128
--
net.interface.virbr0.ipv4_address: 192.168.122.1
net.interface.virbr0.ipv4_address_list: 192.168.122.1
net.interface.virbr0.ipv4_broadcast: Unknown
net.interface.virbr0.ipv4_broadcast_list: Unknown
net.interface.virbr0.ipv4_netmask: 24
net.interface.virbr0.ipv4_netmask_list: 24


VERIFIED: All of the net.interface.eth0.ipv4_*_list facts now show a comma delimited list of configured addresses (2) where the last list value equals the prior non-list fact value

PS. I don't know how to add a second ipv6 net interface address.  NEEDINFO

Comment 20 errata-xmlrpc 2016-11-03 20:26:23 UTC
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/RHSA-2016-2592.html