You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@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
On your vagrant host machine
vagrant box list | grep centos/atomic-host
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.
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:
lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth1 regexp="^NM_CONTROLLED=" line="NM_CONTROLLED=yes"
My "fixed lines":
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.
The text was updated successfully, but these errors were encountered: