michaelrigart / ansible-role-interfaces

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

Restart bond interface after all members restart #89

Closed markgoddard closed 3 years ago

markgoddard commented 3 years ago

On CentOS/RHEL systems, if all members in a bond go down, the bond interface will also go down. If the members are brought back up again, the bond interface does not automatically come back up. Therefore, if there is some change to the configuration of bond members, the bond may be left in an inactive state.

This change fixes the issue by adding bond interfaces to the list of changed interfaces, if all of their members have changed.

Fixes: #88

markgoddard commented 3 years ago

Added some comments.

zhujinhe commented 3 years ago

Great Work. Is there a way to bring up the bond interface after any interface is up again automatically ? Instead of one shout check.

markgoddard commented 3 years ago

Great Work. Is there a way to bring up the bond interface after any interface is up again automatically ? Instead of one shout check.

Do you mean outside of this role? You can add an ifup-local script, but I think it would be getting quite custom, with lots of corner cases. I'd like to think that NetworkManager would fix this, but I don't know.