Bug 1264580 - calculate_mac returns incorrect MAC address on system with more network interfaces
Summary: calculate_mac returns incorrect MAC address on system with more network inter...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Monitoring
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-18 21:36 UTC by Jan Hutař
Modified: 2017-04-28 18:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-28 18:20:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2015-09-18 21:36:09 UTC
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:

/usr/share/perl5/vendor_perl/NOCpulse/SMONQueue.pm


Version-Release number of selected component (if applicable):
Satellite 5.7.0
MessageQueue-3.26.10-1.el6sat.noarch


How reproducible:
always


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 <<<<<<<<<<";
    $self->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 18:20:50 UTC
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.