Bug 1739135
| Summary: | subscription-manager facts use incorrect primary IP address | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Oliver Falk <ofalk> | |
| Component: | subscription-manager | Assignee: | candlepin-bugs | |
| Status: | CLOSED WONTFIX | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 7.7 | CC: | csnyder, jsefler, peter.vreman, redakkan, skallesh, snemeth, wpoteat | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1898552 1899554 (view as bug list) | Environment: | ||
| Last Closed: | 2020-11-11 21:54:46 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: | 1122832, 1898552, 1899554 | |||
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7. From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. From the RHEL life cycle page: https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase "During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available." If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes: https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns. [0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7 Sorry, the WONTFIX is untankful the attached case has root cause analyze and an oneliner fix provided:
The order of information returned by the ethtool library is correct with the primary ip listed first.
The bug is that the 'address' fields is everytime overwritten and then ends up with the last entry of the array.
Solution is to only update the key if it did not exists yet
Patch:
-----------------------
--- /usr/lib64/python2.7/site-packages/rhsmlib/facts/hwprobe.py.190808-1 2018-11-07 19:07:36.000000000 +0000
+++ /usr/lib64/python2.7/site-packages/rhsmlib/facts/hwprobe.py 2019-08-08 13:07:18.682694692 +0000
@@ -739,3 +739,4 @@
attr = getattr(addr, mkey) or 'Unknown'
- netinfdict[key] = attr
+ if key not in netinfdict:
+ netinfdict[key] = attr
if not netinfdict.get(list_key, None):
-----------------------
Please re-think to re-open and fix also for RHEL7.x
*** Bug 1856276 has been marked as a duplicate of this bug. *** The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |
Description of problem: When multiple IP addresses are on the same interface then the address put by subscription-manager in the 'address' field is not the primary address. Version-Release number of selected component (if applicable): all (tested with 1.24.x) How reproducible: Always. Steps to Reproduce: - Add secondary IP address to the primary interface - Compare subscription-manager facts for interface X with output of 'ip addr show dev X' - Enable debug logging in satellite - Delete host in RHSAT - Register host to satellite - Check that 'resolved #{host_name} for #{ip}, #{int} is selected as primary' message is written # This message is not shown # Alternative is to add additional logging line # 'logger.debug { "find_interface_by_name #{host_name} for #{int} with #{ip}" }' # to find_interface_by_name in /usr/share/foreman/app/services/fact_parser.rb (on your RHSAT) Actual results: The result is that RHSAT6 RHSM fact parsing is failing to set the primary interface because the reverse DNS lookup for the secondary ip address does not match the host name. Expected results: Correct (primary) IP is used. Example: # cat /etc/sysconfig/network-scripts/ifcfg-ens192 DEVICE="ens192" BOOTPROTO="static" IPADDR0="10.92.XX.XXX" NETMASK0="255.255.255.0" IPADDR1="10.92.XX.XYZ" NETMASK1="255.255.255.0" ONBOOT="yes" HWADDR="XX:XX:XX:XX:XX:XX" HOTPLUG="no" NM_CONTROLLED="no" # ip a show dev ens192 2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000 link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff inet 10.XX.XX.XXX/24 brd 10.XX.XX.255 scope global ens192 valid_lft forever preferred_lft forever inet 10.XX.XX.XYZ/24 brd 10.XX.XX.255 scope global secondary ens192 valid_lft forever preferred_lft forever # subscription-manager facts | grep net.interface | grep ens192.ipv4 net.interface.ens192.ipv4_address: 10.XX.XX.XYZ net.interface.ens192.ipv4_address_list: 10.XX.XX.XXX, 10.92.14.XYZ net.interface.ens192.ipv4_broadcast: 10.XX.XX.255 net.interface.ens192.ipv4_broadcast_list: 10.XX.XX.255, 10.XX.XX.255 net.interface.ens192.ipv4_netmask: 24 net.interface.ens192.ipv4_netmask_list: 24, 24 Customer case will be linked.