This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2077757 - subscription-manager facts is not able to identify permanent_mac_address for Team slave interfaces (duplicate interface on Sat6)
Summary: subscription-manager facts is not able to identify permanent_mac_address for ...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-22 07:14 UTC by Andres Becker
Modified: 2023-09-22 13:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-22 13:58:19 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1528193 1 high CLOSED subscription-manager register facts create duplicate interface with wrong mac for bond 2023-10-06 17:42:04 UTC
Red Hat Issue Tracker   RHEL-7163 0 None Migrated None 2023-09-22 13:58:13 UTC
Red Hat Issue Tracker RHELPLAN-122978 0 None None None 2022-05-23 12:40:39 UTC
Red Hat Knowledge Base (Solution) 2027213 0 None None None 2022-04-22 08:40:16 UTC
Red Hat Knowledge Base (Solution) 2592351 0 None None None 2022-04-22 08:40:16 UTC

Description Andres Becker 2022-04-22 07:14:14 UTC
Description of problem:
When Teaming is configured on a physical host (with two physical interfaces (slaves)), "subscription-manager facts" is not able to identify the "permanent_mac_address" of the second slave interface. This happens because of a lack of support for Teaming on the python library /usr/lib64/python3.6/site-packages/rhsmlib/facts/hwprobe.py
Since the "permanent_mac_address" property is set as "Unknown" for the second slave interface, an interface with and "empty" mac address is created/uploaded into Satellite 6. 

The follow problem is just a consequence of the one mentioned above:
When puppet is executed on the host, it identifies the second slave interface and a MAC address and upload it into satellite, which is causing this interface to be duplicated in Satellite.
This case the follow error on the Satellite Web UI: "Some of the interfaces are invalid. Please check the table below.".
This also cause the follow error on the host when it tries to be subscribed into satellite:
________________________________________________________________________________________________________________________________________________
[ root@ my_host my_user]# subscription-manager register --org=xxx --activationkey="yyy" --force
Unregistering from: myhostname:8443/rhsm
The system with UUID 7a24cc2f-8ef3-4c01-a0d1-afbf4727f1b6 has been unregistered
All local data removed
HTTP error (422 - Unprocessable Entity): Validation failed: Interfaces some interfaces are invalid
________________________________________________________________________________________________________________________________________________

Please note that the issue here is the lack of support on "subscription-manager facts" for Teaming slave interfaces and not the duplication of interfaces on Satellite. The second is just a consequence of the first.

Version-Release number of selected component (if applicable):
This error has been identified both on RHEL7.9 and RHEL8.5
subscription management rules: 5.41
subscription-manager: 1.24.50-1.el7_9 and 1.28.21-5.el8_5
Red Hat Satellite build: 6.9.8

How reproducible:
Set a Teaming interface with two slave interfaces on a physical host, then list the "subscription-manager facts" and validate that the second slave interface has an "Unknown" on the "permanent_mac_address" property (e.g. for a slave interface named "p4p2", net.interface.p4p2.permanent_mac_address: Unknown)

Steps to Reproduce:
1. Set Teaming on a physical host with two slave interfaces and restart the network.
________________________________________________________________________________________________________________________________________________
[ root@ my_host my_user ]# cat /etc/sysconfig/network-scripts/ifcfg-team1
DEVICE="team1"
DEVICETYPE="Team"
BOOTPROTO="none"
ONBOOT="yes"
USERCTL="no"
PEERDNS="no"
PEERNTP="no"
NM_CONTROLLED="no"
IPADDR="10.20.30.40"
NETMASK="255.255.255.0"
GATEWAY="10.20.30.1"
DEFROUTE="yes"
TEAM_CONFIG='{"runner": {"name": "lacp", "active": true, "fast_rate": true, "tx_hash": ["ipv4", "ipv6", "tcp", "udp"]}, "link_watch": {"name": "ethtool"}, "ports": {"em1": {"prio": 100}, "p4p2": {"prio": 100}}}'
________________________________________________________________________________________________________________________________________________

2. Execute "subscription-manager facts --list" and validate that the second slave interface has an "Unknown" on the "permanent_mac_address" property:
________________________________________________________________________________________________________________________________________________
[ root@ my_host my_user ]# subscription-manager facts --list| grep p4p2
net.interface.p4p2.mac_address: aa:bb:cc:dd:ee:ff
net.interface.p4p2.permanent_mac_address: Unknown
________________________________________________________________________________________________________________________________________________

3. Execute "subscription-manager facts --update" and validate that an interfaces with Identifier "p4p2" and an empty MAC Address was uploaded into Satellite.

Actual results:
Second Team slave interfaces uploaded into Satellite with an empty MAC Address.

Expected results:
Support on "subscription-manager facts" to support Teaming.
For a detailed explanation of the root problem see "Additional info".

Additional info:
Host facts are gathered and uploaded into Satellite by the "subscription-manager" command. On RHEL 8.5 this command is provided by package subscription-manager-1.28.21-5.el8_5.x86_64, which provide the library responsible for gathering the information about the network interfaces (/usr/lib64/python3.6/site-packages/rhsmlib/facts/hwprobe.py). On lib hwprobe.py, the class "HardwareCollector" is defined, which contains the class methods (functions) "get_network_info" and "_get_slave_hwaddr". The property "permanent_mac_addr" is assigned on "get_network_info" method, by calling method "_get_slave_hwaddr", which only has support for bonding interfaces and not teaming:
________________________________________________________________________________________________________________________________________________
    def _get_slave_hwaddr(self, master, slave):
        hwaddr = ""
        try:
            bonding = open('/proc/net/bonding/%s' % master, "r")
        except:
            return hwaddr

        slave_found = False
        for line in bonding.readlines():
            if slave_found and line.find("Permanent HW addr: ") != -1:
                hwaddr = line.split()[3].upper()
                break

            if line.find("Slave Interface: ") != -1:
                ifname = line.split()[2]
                if ifname == slave:
                    slave_found = True

        bonding.close()
        return hwaddr
________________________________________________________________________________________________________________________________________________
Since /proc/net/bonding/ does not exist for Teaming interfaces, this is causing the method "_get_slave_hwaddr" to return hwaddr = "".
In the terminal, the "permanent"/"physical" MAC address can be show with the command "ethtool -P device_name". However, this information would need to be get in python.

Comment 2 RHEL Program Management 2023-09-22 13:55:47 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 3 RHEL Program Management 2023-09-22 13:58:19 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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