Bug 1264580 - calculate_mac returns incorrect MAC address on system with more network interfaces
calculate_mac returns incorrect MAC address on system with more network inter...
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Monitoring (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Grant Gainey
Red Hat Satellite QA List
Depends On:
  Show dependency treegraph
Reported: 2015-09-18 17:36 EDT by Jan Hutař
Modified: 2017-04-28 14:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-04-28 14:20:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Hutař 2015-09-18 17:36:09 EDT
Description of problem:
Function calculate_mac probably (I'm not completely sure, please feel free to close this bug if it behaves as expected) returns incorrect MAC address on system with more network interfaces. File with that function is:


Version-Release number of selected component (if applicable):
Satellite 5.7.0

How reproducible:

Steps to Reproduce:
1. Have system with multiple network interfaces, with only first of them active:
2. Add this debug output to the function:

sub calculate_mac
    my $self = shift;

    my $mac = `/sbin/ip -o link`;
    $mac =~ s/.*\bUP\b.*ether (\S*).*/$1/s;
    my @nodes = split(/:/, $mac);
    $mac = sprintf("%02X:%02X:%02X:%02X:%02X:%02X",
                   hex($nodes[0]), hex($nodes[1]), hex($nodes[2]),
                   hex($nodes[3]), hex($nodes[4]), hex($nodes[5]));

    print ">>>>>>>>>> calculate_mac: $mac <<<<<<<<<<";

Actual results:
It was returning 2C:44:FD:84:51:C7 for me.

Expected results:
IMO it should return 2C:44:FD:84:51:C4

Additional info:
Found this when I have seen bug 1170064 again.
Comment 2 Grant Gainey 2017-04-28 14:20:50 EDT
Monitoring has a number of issues, and is being removed in the upcoming SATELLITE-5.8 release. Closing, WONTFIX

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