michaelrigart / ansible-role-interfaces

An ansible role for configuring different network interfaces
GNU General Public License v3.0
83 stars 62 forks source link

Interface active check fails if bond negotiation slow #73

Closed jovial closed 2 years ago

jovial commented 4 years ago

There is a race on checking the interface state, please see:

https://storyboard.openstack.org/#!/story/2007787

I propose we use @busterswt's proposed fix of adding a pause, see:

https://github.com/michaelrigart/ansible-role-interfaces/pull/31/files#diff-3d2b7487e8f37272aeb6f25599f2734bR107,

thoughts?

markgoddard commented 4 years ago

Incuding the link to the video. https://send.firefox.com/download/d8db7411e5013954/#RrmODkYh5laY98Z6AArsIw

markgoddard commented 4 years ago

It's worth pointing out that there seems to be a bond0 interface with two slave links, and a bridge interface br0 which bond0 is plugged into. It looks like the bridge is managed by the Ansible role, but the bond is not.

Here is the order in which we bounce interfaces on RedHat systems:

So bridge ports are bounced after bridges. This is because the ifcfg file of a bridge port references the bridge. For Debian it's the other way around...

I think we're bumping into an issue with how CentOS 8 handles bridges, which is different from CentOS 7 as far as I can tell.

If you create an ifcfg file for a bridge on CentOS 8, then run ifup it starts with a state of UNKNOWN. If you then add a port to it, it moves to DOWN. If you set the state of the port to up, the bridge goes to UP also.

If there were some way to actually wait for the right thing to happen I would prefer to do that, but if not then some configurable pause could work.

Aethylred commented 2 years ago

Has this been resolved with interfaces_pause_time

interfaces_pause_time: 120
interfaces_ether_interfaces:
   - device: eth0
     bootproto: static
     address: 10.41.0.10
     netmask: 255.255.128.0