This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 682365 - assumes all ethernet devices are named ethX
assumes all ethernet devices are named ethX
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mysql (Show other bugs)
15
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tom Lane
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: 682366 682334
  Show dependency treegraph
 
Reported: 2011-03-04 19:12 EST by Bill Nottingham
Modified: 2014-03-16 23:26 EDT (History)
5 users (show)

See Also:
Fixed In Version: mysql-5.5.18-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 682366 (view as bug list)
Environment:
Last Closed: 2011-12-02 16:27:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
proposed patch that creates a "sum" of all interfaces (1.72 KB, patch)
2011-10-24 12:27 EDT, Honza Horak
no flags Details | Diff
proposed patch that takes the first non-zero HW address (1.65 KB, patch)
2011-11-01 07:52 EDT, Honza Horak
no flags Details | Diff

  None (edit)
Description Bill Nottingham 2011-03-04 19:12:58 EST
Description of problem:

Network devices can have arbitrary names, and due to
http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming, will have
different names in Fedora 15.

my_gethwaddr.c:

  strnmov(ifr.ifr_name, "eth0", sizeof(ifr.ifr_name) - 1);

  do
  {
    if (ioctl(fd, SIOCGIFHWADDR, &ifr) >= 0)
    {
      memcpy(to, &ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN);
      res= memcmp(to, zero_array, ETHER_ADDR_LEN) ? 0 : 1;
    }
  } while (res && (errno == 0 || errno == ENODEV) && ifr.ifr_name[3]++ < '6');

Now, since this is only used to initialize the UUID (afaict), and there is fallback code for that, it may not be critical to fix this. Filing for completeness.

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

mysql-5.5.8

How reproducible:

By inspection.
Comment 1 Tom Lane 2011-03-04 20:01:27 EST
[ raised eyebrow... ]  Changing that naming convention is going to break boatloads of stuff, much of it user-written scripts that we couldn't fix if we wanted to.  You *sure* this is a good idea?
Comment 2 Matt Domsch 2011-03-04 20:27:32 EST
Tom: yes.  The feature page describes how to disable the new naming convention, but the approved feature is enabled by default in F15.
Comment 3 Honza Horak 2011-10-24 12:27:59 EDT
Created attachment 529924 [details]
proposed patch that creates a "sum" of all interfaces

Since hw address is needed only for initiate a seed for pseudo-random number generator, we can return a value, that is unique enough to the machine, rather then the mac address. This patch loops through all interfaces and creates byte-by-byte sum of all devices. 

If real hw address should be returned, we'd need find out if the interface is a real one or just a virtual (loopback, virtual bridge, ...). One way (not sure how reliable it is) is compare the address with 00:00:00:00:00:00, since virtual interfaces seems to have zero address.
Comment 4 Honza Horak 2011-11-01 07:52:22 EDT
Created attachment 531117 [details]
proposed patch that takes the first non-zero HW address

Since there is a comment in mysys/my_gethwaddr.c, that we can use any of non-zero HW address, this patch fixes the issue that way. 

The patch has also been sent to upstream: http://bugs.mysql.com/bug.php?id=63055
Comment 5 Tom Lane 2011-11-15 08:44:15 EST
Since this bug is against F15, I was planning to keep it open until the patch can be back-patched.  That's waiting on some other stuff though ...
Comment 6 Fedora Update System 2011-11-22 00:44:54 EST
mysql-5.5.18-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mysql-5.5.18-1.fc15
Comment 7 Fedora Update System 2011-11-22 20:03:58 EST
Package mysql-5.5.18-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mysql-5.5.18-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16293/mysql-5.5.18-1.fc15
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2011-12-02 16:27:10 EST
mysql-5.5.18-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

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