Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mac address issue for ens33 on centos 7 #321

Merged
merged 2 commits into from
Feb 26, 2015

Conversation

alappe
Copy link

@alappe alappe commented Feb 12, 2015

Before I had an issue using the box with a static ip for NFS sharing in
vagrant, resulting in

ERROR: [/etc/sysconfig/network-scripts/ifdown-eth] Device ens33 has MAC
address 00:0C:29:F8:96:74, instead of configured address
00:0C:29:59:C4:97. Ignoring.

While the cleanup script already fixed this for eth0, CentOS7 seems to
have changed the device naming, therefor it's also needed for ens33.

Instead of removing the text of the entries, I opted for deleting the
whole line as there's no need for empty lines in the ifcfg-file.

Before I had an issue using the box with a static ip for NFS sharing in
vagrant, resulting in

```
ERROR: [/etc/sysconfig/network-scripts/ifdown-eth] Device ens33 has MAC
address 00:0C:29:F8:96:74, instead of configured address
00:0C:29:59:C4:97. Ignoring.
```

While the cleanup script already fixed this for `eth0`, CentOS7 seems to
have changed the device naming, therefor it's also needed for `ens33`.

Instead of removing the text of the entries, I opted for deleting the
whole line as there's no need for empty lines in the ifcfg-file.
@juliandunn
Copy link
Contributor

The Ethernet devices are named in RHEL/CentOS >= 7 (and Fedora as well) based on the hardware and thus we can't just assume ens33 is the one everyone will see. I like the idea, but it seems you should modify the patch to iterate through all files found in the /etc/sysconfig/network-scripts directory matching ifcfg-* and make the change that way.

@alappe
Copy link
Author

alappe commented Feb 12, 2015

@juliandunn This should do it, I hope…

juliandunn added a commit that referenced this pull request Feb 26, 2015
Fix mac address issue for ens33 on centos 7
@juliandunn juliandunn merged commit 90321e5 into chef:master Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants