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

Disable automatic udev rules for network interfaces in CentOS #497

Merged
merged 1 commit into from
Dec 19, 2015

Conversation

legal90
Copy link
Contributor

@legal90 legal90 commented Nov 24, 2015

This PR makes thec lean-up of udev rules similar to ubuntu/debian approach:
https://github.com/chef/bento/blob/6d5771a/scripts/ubuntu/networking.sh#L3-L8
https://github.com/chef/bento/blob/250efaa/scripts/debian/networking.sh#L3-L8

It's not enough just to remove /etc/udev/rules.d/70-persistent-net.rules. We should also replace it with a directory and remove /lib/udev/rules.d/75-persistent-net-generator.rules to prevent the generating of new rules.

P.s. It is already implemented in boxcutter project and it works fine:
https://github.com/boxcutter/centos/blob/a732c24/script/cleanup.sh#L3-L14

@legal90
Copy link
Contributor Author

legal90 commented Nov 24, 2015

It really makes sense for parallels provider. Currently, after vagrant up the guest OS generates new udev rules for network devices. Everything works fine, but if user decide to pack this env to the custom box (with vagrant package), then such box will be packed with these pre-created rules.
Such custom box is unusable: network devise order is shifted (now it starts from eth1 instead of eth0) and vagrant up fails with timeout:
Parallels/vagrant-parallels#218

It's really inconvenient to remove /etc/udev/rules.d/70-persistent-net.rules manually before packaging. It is better just to prevent the generating of new rules here, while we build the base box with Packer.

@legal90 legal90 force-pushed the centos-cleanup-udev branch from 8e0e938 to 78c7c31 Compare November 24, 2015 19:53
@oskarpearson
Copy link

👍

This bit both me and a colleague when trying to build packer-based configs using this repo as a base.

Oskar

@cheeseplus
Copy link
Contributor

+1

cheeseplus pushed a commit that referenced this pull request Dec 19, 2015
Disable automatic udev rules for network interfaces in CentOS
@cheeseplus cheeseplus merged commit 201a763 into chef:master Dec 19, 2015
@legal90 legal90 deleted the centos-cleanup-udev branch December 29, 2015 15:00
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.

3 participants