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

Ansible failed running eth1 fix #23

Open
johanrobinson opened this issue Oct 7, 2016 · 2 comments
Open

Ansible failed running eth1 fix #23

johanrobinson opened this issue Oct 7, 2016 · 2 comments
Assignees

Comments

@johanrobinson
Copy link

Ansible playbook assumes second interface is named eth1.
I manually changed roles/common/tasks/main.yml to use another interface name. The problem was all hosts didn't have the same name 'client' had eth1 and 'master atomic0 atomic1 atomic2' had 'enp0s8' interface.

Orginial lines in main.yml:

  • name: fix issue with eth1
    lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth1 regexp="^NM_CONTROLLED=" line="NM_CONTROLLED=yes"

My "fixed lines":

  • name: fix issue with enp0s8
    lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-enp0s8 regexp="^NM_CONTROLLED=" line="NM_CONTROLLED=yes"

However, which I knew how to select different interfaces for different hosts or that ansible could do a check.

@lpabon
Copy link

lpabon commented Oct 8, 2016

Interesting, thanks @johanrobinson . Looks like there has been an update to the centos atomic image. We'll take a look.

@raghavendra-talur
Copy link
Member

@lpabon
I had 7.20160730 version of centos/atomic-host which was working for me.
I also updated to the latest version of the box which is 7.20161006 and that works for me too.
This used to a bug with centos images long back but you should not see this with latest images.

@johanrobinson
Please provide the following info for us to be able to debug more

  1. On your vagrant host machine
    vagrant box list | grep centos/atomic-host
  2. In a atomic VM that is part of your openshift setup
    ls -l /etc/udev/rules.d/80-net-setup-link.rules

Given below is more info about the old bug that I know about:
Technical Info:
Systemd came up with a new mechanism of naming devices, based on the physical position instead of the logical/chronological order of device detection. This is useful for a system admin who replaces a damaged network card with a new one in the same slot and there is no config change required after that.
Read more here: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Problem with hypervisor variants and automation:
Different hypervisors may choose to show the network card to OS in different physical slots. This makes it impossible to find the name of the device in a deterministic way and automate using the same through ansible or otherwise.

Accepted solution in the community:
Vagrant boxes or VM images that are created should disable this feature of Systemd. This brings back the old naming scheme of eth*, thereby enabling automation.

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

No branches or pull requests

3 participants