heketi / vagrant-heketi

Demos of Heketi
30 stars 16 forks source link

Ansible failed running eth1 fix #23

Open johanrobinson opened 7 years ago

johanrobinson commented 7 years ago

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:

My "fixed lines":

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

lpabon commented 7 years ago

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

raghavendra-talur commented 7 years ago

@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.